使相机观看方向看起来前面 [英] Make Camera LookDirection look front face
问题描述
如何查看 3D
前面的 WPF
?
我很难为LookDirection设置XYZ。
我不知道当我设置xyz时会发生什么,我不知道camera在哪里看着。我不知道 UpDirection
是一样的。
下面是我的相机属性:
camera.Position = new Point3D(100,100,150);
camera.LookDirection = new Vector3D(-100,-100,-100);
camera.UpDirection = new Vector3D(0,0,1);
问题是相机从后面看。
模型如下面的多维数据集所示。
此外,请解释如何设置xyz。我知道什么属性,但我不能想象他们。
我认为X是从右到左.Y是深度。
想象一下,而不是相机,你在3D空间中移动你的头。然后 Camera.Position
指定头部位置, Camera.LookDirection
决定您正在查看的方向, Camera.UpDirection
显示头部的方向。
在第一张图片中,相机以+ Z轴为中心俯视-Z轴和您的形状:
>
当将 camera.Position
设置为(x = 1,y = 0,z = 10)时,相机位置变化如下:
>
因此,摄像机向右移动一点,因此您将在视图的左侧看到您的形状。
现在如果 camera.LookDirection
改为说(x = 0,y = 1,z = -1) -1)like this:
camera.UpDirection
决定相机顶部的指向位置。在下面的图片中,将 camera.UpDirection
设置为(-0.5,1,0)会导致摄像机逆时针旋转:
>
我希望这些照片为你清理。
How to look at the front of 3D
Model in WPF
?
I am confused to set X Y Z for LookDirection.
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
.
Below is my camera properties:
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?
Also please explain how to set xyz. i know what properties do but i cant imagine them.
I think X is from right to left.Y is depth. Z is up to down .
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.
In the first Image, Camera is centered on the +Z axis looking down to -Z axis and to your shape:
When you set camera.Position
to for example (x=1, y=0, z=10) then camera position changes like this:
as a result, camera moves a little to the right and therefore you will see your shape at the left side of the view.
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:
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.
这篇关于使相机观看方向看起来前面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!