Add SetProperty and GetProperty to Visuals.
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / visuals / mesh / mesh-visual.h
index a07c02b..a05f848 100644 (file)
@@ -23,6 +23,7 @@
 #include <string.h>
 
 // INTERNAL INCLUDES
+#include <dali-toolkit/public-api/visuals/mesh-visual-properties.h>
 #include <dali-toolkit/internal/visuals/visual-base-impl.h>
 #include <dali-toolkit/internal/controls/model3d-view/obj-loader.h>
 
@@ -45,7 +46,7 @@ namespace Internal
  * | objectUrl       | STRING      | A URL to the .obj file                                                |
  * | materialUrl     | STRING      | A URL to the .mtl file                                                |
  * | texturesPath    | STRING      | A URL of the path to the texture images                               |
- * | shaderType      | STRING      | An enum of shader types                                               |
+ * | shadingMode     | STRING      | An enum of shading modes                                              |
  * | useMipmapping   | BOOLEAN     | If true, use mipmaps for textures. Default true.                      |
  * | useSoftNormals  | BOOLEAN     | If true, average normals at points for smooth textures. Default true. |
  * | lightPosition   | VECTOR3     | The position (on stage) of the light                                  |
@@ -69,34 +70,34 @@ public:
 public:  // from Visual
 
   /**
-   * @copydoc Visual::SetSize
+   * @copydoc Visual::Base::SetSize
    */
   virtual void SetSize( const Vector2& size );
 
   /**
-   * @copydoc Visual::SetClipRect
+   * @copydoc Visual::Base::CreatePropertyMap
    */
-  virtual void SetClipRect( const Rect<int>& clipRect );
+  virtual void DoCreatePropertyMap( Property::Map& map ) const;
 
   /**
-   * @copydoc Visual::SetOffset
+   * @copydoc Visual::Base::DoSetProperty
    */
-  virtual void SetOffset( const Vector2& offset );
+  virtual void DoSetProperty( Dali::Property::Index index, const Dali::Property::Value& propertyValue );
 
   /**
-   * @copydoc Visual::CreatePropertyMap
+   * @copydoc Visual::Base::DoGetProperty
    */
-  virtual void DoCreatePropertyMap( Property::Map& map ) const;
+  virtual Dali::Property::Value DoGetProperty( Dali::Property::Index index );
 
 protected:
 
   /**
-   * @copydoc Visual::DoInitialize
+   * @copydoc Visual::Base::DoInitialize
    */
   virtual void DoInitialize( Actor& actor, const Property::Map& propertyMap );
 
   /**
-   * @copydoc Visual::DoSetOnStage
+   * @copydoc Visual::Base::DoSetOnStage
    */
   virtual void DoSetOnStage( Actor& actor );
 
@@ -116,14 +117,6 @@ public:
 
 private:
 
-  //Corresponds to the shader that will be used by the mesh visual.
-  enum ShaderType
-  {
-    TEXTURELESS,
-    DIFFUSE_TEXTURE,
-    ALL_TEXTURES
-  };
-
   /**
    * @brief Provide an empty geometry for the visual to use.
    * @details For use in error cases where the initialisation has failed for varying reasons.
@@ -196,7 +189,7 @@ private:
   Vector3 mSceneSize;
 
   Vector3 mLightPosition;
-  ShaderType mShaderType;
+  Toolkit::MeshVisual::ShadingMode::Value mShadingMode;
 
   bool mUseTexture;
   bool mUseMipmapping;