X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fupdate%2Frender-tasks%2Fscene-graph-camera.cpp;h=71a2d52f1afc21d7a9f07237ad7109dc73763dfc;hb=d424b198a9564585ee7d8b75f1979a5ec2dfc134;hp=c3dc3c5fd5909c286e7bb4b349c93747d347f100;hpb=78237f8da512fbbc31a23ef0e5fd15c749eae0f3;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/update/render-tasks/scene-graph-camera.cpp b/dali/internal/update/render-tasks/scene-graph-camera.cpp index c3dc3c5..71a2d52 100644 --- a/dali/internal/update/render-tasks/scene-graph-camera.cpp +++ b/dali/internal/update/render-tasks/scene-graph-camera.cpp @@ -161,7 +161,6 @@ const Vector3 Camera::DEFAULT_TARGET_POSITION( 0.0f, 0.0f, 0.0f ); Camera::Camera() : mUpdateViewFlag( UPDATE_COUNT ), mUpdateProjectionFlag( UPDATE_COUNT ), - mProjectionRotation( 0 ), mNode( NULL ), mType( DEFAULT_TYPE ), mProjectionMode( DEFAULT_MODE ), @@ -177,8 +176,7 @@ Camera::Camera() mTargetPosition( DEFAULT_TARGET_POSITION ), mViewMatrix(), mProjectionMatrix(), - mInverseViewProjection( Matrix::IDENTITY ), - mFinalProjection( Matrix::IDENTITY ) + mInverseViewProjection( Matrix::IDENTITY ) { } @@ -267,6 +265,8 @@ void Camera::SetTargetPosition( const Vector3& targetPosition ) mUpdateViewFlag = UPDATE_COUNT; } + + void VectorReflectedByPlane(Vector4 &out, Vector4 &in, Vector4 &plane) { float d = float(2.0) * plane.Dot(in); @@ -328,12 +328,6 @@ void Camera::SetReflectByPlane( const Vector4& plane ) mUpdateViewFlag = UPDATE_COUNT; } -void Camera::RotateProjection( int rotationAngle ) -{ - mProjectionRotation = rotationAngle; - mUpdateViewFlag = UPDATE_COUNT; -} - const Matrix& Camera::GetProjectionMatrix( BufferIndex bufferIndex ) const { return mProjectionMatrix[ bufferIndex ]; @@ -349,11 +343,6 @@ const Matrix& Camera::GetInverseViewProjectionMatrix( BufferIndex bufferIndex ) return mInverseViewProjection[ bufferIndex ]; } -const Matrix& Camera::GetFinalProjectionMatrix( BufferIndex bufferIndex ) const -{ - return mFinalProjection[ bufferIndex ]; -} - const PropertyInputImpl* Camera::GetProjectionMatrix() const { return &mProjectionMatrix; @@ -663,38 +652,6 @@ uint32_t Camera::UpdateProjection( BufferIndex updateBufferIndex ) } mProjectionMatrix.SetDirty( updateBufferIndex ); - - Matrix &finalProjection = mFinalProjection[ updateBufferIndex ]; - finalProjection.SetIdentity(); - - Quaternion rotationAngle; - switch( mProjectionRotation ) - { - case 90: - { - rotationAngle = Quaternion( Dali::ANGLE_90, Vector3::ZAXIS ); - break; - } - case 180: - { - rotationAngle = Quaternion( Dali::ANGLE_180, Vector3::ZAXIS ); - break; - } - case 270: - { - rotationAngle = Quaternion( Dali::ANGLE_270, Vector3::ZAXIS ); - break; - } - default: - rotationAngle = Quaternion( Dali::ANGLE_0, Vector3::ZAXIS ); - break; - } - - Matrix rotation; - rotation.SetIdentity(); - rotation.SetTransformComponents( Vector3( 1.0f, 1.0f, 1.0f ), rotationAngle, Vector3( 0.0f, 0.0f, 0.0f ) ); - - Matrix::Multiply( finalProjection, mProjectionMatrix.Get( updateBufferIndex ), rotation ); } --mUpdateProjectionFlag; }