const missing

GetFrustum does not chang ethe object, it's const
This commit is contained in:
ganovelli 2017-01-13 12:14:56 +01:00
parent 611341b754
commit 825d90157c
2 changed files with 3 additions and 3 deletions

View File

@ -229,7 +229,7 @@ public:
vcg::Matrix44<S> GetMatrix(S nearVal, S farVal);
/// returns the frustum
inline void GetFrustum(S & sx, S & dx, S & bt, S & tp, S & nr);
inline void GetFrustum (S & sx, S & dx, S & bt, S & tp, S & nr) const;
//--- Space transformation methods
@ -549,7 +549,7 @@ void Camera<S>::SetIsometric(S sx, S dx, S bt, S tp, S Focal, vcg::Point2<int> V
/// returns the frustum
template<class S>
void Camera<S>:: GetFrustum( S & sx, S & dx, S & bt, S & tp, S & nr)
void Camera<S>:: GetFrustum ( S & sx, S & dx, S & bt, S & tp, S & nr)const
{
dx = CenterPx.X()* PixelSizeMm.X(); //scaled center
sx = -( (S)ViewportPx.X() - CenterPx.X() ) * PixelSizeMm.X();

View File

@ -139,7 +139,7 @@ static void SetGLIsometricProj(float x1, float x2, float y1, float y2, float z1,
}
/// get OpenGL-like frustum from a vcg camera (intrinsics)
static void GetFrustum(vcg::Camera<S> & intrinsics, S & sx,S & dx,S & bt,S & tp,S & f)
static void GetFrustum(vcg::Camera<S> & intrinsics, S & sx,S & dx,S & bt,S & tp,S & f) const
{
intrinsics.GetFrustum(sx,dx,bt,tp,f);
}