X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fupdate%2Frender-tasks%2Fscene-graph-camera.h;h=f61ddc6ab557480eb36be3dcf14c3cdef8df9fe6;hb=8f612650d20752ab6aba022a9dbefdb883968e8f;hp=a3bc173d43cddb4e7f4c8a7248bbf43915aafd1b;hpb=3040ae54a97a867f4ad9b9ef98d759f038f16cf6;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..f61ddc6 100644 --- a/dali/internal/update/render-tasks/scene-graph-camera.h +++ b/dali/internal/update/render-tasks/scene-graph-camera.h @@ -100,6 +100,12 @@ public: void SetNode( const Node* node ); /** + * Get the node this scene graph camera belongs to. + * @return node The owning node. + */ + const Node* GetNode() const; + + /** * @copydoc Dali::Internal::CameraActor::SetType */ void SetType( Dali::Camera::Type type ); @@ -155,6 +161,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 +229,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 +307,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 +336,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 }; @@ -324,7 +344,7 @@ public: // PROPERTIES inline void SetTypeMessage( EventThreadServices& eventThreadServices, const Camera& camera, Dali::Camera::Type parameter ) { - typedef MessageValue1< Camera, Dali::Camera::Type > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -335,7 +355,7 @@ inline void SetTypeMessage( EventThreadServices& eventThreadServices, const Came inline void SetProjectionModeMessage( EventThreadServices& eventThreadServices, const Camera& camera, Dali::Camera::ProjectionMode parameter ) { - typedef MessageValue1< Camera, Dali::Camera::ProjectionMode > LocalProjectionMode; + using LocalProjectionMode = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalProjectionMode ) ); @@ -346,7 +366,7 @@ inline void SetProjectionModeMessage( EventThreadServices& eventThreadServices, inline void SetFieldOfViewMessage( EventThreadServices& eventThreadServices, const Camera& camera, float parameter ) { - typedef MessageValue1< Camera, float > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -357,7 +377,7 @@ inline void SetFieldOfViewMessage( EventThreadServices& eventThreadServices, con inline void SetAspectRatioMessage( EventThreadServices& eventThreadServices, const Camera& camera, float parameter ) { - typedef MessageValue1< Camera, float > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -368,7 +388,7 @@ inline void SetAspectRatioMessage( EventThreadServices& eventThreadServices, con inline void SetLeftClippingPlaneMessage( EventThreadServices& eventThreadServices, const Camera& camera, float parameter ) { - typedef MessageValue1< Camera, float > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -379,7 +399,7 @@ inline void SetLeftClippingPlaneMessage( EventThreadServices& eventThreadService inline void SetRightClippingPlaneMessage( EventThreadServices& eventThreadServices, const Camera& camera, float parameter ) { - typedef MessageValue1< Camera, float > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -390,7 +410,7 @@ inline void SetRightClippingPlaneMessage( EventThreadServices& eventThreadServic inline void SetTopClippingPlaneMessage( EventThreadServices& eventThreadServices, const Camera& camera, float parameter ) { - typedef MessageValue1< Camera, float > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -401,7 +421,7 @@ inline void SetTopClippingPlaneMessage( EventThreadServices& eventThreadServices inline void SetBottomClippingPlaneMessage( EventThreadServices& eventThreadServices, const Camera& camera, float parameter ) { - typedef MessageValue1< Camera, float > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -412,7 +432,7 @@ inline void SetBottomClippingPlaneMessage( EventThreadServices& eventThreadServi inline void SetNearClippingPlaneMessage( EventThreadServices& eventThreadServices, const Camera& camera, float parameter ) { - typedef MessageValue1< Camera, float > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -423,7 +443,7 @@ inline void SetNearClippingPlaneMessage( EventThreadServices& eventThreadService inline void SetFarClippingPlaneMessage( EventThreadServices& eventThreadServices, const Camera& camera, float parameter ) { - typedef MessageValue1< Camera, float > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -434,7 +454,7 @@ inline void SetFarClippingPlaneMessage( EventThreadServices& eventThreadServices inline void SetTargetPositionMessage( EventThreadServices& eventThreadServices, const Camera& camera, const Vector3& parameter ) { - typedef MessageValue1< Camera, Vector3 > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -445,7 +465,7 @@ inline void SetTargetPositionMessage( EventThreadServices& eventThreadServices, inline void SetInvertYAxisMessage( EventThreadServices& eventThreadServices, const Camera& camera, bool parameter ) { - typedef MessageValue1< Camera, bool > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -454,6 +474,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