LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

3D camera Position control

Solved!
Go to solution

hi,

can anybody give me an idea, how can i controll the position of the camera for a simple 3D geometry,i use a producer-consumer structure to realize the change of geometries and shapes,i put these things in a queue, further more i want to change the position of the camera of the 3D scene,i plan to put it in another queue,but~~

 

can anybody help me?

 

here is my structure,

 

0 Kudos
Message 1 of 3
(3,176 Views)
Solution
Accepted by topic author tonykun

Hi,

The 3D picture controls are based on OpenGL API.  In the OpenGL API, the Camera's location is always at coordinates 0,0,0 in the eye-space. 
In order to find the camera location in the object space, you need to turn the eye-space coordinates into a vector, [0 0 0 1], and multiply it by the inverse of the ModelView Matrix. 

First you need to place the ModelView Matrix property node on your block diagram.  Inverse the matrix using the 'Inverse Matrix' function. 

After this you should multiply by a constant matrix of [0 0 0 1] using the 'A x B' function.

 

For more information please go to

Using Viewing and Camera Transforms

 

 

 

 

Message 2 of 3
(3,150 Views)

helllo hsm87,

 

thanks for your hint, i am trying as your worts.

still have an other question, do you have any idea,how can i put a coordinates system in a picture, i mean the coordinates of the scene to display?i think it will make control of the camera position more clear for the users.

 

thanks a lot! 

 

Kun

0 Kudos
Message 3 of 3
(3,127 Views)