projects
/
platform
/
core
/
uifw
/
dali-toolkit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "TextVisual implementation." into devel/master
[platform/core/uifw/dali-toolkit.git]
/
dali-toolkit
/
internal
/
visuals
/
primitive
/
primitive-visual.h
diff --git
a/dali-toolkit/internal/visuals/primitive/primitive-visual.h
b/dali-toolkit/internal/visuals/primitive/primitive-visual.h
index
b655ee3
..
04f1d3d
100644
(file)
--- a/
dali-toolkit/internal/visuals/primitive/primitive-visual.h
+++ b/
dali-toolkit/internal/visuals/primitive/primitive-visual.h
@@
-46,7
+46,8
@@
// INTERNAL INCLUDES
// INTERNAL INCLUDES
-#include <dali-toolkit/internal/visuals/visual-impl.h>
+#include <dali-toolkit/public-api/visuals/primitive-visual-properties.h>
+#include <dali-toolkit/internal/visuals/visual-base-impl.h>
namespace Dali
{
namespace Dali
{
@@
-58,7
+59,9
@@
namespace Internal
{
/**
{
/**
- * The renderer which renders a simple 3D shape to the control's quad
+ * The visual which renders a simple 3D shape to the control's quad
+ *
+ * Primitives are created with clockwise winding and back-face culling by default.
*
* The following properties are required to create a PrimitiveRender
*
*
* The following properties are required to create a PrimitiveRender
*
@@
-83,13
+86,13
@@
namespace Internal
*
* Note: slices and stacks both have an upper limit of 255.
*
*
* Note: slices and stacks both have an upper limit of 255.
*
- * Finally, the following can be used to affect the
renderer
's shader
+ * Finally, the following can be used to affect the
visual
's shader
*
* | %Property Name | Type | Representing |
* |-----------------|-------------|-----------------------------------------|
* | lightPosition | VECTOR3 | The position (on stage) of the light |
*/
*
* | %Property Name | Type | Representing |
* |-----------------|-------------|-----------------------------------------|
* | lightPosition | VECTOR3 | The position (on stage) of the light |
*/
-class PrimitiveVisual: public Visual
+class PrimitiveVisual: public Visual
::Base
{
public:
{
public:
@@
-108,50
+111,44
@@
public:
public: // from Visual
/**
public: // from Visual
/**
- * @copydoc Visual::SetSize
+ * @copydoc Visual::
Base::
SetSize
*/
virtual void SetSize( const Vector2& size );
/**
*/
virtual void SetSize( const Vector2& size );
/**
- * @copydoc Visual::
SetClipRect
+ * @copydoc Visual::
Base::GetNaturalSize
*/
*/
- virtual void
SetClipRect( const Rect<int>& clipRect )
;
+ virtual void
GetNaturalSize( Vector2& naturalSize ) const
;
/**
/**
- * @copydoc Visual::
SetOffset
+ * @copydoc Visual::
Base::CreatePropertyMap
*/
*/
- virtual void
SetOffset( const Vector2& offset )
;
+ virtual void
DoCreatePropertyMap( Property::Map& map ) const
;
/**
/**
- * @copydoc Visual::
CreatePropertyMap
+ * @copydoc Visual::
Base::DoSetProperty
*/
*/
- virtual void DoCreatePropertyMap( Property::Map& map ) const;
+ virtual void DoSetProperty( Dali::Property::Index index, const Dali::Property::Value& propertyValue );
+
+ /**
+ * @copydoc Visual::Base::DoGetProperty
+ */
+ virtual Dali::Property::Value DoGetProperty( Dali::Property::Index index );
protected:
/**
protected:
/**
- * @copydoc Visual::DoInitialize
+ * @copydoc Visual::
Base::
DoInitialize
*/
virtual void DoInitialize( Actor& actor, const Property::Map& propertyMap );
/**
*/
virtual void DoInitialize( Actor& actor, const Property::Map& propertyMap );
/**
- * @copydoc Visual::DoSetOnStage
+ * @copydoc Visual::
Base::
DoSetOnStage
*/
virtual void DoSetOnStage( Actor& actor );
private:
*/
virtual void DoSetOnStage( Actor& actor );
private:
- enum PrimitiveType
- {
- SPHERE,
- CONE,
- CONICAL_FRUSTRUM,
- CYLINDER,
- CUBE,
- OCTAHEDRON,
- BEVELLED_CUBE
- };
-
//Simple struct to store the position and normal of a single vertex.
struct Vertex
{
//Simple struct to store the position and normal of a single vertex.
struct Vertex
{
@@
-319,7
+316,6
@@
private:
Shader mShader;
Geometry mGeometry;
Shader mShader;
Geometry mGeometry;
- std::string mShape; //Shape to render, as string.
Vector4 mColor; //Color of shape.
Vector3 mObjectDimensions; //Dimensions of shape, scaled to be between 0.0 and 1.0.
Vector4 mColor; //Color of shape.
Vector3 mObjectDimensions; //Dimensions of shape, scaled to be between 0.0 and 1.0.
@@
-340,7
+336,7
@@
private:
int mSlices; ///< Number of slices to use when creating certain objects.
int mStacks; ///< Number of stacks to use when creating certain objects.
int mSlices; ///< Number of slices to use when creating certain objects.
int mStacks; ///< Number of stacks to use when creating certain objects.
-
Primitive
Type mPrimitiveType; //Shape to render, as enum.
+
Toolkit::PrimitiveVisual::Shape::
Type mPrimitiveType; //Shape to render, as enum.
};
} // namespace Internal
};
} // namespace Internal