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

@@ -215,7 +215,7 @@ void Camera::setProjectionMatrixAsPerspective(double fovy,double aspectRatio,
bool Camera::getProjectionMatrixAsOrtho(double& left, double& right,
double& bottom, double& top,
double& zNear, double& zFar)
double& zNear, double& zFar) const
{
return _projectionMatrix.getOrtho(left, right,
bottom, top,
@@ -224,7 +224,7 @@ bool Camera::getProjectionMatrixAsOrtho(double& left, double& right,
bool Camera::getProjectionMatrixAsFrustum(double& left, double& right,
double& bottom, double& top,
double& zNear, double& zFar)
double& zNear, double& zFar) const
{
return _projectionMatrix.getFrustum(left, right,
bottom, top,
@@ -232,7 +232,7 @@ bool Camera::getProjectionMatrixAsFrustum(double& left, double& right,
}
bool Camera::getProjectionMatrixAsPerspective(double& fovy,double& aspectRatio,
double& zNear, double& zFar)
double& zNear, double& zFar) const
{
return _projectionMatrix.getPerspective(fovy, aspectRatio, zNear, zFar);
}
@@ -242,12 +242,12 @@ void Camera::setViewMatrixAsLookAt(const Vec3d& eye,const Vec3d& center,const Ve
setViewMatrix(osg::Matrixd::lookAt(eye,center,up));
}
void Camera::getViewMatrixAsLookAt(Vec3d& eye,Vec3d& center,Vec3d& up,double lookDistance)
void Camera::getViewMatrixAsLookAt(Vec3d& eye,Vec3d& center,Vec3d& up,double lookDistance) const
{
_viewMatrix.getLookAt(eye,center,up,lookDistance);
}
void Camera::getViewMatrixAsLookAt(Vec3f& eye,Vec3f& center,Vec3f& up,float lookDistance)
void Camera::getViewMatrixAsLookAt(Vec3f& eye,Vec3f& center,Vec3f& up,float lookDistance) const
{
_viewMatrix.getLookAt(eye,center,up,lookDistance);
}