Tizen Native API  6.5

Geometry is handle to an object that can be used to define a geometric elements. More...

Inheritance diagram for Dali::Geometry:
Dali::BaseHandle

Public Types

enum  Type
 Enumeration for the description of the type of geometry, used to determine how the coordinates will be used. More...

Public Member Functions

 Geometry ()
 Default constructor, creates an empty handle.
 ~Geometry ()
 Destructor.
 Geometry (const Geometry &handle)
 Copy constructor, creates a new handle to the same object.
Geometryoperator= (const Geometry &handle)
 Assignment operator, changes this handle to point at the same object.
std::size_t AddVertexBuffer (PropertyBuffer &vertexBuffer)
 Adds a PropertyBuffer to be used as source of geometry vertices.
std::size_t GetNumberOfVertexBuffers () const
 Retrieves the number of vertex buffers that have been added to this geometry.
void RemoveVertexBuffer (std::size_t index)
 Removes a vertex buffer. The index must be between 0 and GetNumberOfVertexBuffers().
void SetIndexBuffer (const uint16_t *indices, size_t count)
 Sets a the index data to be used as a source of indices for the geometry Setting this buffer will cause the geometry to be rendered using indices. To unset call SetIndexBuffer with a null pointer or count 0.
void SetType (Type geometryType)
 Sets the type of primitives this geometry contains.
Type GetType () const
 Gets the type of primitives this geometry contains. Calling this function sets the property GEOMETRY_TYPE.
 Geometry (Internal::Geometry *pointer)
 The constructor.

Static Public Member Functions

static Geometry New ()
 Creates a new Geometry object.
static Geometry DownCast (BaseHandle handle)
 Downcasts to a geometry. If not, the returned handle is left uninitialized.

Detailed Description

Geometry is handle to an object that can be used to define a geometric elements.

Since:
3.0, DALi version 1.1.43

Member Enumeration Documentation

Enumeration for the description of the type of geometry, used to determine how the coordinates will be used.

Since:
3.0, DALi version 1.1.45
Enumerator:
POINTS 

Individual points.

Since:
3.0, DALi version 1.1.45
LINES 

Individual lines (made of 2 points each)

Since:
3.0, DALi version 1.1.45
LINE_LOOP 

A strip of lines (made of 1 point each) which also joins the first and last point.

Since:
3.0, DALi version 1.1.45
LINE_STRIP 

A strip of lines (made of 1 point each)

Since:
3.0, DALi version 1.1.45
TRIANGLES 

Individual triangles (made of 3 points each)

Since:
3.0, DALi version 1.1.45
TRIANGLE_FAN 

A fan of triangles around a centre point (after the first triangle, following triangles need only 1 point)

Since:
3.0, DALi version 1.1.45
TRIANGLE_STRIP 

A strip of triangles (after the first triangle, following triangles need only 1 point)

Since:
3.0, DALi version 1.1.45

Constructor & Destructor Documentation

Default constructor, creates an empty handle.

Since:
3.0, DALi version 1.1.43

Destructor.

Since:
3.0, DALi version 1.1.43
Dali::Geometry::Geometry ( const Geometry handle)

Copy constructor, creates a new handle to the same object.

Since:
3.0, DALi version 1.1.43
Parameters:
[in]handleHandle to an object
Dali::Geometry::Geometry ( Internal::Geometry *  pointer) [explicit]

The constructor.

Note:
Not intended for application developers.
Since:
3.0, DALi version 1.1.43
Parameters:
[in]pointerA pointer to a newly allocated Geometry

Member Function Documentation

std::size_t Dali::Geometry::AddVertexBuffer ( PropertyBuffer vertexBuffer)

Adds a PropertyBuffer to be used as source of geometry vertices.

Since:
3.0, DALi version 1.1.43
Parameters:
[in]vertexBufferPropertyBuffer to be used as source of geometry vertices
Returns:
Index of the newly added buffer, can be used with RemoveVertexBuffer to remove this buffer if no longer required
static Geometry Dali::Geometry::DownCast ( BaseHandle  handle) [static]

Downcasts to a geometry. If not, the returned handle is left uninitialized.

Since:
3.0, DALi version 1.1.43
Parameters:
[in]handleHandle to an object
Returns:
Geometry handle or an uninitialized handle

Retrieves the number of vertex buffers that have been added to this geometry.

Since:
3.0, DALi version 1.1.43
Returns:
Number of vertex buffers that have been added to this geometry

Gets the type of primitives this geometry contains. Calling this function sets the property GEOMETRY_TYPE.

Since:
3.0, DALi version 1.1.43
Returns:
Type of primitives this geometry contains
static Geometry Dali::Geometry::New ( ) [static]

Creates a new Geometry object.

Since:
3.0, DALi version 1.1.43
Returns:
A handle to a newly allocated Geometry object
Geometry& Dali::Geometry::operator= ( const Geometry handle)

Assignment operator, changes this handle to point at the same object.

Since:
3.0, DALi version 1.1.43
Parameters:
[in]handleHandle to an object
Returns:
Reference to the assigned object
void Dali::Geometry::RemoveVertexBuffer ( std::size_t  index)

Removes a vertex buffer. The index must be between 0 and GetNumberOfVertexBuffers().

Since:
3.0, DALi version 1.1.43
Parameters:
[in]indexIndex to the vertex buffer to remove
void Dali::Geometry::SetIndexBuffer ( const uint16_t *  indices,
size_t  count 
)

Sets a the index data to be used as a source of indices for the geometry Setting this buffer will cause the geometry to be rendered using indices. To unset call SetIndexBuffer with a null pointer or count 0.

Since:
3.0, DALi version 1.1.43
Parameters:
[in]indicesArray of indices
[in]countNumber of indices in the array
void Dali::Geometry::SetType ( Type  geometryType)

Sets the type of primitives this geometry contains.

Since:
3.0, DALi version 1.1.43
Parameters:
[in]geometryTypeType of primitives this geometry contains