09-19-2013 05:14 AM
I'm revisiting this topic.
I've found out that using the "Viewport" functionality built into the 3D picture control API we can place a small window at the bottom left of the scene outside of which the object placed into it will NOT be drawn.
Rotations made on the main Scene will apply to the object in this wondow also which can be fixed by making use of the "Billboard" parameter. My problem, however is a different one. When panning or zooming ont he main display, the onbject in the smaller viewport also pans and zooms. I'd like to have the camera controller NOT apply to the smaller viewport.....
Is there a way to do this? To define the viewport thusly generated as being static and not affected by camera cahnges? It would seem that we need to be able to define a projection matrix and model view matrix PER MODEL and not PER 3D Picture in order to be able to do this. If we could do this, this would be awesome. I'm as keen as ever to unlock the full potential of the 3D picture object.
Shane
09-19-2013 05:20 AM - edited 09-19-2013 05:27 AM
There seems to be some inconsistencies when working with objects within the 3D picture and the 3D picture itself.
We define the Viewport for an object on the OBJECT level whereas we define the camera and the display coordinates on the 3D Picture level.
If I want to negate any camera changes I need to re-draw the scene after detecting a change in the camera controller, feed this information (From the 3D Picture control itself) back to my draw routing in order to be able to pan and rotate my object so that it "matches" the camera and appears to stay put.
I would think we need the ability to define a camera controller PER viewport, no? How is this normally handled in OpenGL?
Shane.
PS In the "Sensor Mapping" Express VI (shudder) there seems to be a coordinate system fixed ont he bottom left of the 3D picture. How is this achieved? Is this even done using LabVIEW or is it using OpenGL Calls directly?
09-19-2013 05:40 AM
Where's my rubber duck?
So I'm thinking I need to disable automatic redraw and determine on mouse down which Viewport I'm accessing and then programatically rotate, pan and zoom the viewport myself before updating the scene. In essence, instead of moving the camera, I need to roate and zooma nd pan the objects within a single viewport at a time. This screams LVOOP with an XControl......
Shane
09-19-2013 05:48 AM
@Intaris wrote:
Where's my rubber duck?
That's what crossed my mind when I saw your three posts in a row. I love that duck.