Joined: 12/27/2013(UTC) Posts: 41 Location: Regensburg
Thanks: 3 times Was thanked: 1 time(s) in 1 post(s)
|
I've recently played with cameras and world space etc. This is test code to get familiar with object orientation. As you can see, I draw world axes as Line3D (comes out as right-handed with z_up, as expected). Then, I place boxes with enlarged z size. The initial orientation of the boxes seems to be different than world space orientation, though (large dimension is in world y). Looking into BoxMesh.cs, I see lines like new VertexPosition3DColor(new Vector3D(x1, z1, y2), color) - which makes me believe that the box creation might intentionally be switching y and z. Any reason for that, I wonder? Code:
LookAtCamera lac = new LookAtCamera(Resolve<Device>(), Resolve<Window>());
lac.Position = new Vector3D(-5, -5, 5);
lac.Target = new Vector3D(0, 0, 0);
new Line3D(new Vector3D(0, 0, 0), new Vector3D(5, 0, 0), Color.Red); // World X
new Line3D(new Vector3D(0, 0, 0), new Vector3D(0, 5, 0), Color.Green); // World Y
new Line3D(new Vector3D(0, 0, 0), new Vector3D(0, 0, 5), Color.Blue); // World Z
for (int x = 0; x < 3; x++)
for (int y = 0; y < 2; y++)
{
Box b = new Box(new Vector3D(1,1,2), Color.Blue); // Should be enlarged in Z-Axis
b.Position = new Vector3D(x * 5, y * 5, 0);
b.Orientation = Quaternion.Identity;
}
(Nightly 1.0.0.13) Edited by user Sunday, February 2, 2014 5:37:36 PM(UTC)
| Reason: added De version Michael Koch attached the following image(s):  Image1.png (5kb) downloaded 4 time(s).You cannot view/download attachments. Try to login or register.
|