Hi Cory,

On Wed, May 20, 2009 at 2:10 PM, Cory Riddell <[email protected]> wrote:
> I'm not really grokking CameraView yet. I see that it is a transform node
> with postion, attitude, focal length and field of view settings but it isn't
> obvious to me how you would locate a camera with it. The docs say:
>
> The application must attach a camera to a CameraView via the NodePath from
> the top of the scene graph to the CameraView node itself, and accumulate the
> view matrix from this NodePath.
>
> So, I would accumulate the matrices from (one of) the node paths to the
> CameraView node and then what? Pass this matrix into the camera manipulator?

Yes this is exactly what would be done, but it could possible be done
as a one off apply against a CameraManipulator.  For instance
CameraManipulator could have a convenience method that takes
CameraView pointer (and it's parent path) and works out the settings
that are appropriate.

> It seems to me that a spherical manipulator would usually be used by
> CAD-type applications where you are always outside of the model. I don't
> think I would build in any path planning to the animation route.

You'd need to add the capability to control the path if required, so a
default implementation could do something that works for 90% of users,
then allow the last 10% to add the custom path planning facility.

> I'm actually happy with having my camera position reset code in an event
> handler rather than the scene graph because a relocate event is relatively
> rare. Correct me if I'm wrong, but every additional node added to the scene
> graph incurs some non-zero overhead on every iteration of the main loop, no?
> Is the incremental cost so small it isn't worth worrying about? I honestly
> don't know as I haven't profiled anything.

Extra nodes like a CameraView has essentially zero cost, the
traversals only traverse what is required, so passive nodes like a
CameraView are largely ignored.

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

Reply via email to