Hi,

Just curious about how cameras work in general. I would appreciate some 
clarification. I basically have four questions.

1) In the following message:

http://www.mail-archive.com/[email protected]/msg14619.html

it is said that a Slave camera can have its own scene graph.

It is my understanding that the reason to be of Slave cameras are that they are 
dependent on their View's master camera, and (almost obviously) point to the 
same scene graph. The usages I can see for them are for:

- 3D vision. The left eye is the master camera of the View, and the right eye 
is a slave camera.
- the rear view mirror in a car.
- Google StreetView-style car cameras, looking left/right/forward/backward/up 
and down.

Again, in these situations, the slave camera obviously has the same scene graph 
as the master camera.

So why would I want to define a custom scene graph for a slave camera, and how 
do I do that anyway?

2) I am not used to doing this (usually I just create a Camera and add it to a 
View, the Camera is never referenced anywhere else), but I understand that, as 
per their osg::Node object model inheritance, Cameras can be added to scene 
graphs, I guess to position them physically in the 3D space.
When physically present in the scene graph, how are they being rendered, are 
they just processed as a regular osg::Group, or is there something else I am 
missing?

3) osg::Camera indirectly derives from osg::Group. This means I can add child 
nodes to a Camera. I might sound stupid here but I've never done that. Could 
you describe to me a usage scenario? If my camera is moving in a car, my car is 
most likely going to have a top-level group, and my camera will be declared as 
a leaf node in there... but won't have child nodes. When would a camera have 
child nodes? Spectacles in front of the field of view? Just want to know if I'm 
missing something here too.

4) Following up on question #3. I am a bit confused about the ReferenceFrame 
member of osg::Camera, which is a member inherited from osg::Transform.
I read somewhere that it is possible to make the Slave camera independent from 
its master camera by setting its ReferenceFrame (inherited from osg::Transform) 
to ABSOLUTE_RF. Right?
But in this case, regarding my question #3, if I *do* have renderable child 
nodes like Geodes below my slave Camera, and this slave Camera is declared 
somewhere in my scene graph, these child nodes will no longer be relatively 
positioned in the tree, since the ReferenceFrame of my camera is ABSOLUTE_RF.
It seems to me that ReferenceFrame will in this situation serve a dual purpose 
for Camera: define the absolute/relative relationship to the master camera AND 
define the relationship of child nodes in the scene graph. This is a bit 
confusing. Since master/slave is a view-only concept, not a scene graph 
concept, I would have put the RELATIVE_RF/ABSOLUTE_RF master/slave somewhere 
else, in osg::View, per slave Camera.

Thank you!

Cheers,
Fred

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=32332#32332





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to