Plane to move object and keep tracking objects position

Topics: Developer Forum
Nov 30, 2011 at 8:58 AM

My tetrahedron, centered in the (0,0,0) rotates using a Trackball (programmatically, I have a transparent border over my viewport to capture the events).

The users for the application think the more naturally way to move the cube inside it is to move it always in a 2D plane (parallel to the screen). So, if I want to move it deeper in the screen, I just rotate the tetrahedron and move it in Y axis, for example. I think this can be a good solution.

I have to problems, and I would like help to solve then: first, when I move my tetrahedron (inside the Trackball) the Trackball looks like moving all the system coordinates. I say this because I draw axis for debug purpose, and those axis are being rotate also. But this is not true - they are moving just because are objects inside the trackball (right?). So my questions is how to define a plane which will not be rotate by trackball? For me the answer looks something like "ok, just define it outside the track ball" but, as I said (and 3DTools documentation say) I have a border over my viewport... So I do not know how to handle this.

My tetraedron in a set of ScreenSpaceLines3D. I will have to keep the cube inside it. My second question ishow to I trace the positions of the vertex of the tetrahedron of it being rotated? I got really disappointed when the Position property gave me the original positions and nothing else. Should I keep the matrix transformations and apply then to my points when I need then?

Sorry for long text, but I really stuck in this not so much programming questions. I am knew in WPF, I still have some lacks of concepts.

Thanks in advance,