Chagned osg::Matrix to osg::Matrixd
This commit is contained in:
parent
bdd04bef60
commit
c332d1f751
@ -70,18 +70,18 @@ class OSGGA_EXPORT UFOManipulator : public osgGA::MatrixManipulator
|
|||||||
/** Set the current position with a matrix
|
/** Set the current position with a matrix
|
||||||
\param matrix A viewpoint matrix.
|
\param matrix A viewpoint matrix.
|
||||||
*/
|
*/
|
||||||
virtual void setByMatrix( const osg::Matrix &matrix ) ;
|
virtual void setByMatrix( const osg::Matrixd &matrix ) ;
|
||||||
|
|
||||||
/** Set the current position with the invers matrix
|
/** Set the current position with the invers matrix
|
||||||
\param invmatrix The inverse of a viewpoint matrix
|
\param invmatrix The inverse of a viewpoint matrix
|
||||||
*/
|
*/
|
||||||
virtual void setByInverseMatrix( const osg::Matrix &invmat);
|
virtual void setByInverseMatrix( const osg::Matrixd &invmat);
|
||||||
|
|
||||||
/** Get the current viewmatrix */
|
/** Get the current viewmatrix */
|
||||||
virtual osg::Matrix getMatrix() const;
|
virtual osg::Matrixd getMatrix() const;
|
||||||
|
|
||||||
/** Get the current inverse view matrix */
|
/** Get the current inverse view matrix */
|
||||||
virtual osg::Matrix getInverseMatrix() const ;
|
virtual osg::Matrixd getInverseMatrix() const ;
|
||||||
|
|
||||||
/** Set the subgraph this manipulator is driving the eye through.
|
/** Set the subgraph this manipulator is driving the eye through.
|
||||||
\param node root of subgraph
|
\param node root of subgraph
|
||||||
@ -116,9 +116,9 @@ class OSGGA_EXPORT UFOManipulator : public osgGA::MatrixManipulator
|
|||||||
private:
|
private:
|
||||||
osg::ref_ptr<osg::Node> _node;
|
osg::ref_ptr<osg::Node> _node;
|
||||||
float _viewAngle;
|
float _viewAngle;
|
||||||
osg::Matrix _matrix;
|
osg::Matrixd _matrix;
|
||||||
osg::Matrix _inverseMatrix;
|
osg::Matrixd _inverseMatrix;
|
||||||
osg::Matrix _offset;
|
osg::Matrixd _offset;
|
||||||
|
|
||||||
double _minHeightAboveGround;
|
double _minHeightAboveGround;
|
||||||
double _minDistanceInFront;
|
double _minDistanceInFront;
|
||||||
|
@ -66,24 +66,24 @@ const char* UFOManipulator::className() const
|
|||||||
return "UFO";
|
return "UFO";
|
||||||
}
|
}
|
||||||
|
|
||||||
void UFOManipulator::setByMatrix( const osg::Matrix &mat )
|
void UFOManipulator::setByMatrix( const osg::Matrixd &mat )
|
||||||
{
|
{
|
||||||
_inverseMatrix = mat;
|
_inverseMatrix = mat;
|
||||||
_matrix.invert( _inverseMatrix );
|
_matrix.invert( _inverseMatrix );
|
||||||
}
|
}
|
||||||
|
|
||||||
void UFOManipulator::setByInverseMatrix( const osg::Matrix &invmat)
|
void UFOManipulator::setByInverseMatrix( const osg::Matrixd &invmat)
|
||||||
{
|
{
|
||||||
_matrix = invmat;
|
_matrix = invmat;
|
||||||
_inverseMatrix.invert( _matrix );
|
_inverseMatrix.invert( _matrix );
|
||||||
}
|
}
|
||||||
|
|
||||||
osg::Matrix UFOManipulator::getMatrix() const
|
osg::Matrixd UFOManipulator::getMatrix() const
|
||||||
{
|
{
|
||||||
return (_offset * _matrix);
|
return (_offset * _matrix);
|
||||||
}
|
}
|
||||||
|
|
||||||
osg::Matrix UFOManipulator::getInverseMatrix() const
|
osg::Matrixd UFOManipulator::getInverseMatrix() const
|
||||||
{
|
{
|
||||||
return (_inverseMatrix * _offset);
|
return (_inverseMatrix * _offset);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user