From Rudolf Wiedemann, "attached is the osg::Camera class (based on revision 9493), where

methods
 getProjectionMatrixAsOrtho()
 getProjectionMatrixAsFrustum()
 getProjectionMatrixAsPerspective()
 getViewMatrixAsLookAt() (2x)
are now const, as they only call const methods of osg::Matrixf/d.
"
This commit is contained in:
Robert Osfield
2009-01-15 10:36:04 +00:00
parent c28221b06f
commit 2f7fb53ff7
2 changed files with 10 additions and 10 deletions

View File

@@ -206,13 +206,13 @@ class OSG_EXPORT Camera : public Transform, public CullSettings
* Returns false if matrix is not an orthographic matrix, where parameter values are undefined.*/
bool getProjectionMatrixAsOrtho(double& left, double& right,
double& bottom, double& top,
double& zNear, double& zFar);
double& zNear, double& zFar) const;
/** Get the frustum setting of a perspective projection matrix.
* Returns false if matrix is not a perspective matrix, where parameter values are undefined.*/
bool getProjectionMatrixAsFrustum(double& left, double& right,
double& bottom, double& top,
double& zNear, double& zFar);
double& zNear, double& zFar) const;
/** Get the frustum setting of a symmetric perspective projection matrix.
* Returns false if matrix is not a perspective matrix, where parameter values are undefined.
@@ -220,7 +220,7 @@ class OSG_EXPORT Camera : public Transform, public CullSettings
* Asymmetric matrices occur when stereo, power walls, caves and reality center display are used.
* In these configurations one should use the 'getProjectionMatrixAsFrustum' method instead.*/
bool getProjectionMatrixAsPerspective(double& fovy,double& aspectRatio,
double& zNear, double& zFar);
double& zNear, double& zFar) const;
@@ -240,10 +240,10 @@ class OSG_EXPORT Camera : public Transform, public CullSettings
void setViewMatrixAsLookAt(const osg::Vec3d& eye,const osg::Vec3d& center,const osg::Vec3d& up);
/** Get to the position and orientation of a modelview matrix, using the same convention as gluLookAt. */
void getViewMatrixAsLookAt(osg::Vec3d& eye,osg::Vec3d& center,osg::Vec3d& up,double lookDistance=1.0);
void getViewMatrixAsLookAt(osg::Vec3d& eye,osg::Vec3d& center,osg::Vec3d& up,double lookDistance=1.0) const;
/** Get to the position and orientation of a modelview matrix, using the same convention as gluLookAt. */
void getViewMatrixAsLookAt(osg::Vec3f& eye,osg::Vec3f& center,osg::Vec3f& up,float lookDistance=1.0f);
void getViewMatrixAsLookAt(osg::Vec3f& eye,osg::Vec3f& center,osg::Vec3f& up,float lookDistance=1.0f) const;
/** Get the inverse view matrix.*/
Matrixd getInverseViewMatrix() const;