久久久久久久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)用程序在通過管理門戶更新之前無法運行)
主站蜘蛛池模板: 人人澡视频 | 一级大黄 | 综合久久av | 国产精品国产三级国产aⅴ无密码 | 欧美高清视频一区 | 成年人网站国产 | 久久久国产一区二区三区 | 亚洲一区二区三区四区在线观看 | 在线观看国产wwwa级羞羞视频 | 欧美综合国产精品久久丁香 | 国产农村妇女毛片精品久久麻豆 | 五月天婷婷丁香 | 狠狠干五月天 | 国产色婷婷久久99精品91 | 在线日韩在线 | 国产日韩一区二区三免费高清 | 综合第一页 | 91久久精品国产 | 天天干天天玩天天操 | 亚洲黄色一区二区三区 | 日韩在线国产 | 国产精品毛片一区二区三区 | 欧美日韩综合 | 一区二区三区欧美大片 | 精品免费国产视频 | 亚洲精品一区二区冲田杏梨 | 亚洲激情一区二区三区 | 国产精品中文在线 | 亚洲 日本 欧美 中文幕 | 欧美在线一区视频 | 人人干人人艹 | 亚洲高清电影 | 美女高潮网站 | 亚洲高清一区二区三区 | 日韩欧美网 | 四虎网站在线观看 | 亚洲一区二区电影网 | 久久综合久久综合久久 | 亚洲视频一区二区三区 | 一级黄色夫妻生活 | 黑人巨大精品欧美一区二区一视频 |