久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

使 Camera LookDirection 看正面

Make Camera LookDirection look front face(使 Camera LookDirection 看正面)
本文介紹了使 Camera LookDirection 看正面的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

限時送ChatGPT賬號..

如何在WPF中查看3D模型的正面?

How to look at the front of 3D Model in WPF?

我很困惑為 LookDirection 設(shè)置 X Y Z.

I am confused to set X Y Z for LookDirection.

我不知道當我設(shè)置 xyz 時會發(fā)生什么,我不知道相機在看哪里.對于 UpDirection,我不知道同樣的事情.

I don't know what happens when I set xyz and I don't know where camera is looking at. I don't know the same thing for UpDirection.

以下是我的相機屬性:

camera.Position = new Point3D(100, 100, 150);
camera.LookDirection = new Vector3D(-100, -100, -100);
camera.UpDirection = new Vector3D(0, 0, 1);

問題是相機是從后面看的.模型如下圖所示.

The problem is that camera is looking from behind. Model is shown like cube below.

如何讓它看起來像正面?

How to make it look front face?

另外請說明如何設(shè)置 xyz.我知道屬性的作用,但我無法想象它們.

Also please explain how to set xyz. i know what properties do but i cant imagine them.

我認為 X 是從右到左.Y 是深度.Z 從上到下.

I think X is from right to left.Y is depth. Z is up to down .

推薦答案

想象一下,你正在 3D 空間中移動你的頭部,而不是相機.那么 Camera.Position 指定你的頭部位置,Camera.LookDirection 確定你正在看的方向,Camera.UpDirection 顯示頭部的方向.以下圖片為您解惑.

Imagine, instead of a camera, you're moving your head around in 3D space. then Camera.Position is specifying where your head is located, Camera.LookDirection determines the direction you're looking at and Camera.UpDirection shows the orientation of your head. the following pictures clear things up for you.

在第一張圖片中,相機以 +Z 軸為中心,向下看 -Z 軸和您的形狀:

In the first Image, Camera is centered on the +Z axis looking down to -Z axis and to your shape:

當您將 camera.Position 設(shè)置為例如 (x=1, y=0, z=10) 時,相機位置會發(fā)生如下變化:

When you set camera.Position to for example (x=1, y=0, z=10) then camera position changes like this:

因此,相機會稍微向右移動,因此您會在視圖的左側(cè)看到您的形狀.

as a result, camera moves a little to the right and therefore you will see your shape at the left side of the view.

現(xiàn)在,如果 camera.LookDirection 更改為 (x=0, y=1, z=-1),那么相機只會看點 (0,1,-1)這個:

Now if camera.LookDirection gets changed to say (x=0, y=1, z=-1), then camera simply looks at the point (0,1,-1) like this:

重要修改:

根據(jù) DaveInCaz 的評論,LookDirectionLookAtPoint 不同(PrespectiveCamera 的前屬性是 Point3D 而不是Vector3D).

Based on DaveInCaz's comment, LookDirection is different from LookAtPoint (former property of PrespectiveCamera which was a Point3D rather than Vector3D).

LookDirection實際上等于觀察點"減去相機位置".

這意味著在上圖中,如果我們希望位于 (1,0,10) 的相機看點 (0,1,-1) 那么 LookDirection 應(yīng)該是:

This means that in the above diagram, if we want the camera which is located in (1,0,10) to look at point (0,1,-1) then the LookDirection should be:

(0,1,-1) - (1,0,10) = (-1,1,-11).

(0,1,-1) - (1,0,10) = (-1,1,-11).

最后,camera.UpDirection 確定您的相機頂部指向的位置.在下圖中,將 camera.UpDirection 設(shè)置為 (-0.5,1,0) 會導致相機逆時針旋轉(zhuǎn):

And finally, camera.UpDirection determines where the top of your camera points at. In the following picture, setting camera.UpDirection to (-0.5,1,0) results in rotation of the camera counter clockwise:

我希望這些圖片能讓你明白.

I hope these pictures clear things up for you.

這篇關(guān)于使 Camera LookDirection 看正面的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

ASP.NET Core authenticating with Azure Active Directory and persisting custom Claims across requests(ASP.NET Core 使用 Azure Active Directory 進行身份驗證并跨請求保留自定義聲明)
ASP.NET Core 2.0 Web API Azure Ad v2 Token Authorization not working(ASP.NET Core 2.0 Web API Azure Ad v2 令牌授權(quán)不起作用)
How do I get Azure AD OAuth2 Access Token and Refresh token for Daemon or Server to C# ASP.NET Web API(如何獲取守護進程或服務(wù)器到 C# ASP.NET Web API 的 Azure AD OAuth2 訪問令牌和刷新令牌) - IT屋-程序員軟件開發(fā)技
Azure KeyVault Active Directory AcquireTokenAsync timeout when called asynchronously(異步調(diào)用時 Azure KeyVault Active Directory AcquireTokenAsync 超時)
Getting access token using email address and app password from oauth2/token(使用電子郵件地址和應(yīng)用程序密碼從 oauth2/token 獲取訪問令牌)
New Azure AD application doesn#39;t work until updated through management portal(新的 Azure AD 應(yīng)用程序在通過管理門戶更新之前無法運行)
主站蜘蛛池模板: 男女啪啪高潮无遮挡免费动态 | 日韩精品在线播放 | 成人一区二区三区在线观看 | 国产激情小视频 | 午夜影视网| 欧美精品v | 久久av网站| 青青激情网| 日本一区二区影视 | 亚洲精品一二三区 | av性色全交蜜桃成熟时 | 亚洲精品1区 | 久久久久国产一级毛片 | 国产成人免费视频网站视频社区 | 国产精品亚洲综合 | 成人三级在线播放 | 在线观看第一区 | 久久国产精品99久久久大便 | 免费国产视频 | 国产精品极品美女在线观看免费 | 美女黄色在线观看 | 美女视频一区二区三区 | 久久久久免费 | 色婷婷av一区二区三区软件 | 国产精品国产精品国产专区不卡 | 中文字幕在线第一页 | 91av免费版 | 色婷婷亚洲一区二区三区 | 成人精品一区 | 成人黄色电影在线播放 | 欧美日本韩国一区二区 | 中文字幕亚洲视频 | 黄片毛片 | 国产小视频在线 | 天天操天天摸天天爽 | 欧美三级视频 | 欧美午夜视频 | 国产精品永久久久久久久www | 亚洲二区在线 | 国产在线一区二区三区 | 精品国产乱码久久久久久丨区2区 |