diff --git a/include/cinder/Camera.h b/include/cinder/Camera.h index 73cc7bd924..56007c4589 100644 --- a/include/cinder/Camera.h +++ b/include/cinder/Camera.h @@ -138,9 +138,11 @@ class CI_API Camera { protected: Camera() - : mModelViewCached( false ), mProjectionCached( false ), mInverseModelViewCached( false ), mWorldUp( vec3( 0, 1, 0 ) ), - mPivotDistance( 0 ) - {} + : mWorldUp( vec3( 0, 1, 0 ) ), mFov( 35 ), mAspectRatio( 1 ), mNearClip( 0.1f ), mFarClip( 1000 ) + , mPivotDistance( 1 ), mProjectionCached( false ), mModelViewCached( false ), mInverseModelViewCached( false ) + , mFrustumLeft( -1 ), mFrustumRight( 1 ), mFrustumTop( 1 ), mFrustumBottom( -1 ) + { + } void calcMatrices() const; diff --git a/src/cinder/Camera.cpp b/src/cinder/Camera.cpp index 9d75cfa4e5..7721c299b1 100644 --- a/src/cinder/Camera.cpp +++ b/src/cinder/Camera.cpp @@ -244,14 +244,12 @@ void Camera::calcInverseView() const // CameraPersp // Creates a default camera resembling Maya Persp CameraPersp::CameraPersp() - : Camera() { lookAt( vec3( 28, 21, 28 ), vec3(), vec3( 0, 1, 0 ) ); setPerspective( 35, 1.3333f, 0.1f, 1000 ); } CameraPersp::CameraPersp( int pixelWidth, int pixelHeight, float fovDegrees ) - : Camera() { float eyeX = pixelWidth / 2.0f; float eyeY = pixelHeight / 2.0f; @@ -267,7 +265,6 @@ CameraPersp::CameraPersp( int pixelWidth, int pixelHeight, float fovDegrees ) } CameraPersp::CameraPersp( int pixelWidth, int pixelHeight, float fovDegrees, float nearPlane, float farPlane ) - : Camera() { float halfFov, theTan, aspect; @@ -386,14 +383,12 @@ CameraPersp CameraPersp::calcFraming( const Sphere &worldSpaceSphere ) const //////////////////////////////////////////////////////////////////////////////////////// // CameraOrtho CameraOrtho::CameraOrtho() - : Camera() { lookAt( vec3( 0, 0, 0.1f ), vec3(), vec3( 0, 1, 0 ) ); setFov( 35 ); } CameraOrtho::CameraOrtho( float left, float right, float bottom, float top, float nearPlane, float farPlane ) - : Camera() { mFrustumLeft = left; mFrustumRight = right;