X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fupdate%2Frender-tasks%2Fscene-graph-camera.h;h=7021b5a58c4fda6777c5ee824b9a09fa90eaec42;hb=b067b6f30c7b8cfdaea9c39f7d2375ccb4e7fa81;hp=a3bc173d43cddb4e7f4c8a7248bbf43915aafd1b;hpb=353b9c30a0e93abc10ff49ed7921030e4ebaf304;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/update/render-tasks/scene-graph-camera.h b/dali/internal/update/render-tasks/scene-graph-camera.h index a3bc173..7021b5a 100644 --- a/dali/internal/update/render-tasks/scene-graph-camera.h +++ b/dali/internal/update/render-tasks/scene-graph-camera.h @@ -155,6 +155,11 @@ public: void SetFarClippingPlane( float farClippingPlane ); /** + * @copydoc Dali::Internal::CameraActor::RotateProjection + */ + void RotateProjection( int rotationAngle ); + + /** * @copydoc Dali::Internal::CameraActor::SetTarget */ void SetTargetPosition( const Vector3& targetPosition ); @@ -218,6 +223,13 @@ public: const Matrix& GetInverseViewProjectionMatrix( BufferIndex bufferIndex ) const; /** + * Retrieve the final projection-matrix; this is double buffered for input handling. + * @param[in] bufferIndex The buffer to read from. + * @return The projection-matrix that should be used to render. + */ + const Matrix& GetFinalProjectionMatrix( BufferIndex bufferIndex ) const; + + /** * Retrieve the projection-matrix property querying interface. * @pre The camera is on-stage. * @return The projection-matrix property querying interface. @@ -289,6 +301,7 @@ private: uint32_t mUpdateViewFlag; ///< This is non-zero if the view matrix requires an update uint32_t mUpdateProjectionFlag; ///< This is non-zero if the projection matrix requires an update + int mProjectionRotation; ///< The rotaion angle of the projection const Node* mNode; ///< The node this scene graph camera belongs to public: // PROPERTIES @@ -317,6 +330,7 @@ public: // PROPERTIES DoubleBuffered< FrustumPlanes > mFrustum; ///< Clipping frustum; double buffered for input handling DoubleBuffered< Matrix > mInverseViewProjection; ///< Inverted viewprojection; double buffered for input handling + DoubleBuffered< Matrix > mFinalProjection; ///< Final projection matrix; double buffered for input handling }; @@ -454,6 +468,17 @@ inline void SetInvertYAxisMessage( EventThreadServices& eventThreadServices, con new (slot) LocalType( &camera, &Camera::SetInvertYAxis, parameter ); } +inline void RotateProjectionMessage( EventThreadServices& eventThreadServices, const Camera& camera, int parameter ) +{ + typedef MessageValue1< Camera, int > LocalType; + + // Reserve some memory inside the message queue + unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); + + // Construct message in the message queue memory; note that delete should not be called on the return value + new (slot) LocalType( &camera, &Camera::RotateProjection, parameter ); +} + } // namespace SceneGraph } // namespace Internal