@@ -43,21 +43,21 @@ namespace cinder {
4343void Camera::setEyePoint ( const vec3 &eyePoint )
4444{
4545 mEyePoint = eyePoint;
46- mModelViewCached = false ;
46+ dirtyViewCaches () ;
4747}
4848
4949void Camera::setViewDirection ( const vec3 &viewDirection )
5050{
5151 mViewDirection = normalize ( viewDirection );
5252 mOrientation = glm::rotation ( mViewDirection , glm::vec3 ( 0 , 0 , -1 ) );
53- mModelViewCached = false ;
53+ dirtyViewCaches () ;
5454}
5555
5656void Camera::setOrientation ( const quat &orientation )
5757{
5858 mOrientation = glm::normalize ( orientation );
5959 mViewDirection = glm::rotate ( mOrientation , glm::vec3 ( 0 , 0 , -1 ) );
60- mModelViewCached = false ;
60+ dirtyViewCaches () ;
6161}
6262
6363// Derived from math presented in http://paulbourke.net/miscellaneous/lens/
@@ -70,15 +70,15 @@ void Camera::setWorldUp( const vec3 &worldUp )
7070{
7171 mWorldUp = normalize ( worldUp );
7272 mOrientation = glm::toQuat ( alignZAxisWithTarget ( -mViewDirection , worldUp ) );
73- mModelViewCached = false ;
73+ dirtyViewCaches () ;
7474}
7575
7676void Camera::lookAt ( const vec3 &target )
7777{
7878 mViewDirection = normalize ( target - mEyePoint );
7979 mOrientation = glm::toQuat ( alignZAxisWithTarget ( -mViewDirection , mWorldUp ) );
8080 mPivotDistance = distance ( target, mEyePoint );
81- mModelViewCached = false ;
81+ dirtyViewCaches () ;
8282}
8383
8484void Camera::lookAt ( const vec3 &eyePoint, const vec3 &target )
@@ -87,7 +87,7 @@ void Camera::lookAt( const vec3 &eyePoint, const vec3 &target )
8787 mViewDirection = normalize ( target - mEyePoint );
8888 mOrientation = quat ( glm::toQuat ( alignZAxisWithTarget ( -mViewDirection , mWorldUp ) ) );
8989 mPivotDistance = distance ( target, mEyePoint );
90- mModelViewCached = false ;
90+ dirtyViewCaches () ;
9191}
9292
9393void Camera::lookAt ( const vec3 &eyePoint, const vec3 &target, const vec3 &aWorldUp )
@@ -97,7 +97,7 @@ void Camera::lookAt( const vec3 &eyePoint, const vec3 &target, const vec3 &aWorl
9797 mViewDirection = normalize ( target - mEyePoint );
9898 mOrientation = glm::toQuat ( alignZAxisWithTarget ( -mViewDirection , mWorldUp ) );
9999 mPivotDistance = distance ( target, mEyePoint );
100- mModelViewCached = false ;
100+ dirtyViewCaches () ;
101101}
102102
103103void Camera::getFrustum ( float *left, float *top, float *right, float *bottom, float *near, float *far ) const
0 commit comments