Main Page | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields

osgExtension::MatrixEstimate Class Reference

defines the estimate of the matrix More...


Public Types

enum  { N = 16 }

Public Member Functions

 MatrixEstimate ()
void getMatrix (osg::Matrix &m) const
void setMatrix (const osg::Matrix &m)
bool getPerfectlyKnown () const
void setPerfectlyKnown (bool newPerfectlyKnown)
bool isInfinite () const
void setInfinite (bool infinite)
void setTrans (const osg::Vec3 &v)
void setTrans (const osg::Vec3 &v, const boost::numeric::ublas::matrix< double > &PV)
osg::Vec3 getTrans () const
void getTrans (osg::Vec3 &v) const
void set (const osg::Quat &q)
void set (const osg::Quat &q, const boost::numeric::ublas::matrix< double > &PQ)
void get (osg::Quat &quat) const
void makeFrustum (double left, double right, double bottom, double top, double zNear, double zFar)
void makeFrustum (double left, double right, double bottom, double top, double zNear, double zFar, const boost::numeric::ublas::matrix< double > &PF)
void makeOrtho (double left, double right, double bottom, double top, double zNear, double zFar)
void makeOrtho (double left, double right, double bottom, double top, double zNear, double zFar, const boost::numeric::ublas::matrix< double > &PO)
void makeOrtho2D (double left, double right, double bottom, double top)
void makeOrtho2D (double left, double right, double bottom, double top, const boost::numeric::ublas::matrix< double > &PO2)
void makePerspective (double fovy, double aspectRatio, double zNear, double zFar)
void makePerspective (double fovy, double aspectRatio, double zNear, double zFar, const boost::numeric::ublas::matrix< double > &PP)
void makeRotate (const osg::Quat &q)
void makeRotate (const osg::Quat &q, const boost::numeric::ublas::matrix< double > &PQ)
void makeScale (const osg::Vec3 &s)
void makeScale (const osg::Vec3 &s, const boost::numeric::ublas::matrix< double > &PS)
void makeTranslate (const osg::Vec3 &v)
void makeTranslate (const osg::Vec3 &v, const boost::numeric::ublas::matrix< double > &PV)
void resetP ()
bool invert (const MatrixEstimate &me)
MatrixEstimateoperator= (const MatrixEstimate &rhs)

Static Public Member Functions

MatrixEstimate inverse (const MatrixEstimate &me)


Detailed Description

This class defines the estimate of the matrix. It is stored as a vector with 16 states whose order should be the same as the 1D array returned by Matrix.ptr();

The reason why we use this form is that it represents the most general way to handle any and all types of transforms which can turn up in OSG. There are two downsides. First, this is computationally much more expensive. Second, it looses some of the nonlinear constraints which occur. TODO: work out if this is a problem or not


Constructor & Destructor Documentation

osgExtension::MatrixEstimate::MatrixEstimate  ) 
 

Construct a new matrix estimate. By default, it is set to the identity matrix with a covariance matrix with extremely small positives on the diagonals.


Member Function Documentation

void osgExtension::MatrixEstimate::getMatrix osg::Matrix &  m  )  const [inline]
 

Return the value stored in this estimate using an osg::Matrix.

bool osgExtension::MatrixEstimate::getPerfectlyKnown  )  const [inline]
 

Return if the transformation is known perfectly. If it is, various optimisations can be used.

void osgExtension::MatrixEstimate::getTrans osg::Vec3 &  v  )  const [inline]
 

Get the translation

osg::Vec3 osgExtension::MatrixEstimate::getTrans  )  const [inline]
 

Get the translation

bool osgExtension::MatrixEstimate::invert const MatrixEstimate me  ) 
 

Assign this estimate as the inverse of another estimate.

bool osgExtension::MatrixEstimate::isInfinite  )  const [inline]
 

Return if the transformation is infinite.

void osgExtension::MatrixEstimate::set const osg::Quat &  q,
const boost::numeric::ublas::matrix< double > &  PQ
[inline]
 

Set the rotation from the quaternion. To be consistent with osg::Matrix semantics, this sets the translation component to 0. The covariance for the rotation component is computed from the covariance on the quaternion. The position covariance terms are set to 0.

void osgExtension::MatrixEstimate::set const osg::Quat &  q  )  [inline]
 

Set the rotation from the quaternion. To be consistent with osg::Matrix semantics, this sets the translation component to 0. The covariance is unchanged.

void osgExtension::MatrixEstimate::setInfinite bool  infinite  )  [inline]
 

Set whether the estimate is infinite

void osgExtension::MatrixEstimate::setMatrix const osg::Matrix &  m  )  [inline]
 

Set the mean of this estimate from an OSG matrix. The covariance structure is not altered.

void osgExtension::MatrixEstimate::setPerfectlyKnown bool  newPerfectlyKnown  )  [inline]
 

Set whether the estimate is known perfectly

void osgExtension::MatrixEstimate::setTrans const osg::Vec3 &  v,
const boost::numeric::ublas::matrix< double > &  PV
 

Set the translation of the matrix. The covariance of the position states are set according to PV.

void osgExtension::MatrixEstimate::setTrans const osg::Vec3 &  v  ) 
 

Set the translation of the matrix. The covariance is not changed.


The documentation for this class was generated from the following files:
Generated on Wed Nov 17 12:22:38 2004 for osgAR by doxygen 1.3.7