// 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
{
/**
* 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
*
* | %Property Name | Type |
* |-----------------|-------------|-----------------------------------------|
* | lightPosition | VECTOR3 | The position (on stage) of the light |
*/
-class PrimitiveVisual: public Visual
+class PrimitiveVisual: public Visual::Base
{
public:
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
{
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.
int mSlices; ///< Number of slices to use when creating certain objects.
int mStacks; ///< Number of stacks to use when creating certain objects.
- PrimitiveType mPrimitiveType; //Shape to render, as enum.
+ Toolkit::PrimitiveVisual::Shape::Type mPrimitiveType; //Shape to render, as enum.
};
} // namespace Internal