Hello Ugras,
Quoting Ugras Erdogan <[EMAIL PROTECTED]>:
> For the purpose of thread synchronization, I use Windows OS
> synchronization objects. This is also needed because in the lack of
> synchronization the original frame rate of the application and the
> yaw/pitch/roll values acquired from the tracker may go out of sync.
> My questions are:
> 1) (As I haven't noticed up to now), does OSG have synchronization objects
> for the purpose above?
OSG includes the OpenThreads library which has cross-platform support for
threads, mutices(?), conditions etc. Have a look in include/OpenThreads.
> 2) After obtaining the yaw/pitch/roll values in sync, is "updating the
> virtual camera's viewmatrix" correct way of proceeding or does OSG has some
> specialized functions for this?
You'd usually update the viewmatrix manually in your main loop using one of the
osg::Camera::setViewMatrix*() functions.
Another possibility is to subclass osgGA::MatrixManipulator. Examples for this
are DriveManipulator, FlightManipulator, etc.
Cheers,
/ulrich
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org