use modern construct 'override' in the derive class.
[platform/core/uifw/dali-core.git] / dali / internal / event / actors / camera-actor-impl.h
index 5ffa230..4463ba1 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef __DALI_INTERNAL_CAMERA_ACTOR_H__
-#define __DALI_INTERNAL_CAMERA_ACTOR_H__
+#ifndef DALI_INTERNAL_CAMERA_ACTOR_H
+#define DALI_INTERNAL_CAMERA_ACTOR_H
 
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -31,11 +31,11 @@ namespace Internal
 
 namespace SceneGraph
 {
-class CameraAttachment;
+class Camera;
 }
 
 /**
- * An actor with CameraAttachment.
+ * An actor with Camera.
  */
 class CameraActor : public Actor
 {
@@ -53,6 +53,15 @@ public:
   static CameraActorPtr New( const Size& size );
 
   /**
+   * Sets the reflection plane for the camera
+   *
+   * @param[in] plane Plane parameters
+   *
+   * @note plane.xyz are normal vector of the plane.
+   */
+  void SetReflectByPlane( const Vector4& plane );
+
+  /**
    * @copydoc Dali::CameraActor::SetTargetPosition
    */
   void SetTarget( const Vector3& targetPosition );
@@ -154,9 +163,8 @@ public:
 
   /**
    * @copydoc Dali::CameraActor::SetPerspectiveProjection()
-   * @param[in] stereoBias The frustum horizontal and vertical offset for stereoscopic cameras
    */
-  void SetPerspectiveProjection( const Size& size, const Vector2& stereoBias = Vector2::ZERO );
+  void SetPerspectiveProjection( const Size& size );
 
   /**
    * @copydoc Dali::CameraActor::SetOrthographicProjection(const Vector2& size);
@@ -190,85 +198,64 @@ public:
    */
   const Matrix& GetProjectionMatrix() const;
 
-public: // properties
-
   /**
-   * copydoc Dali::Internal::Object
+   * Return the scene graph camera (for RenderTask)
+   * @return The scene graph camera.
    */
-  virtual unsigned int GetDefaultPropertyCount() const;
+  const SceneGraph::Camera* GetCamera() const;
 
-  /**
-   * @copydoc Dali::Internal::Object::GetDefaultPropertyIndices()
-   */
-  virtual void GetDefaultPropertyIndices( Property::IndexContainer& indices ) const;
-
-  /**
-   * copydoc Dali::Internal::Object
-   */
-  virtual bool IsDefaultPropertyAnimatable( Property::Index index ) const;
-
-  /**
-   * @copydoc Dali::Internal::Object::IsDefaultPropertyAConstraintInput()
-   */
-  virtual bool IsDefaultPropertyAConstraintInput( Property::Index index ) const;
-
-  /**
-   * copydoc Dali::Internal::Object
-   */
-  virtual Property::Type GetDefaultPropertyType( Property::Index index ) const;
+public: // properties
 
   /**
-   * copydoc Dali::Internal::Object
+   * copydoc Dali::Internal::Object::SetDefaultProperty()
    */
-  virtual const char* GetDefaultPropertyName( Property::Index index ) const;
+  void SetDefaultProperty( Property::Index index, const Property::Value& propertyValue ) override;
 
   /**
-   * @copydoc Dali::Internal::Object::GetDefaultPropertyIndex()
+   * copydoc Dali::Internal::Object::GetDefaultProperty()
    */
-  virtual Property::Index GetDefaultPropertyIndex(const std::string& name) const;
+  Property::Value GetDefaultProperty( Property::Index index ) const override;
 
   /**
-   * copydoc Dali::Internal::Object
+   * copydoc Dali::Internal::Object::GetDefaultPropertyCurrentValue()
    */
-  virtual void SetDefaultProperty( Property::Index index, const Property::Value& propertyValue );
+  Property::Value GetDefaultPropertyCurrentValue( Property::Index index ) const override;
 
   /**
-   * copydoc Dali::Internal::Object
+   * @copydoc Dali::Internal::Object::GetSceneObjectInputProperty()
    */
-  virtual Property::Value GetDefaultProperty( Property::Index index ) const;
+  const PropertyInputImpl* GetSceneObjectInputProperty( Property::Index index ) const override;
 
-  /**
-   * copydoc Dali::Internal::Object
-   */
-  virtual bool IsDefaultPropertyWritable( Property::Index index ) const ;
+private:
 
   /**
-   * @copydoc Dali::Internal::Object::GetSceneObjectAnimatableProperty()
+   * Constructor; see also CameraActor::New()
+   * @param node the scene graph node
    */
-  virtual const SceneGraph::PropertyBase* GetSceneObjectAnimatableProperty( Property::Index index ) const;
+  CameraActor( const SceneGraph::Node& node );
 
   /**
-   * @copydoc Dali::Internal::Object::GetSceneObjectInputProperty()
+   * A reference counted object may only be deleted by calling Unreference()
    */
-  virtual const PropertyInputImpl* GetSceneObjectInputProperty( Property::Index index ) const;
+  ~CameraActor() override;
 
-private:
 
   /**
-   * Constructor; see also CameraActor::New()
+   * @copydoc Dali::Internal::Actor::OnInitialize()
    */
-  CameraActor();
+  void OnInitialize() override;
 
   /**
-   * A reference counted object may only be deleted by calling Unreference()
+   * @copydoc Dali::Internal::Actor::OnSceneConnectionInternal()
    */
-  virtual ~CameraActor();
+  void OnSceneConnectionInternal() override;
 
 private: // Data
 
-  const SceneGraph::CameraAttachment* mSceneObject; ///< Not owned
+  const SceneGraph::Camera* mSceneObject; ///< Not owned
 
   Vector3            mTarget;
+  Vector2            mCanvasSize;
   Dali::Camera::Type mType;
   Dali::Camera::ProjectionMode mProjectionMode;
   float              mFieldOfView;
@@ -307,4 +294,4 @@ inline const Internal::CameraActor& GetImplementation(const Dali::CameraActor& c
 
 } // namespace Dali
 
-#endif // __DALI_INTERNAL_CAMERA_ACTOR_H__
+#endif // DALI_INTERNAL_CAMERA_ACTOR_H