Revert "[Tizen] Add screen and client rotation itself function"
[platform/core/uifw/dali-core.git] / dali / internal / update / render-tasks / scene-graph-camera.h
index 37aead6..a3bc173 100644 (file)
@@ -155,14 +155,24 @@ public:
   void SetFarClippingPlane( float farClippingPlane );
 
   /**
-   * @copydoc Dali::Internal::CameraActor::RotateProjection
+   * @copydoc Dali::Internal::CameraActor::SetTarget
    */
-  void RotateProjection( int rotationAngle );
+  void SetTargetPosition( const Vector3& targetPosition );
 
   /**
-   * @copydoc Dali::Internal::CameraActor::SetTarget
+   * Sets the reflection plane
+   * @param[in] plane reflection plane
    */
-  void SetTargetPosition( const Vector3& targetPosition );
+  void SetReflectByPlane( const Vector4& plane );
+
+  /**
+   * Tests whether reflection is used
+   * @return True if used, False otherwise
+   */
+  bool GetReflectionUsed() const
+  {
+    return mUseReflection;
+  }
 
   /**
    * Retrieve the view-matrix; this is double buffered for input handling.
@@ -208,13 +218,6 @@ 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.
@@ -277,9 +280,15 @@ private:
    */
   void UpdateFrustum( BufferIndex updateBufferIndex, bool normalize = true );
 
+  /**
+   * Adjust near plane for reflection
+   * @param perspective Perspective matrix
+   * @param clipPlane Clipping plane
+   */
+  void AdjustNearPlaneForPerspective( Matrix& perspective, const Vector4& clipPlane );
+
   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
@@ -297,12 +306,17 @@ public:  // PROPERTIES
   float                         mFarClippingPlane;
   Vector3                       mTargetPosition;
 
+  Dali::Matrix                  mReflectionMtx;
+  Dali::Vector4                 mReflectionPlane;
+  Dali::Vector4                 mReflectionEye;
+  bool                          mUseReflection{ false };
+  bool                          mUseReflectionClip{ false };
+
   InheritedMatrix mViewMatrix;           ///< The viewMatrix; this is double buffered for input handling.
   InheritedMatrix mProjectionMatrix;     ///< The projectionMatrix; this is double buffered for input handling.
 
   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
 
 };
 
@@ -440,17 +454,6 @@ 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