Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Offline Michael Koch  
#1 Posted : Sunday, February 2, 2014 5:23:28 PM(UTC)
Michael Koch

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.

Wanna join the discussion?! Login to your forum accountregister a new account. Or Connect via Facebook Twitter Google

Rss Feed  Atom Feed
Users browsing this topic
OceanSpiders 2.0
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2023, Yet Another Forum.NET
This page was generated in 1.427 seconds.