Added new Matrixf and Matrixd implementations.

Made Matrix be a typedef to either Matrixf or Matrixd.  Defaults to Matrixf.

Converted the osgGA::MatrixManipulators and osgProducer::Viewer/OsgCameraGroup
across to using exclusively Matrixd for internal computations and passing betwen
Manipulators, Producer and SceneView. Note, SceneView still uses Matrix internally
so will depend on what is set as the default in include/osg/Matrix.

Added the ability to osgProducer::setDone/getDone(), kept done() as the
method that the viewer main loop uses for detecting the exit condition.
This commit is contained in:
Robert Osfield
2003-09-05 22:35:34 +00:00
parent a2834d74d2
commit 792bba05b9
23 changed files with 203 additions and 129 deletions

View File

@@ -42,16 +42,16 @@ class OSGGA_EXPORT AnimationPathManipulator : public MatrixManipulator
virtual const char* className() const { return "AnimationPath"; }
/** set the position of the matrix manipulator using a 4x4 Matrix.*/
virtual void setByMatrix(const osg::Matrix& matrix) { _matrix = matrix; }
virtual void setByMatrix(const osg::Matrixd& matrix) { _matrix = matrix; }
/** set the position of the matrix manipulator using a 4x4 Matrix.*/
virtual void setByInverseMatrix(const osg::Matrix& matrix) { _matrix.invert(matrix); }
virtual void setByInverseMatrix(const osg::Matrixd& matrix) { _matrix.invert(matrix); }
/** get the position of the manipulator as 4x4 Matrix.*/
virtual osg::Matrix getMatrix() const { return _matrix; }
virtual osg::Matrixd getMatrix() const { return _matrix; }
/** get the position of the manipulator as a inverse matrix of the manipulator, typically used as a model view matrix.*/
virtual osg::Matrix getInverseMatrix() const { return osg::Matrix::inverse(_matrix); }
virtual osg::Matrixd getInverseMatrix() const { return osg::Matrixd::inverse(_matrix); }
void setAnimationPath( osg::AnimationPath* animationPath ) { _animationPath=animationPath; }
@@ -88,7 +88,7 @@ class OSGGA_EXPORT AnimationPathManipulator : public MatrixManipulator
double _animStartOfTimedPeriod;
int _numOfFramesSinceStartOfTimedPeriod;
osg::Matrix _matrix;
osg::Matrixd _matrix;
};