Hi Rafael,

Rafael Sabbagh Armony wrote:
> Hi guys,
> 
> one more question about how OpenSG handles things.
> 
> How are cameras handled on OpenSG? Is it a node of the graph, is it a 
> separate class? Can there be as many cameras as we need? (can we 
> instantiate more than one camera?)
> How is its API? I mean, are we able to change any OpenGL parameters for 
> the camera from OpenSG?

Cameras are related to the scenegraph but not part of it. The way it works is 
that each Viewport (i.e. rectangular piece of a Window) has its own Camera (and 
yes, there can be arbitrarily many Viewports per Window and Windows in general, 
all with different Cameras and scenegraphs). They can be shared between them, 
but they don't have to be. Those Camera objects just define the intrinsic 
parameters of the camera, i.e. viewing angle near/far distance, stereo 
parameters, CAVE projection parameters etc. Some of these are done via 
Decorators to the actual Camera, to allow sharing the Camera between Viewports.

To get the actual position and orientation of the Camera it has a reference to 
a 
Node in the scenegraph (called the beacon). This can be any Node, but normally 
it's a Transform node fairly high up in the graph. You can just change the 
transformation of that Node in any regular way to move the camera, or attach it 
to a moving object.

If you want to specify everything yourself there is a MatrixCamera that lets 
you 
can give OpenGL PROJECTION and MODELVIEW matrices. Few people need it, most AR 
people that get fully specified matrices from an external tracker.

Hope it helps

        Dirk

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to