Dali 3D User Interface Engine
List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions
Dali::Geometry Class Reference

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

#include <geometry.h>

Inheritance diagram for Dali::Geometry:
Inheritance graph
[legend]
Collaboration diagram for Dali::Geometry:
Collaboration graph
[legend]

Classes

struct  Property
 An enumeration of properties belonging to the Geometry class. More...
 

Public Types

enum  GeometryType {
  POINTS, LINES, LINE_LOOP, LINE_STRIP,
  TRIANGLES, TRIANGLE_FAN, TRIANGLE_STRIP
}
 
- Public Types inherited from Dali::Handle
enum  Capability { DYNAMIC_PROPERTIES = 0x01 }
 An Handle's capabilities can be queried using Handle::Supports() .0. More...
 
- Public Types inherited from Dali::BaseHandle
typedef void(BaseHandle::* BooleanType )() const
 Pointer-to-member type. More...
 

Public Member Functions

 Geometry ()
 Default constructor, creates an empty handle. More...
 
 ~Geometry ()
 Destructor. More...
 
 Geometry (const Geometry &handle)
 Copy constructor, creates a new handle to the same object. More...
 
Geometryoperator= (const Geometry &handle)
 Assignment operator, changes this handle to point at the same object. More...
 
std::size_t AddVertexBuffer (PropertyBuffer &vertexBuffer)
 Add a PropertyBuffer to be used as source of geometry vertices. More...
 
std::size_t GetNumberOfVertexBuffers () const
 Retrieve the number of vertex buffers that have been added to this geometry. More...
 
void RemoveVertexBuffer (std::size_t index)
 Remove a vertex buffer. More...
 
void SetIndexBuffer (PropertyBuffer &indexBuffer)
 Set a PropertyBuffer to be used as a source of indices for the geometry. More...
 
void SetGeometryType (GeometryType geometryType)
 Set the type of primitives this geometry contains. More...
 
GeometryType GetGeometryType () const
 Get the type of primitives this geometry contains. More...
 
void SetRequiresDepthTesting (bool requiresDepthTest)
 Set if the geometry requires depth testing. More...
 
bool GetRequiresDepthTesting () const
 Return if the geometry requires depth testing. More...
 
DALI_INTERNAL Geometry (Internal::Geometry *pointer)
 The constructor. More...
 
- Public Member Functions inherited from Dali::Handle
 Handle (Dali::Internal::Object *handle)
 This constructor is used by Dali New() methods. More...
 
 Handle ()
 This constructor provides an uninitialized Dali::Handle. More...
 
 ~Handle ()
 Dali::Handle is intended as a base class. More...
 
 Handle (const Handle &handle)
 This copy constructor is required for (smart) pointer semantics. More...
 
Handleoperator= (const Handle &rhs)
 This assignment operator is required for (smart) pointer semantics. More...
 
bool Supports (Capability capability) const
 Query whether an handle supports a given capability. More...
 
unsigned int GetPropertyCount () const
 Query how many properties are provided by an handle. More...
 
std::string GetPropertyName (Property::Index index) const
 Query the name of a property. More...
 
Property::Index GetPropertyIndex (const std::string &name) const
 Query the index of a property. More...
 
bool IsPropertyWritable (Property::Index index) const
 Query whether a property can be set using SetProperty(). More...
 
bool IsPropertyAnimatable (Property::Index index) const
 Query whether a writable property can be the target of an animation or constraint. More...
 
bool IsPropertyAConstraintInput (Property::Index index) const
 Query whether a property can be used as in input to a constraint. More...
 
Property::Type GetPropertyType (Property::Index index) const
 Query the type of a property. More...
 
void SetProperty (Property::Index index, const Property::Value &propertyValue)
 Set the value of an existing property. More...
 
Property::Index RegisterProperty (const std::string &name, const Property::Value &propertyValue)
 Register a new animatable property. More...
 
Property::Index RegisterProperty (const std::string &name, const Property::Value &propertyValue, Property::AccessMode accessMode)
 Register a new property. More...
 
Property::Value GetProperty (Property::Index index) const
 Retrieve a property value. More...
 
template<typename T >
GetProperty (Property::Index index) const
 Convenience function for obtaining a property of a known type. More...
 
void GetPropertyIndices (Property::IndexContainer &indices) const
 Retrieve all the property indices for this object (including custom properties). More...
 
PropertyNotification AddPropertyNotification (Property::Index index, const PropertyCondition &condition)
 Add a property notification to this object. More...
 
PropertyNotification AddPropertyNotification (Property::Index index, int componentIndex, const PropertyCondition &condition)
 Add a property notification to this object. More...
 
void RemovePropertyNotification (Dali::PropertyNotification propertyNotification)
 Remove a property notification from this object. More...
 
void RemovePropertyNotifications ()
 Remove all property notifications from this object. More...
 
void RemoveConstraints ()
 Remove all constraints from an Object. More...
 
void RemoveConstraints (unsigned int tag)
 Remove all the constraint from the Object with a matching tag. More...
 
- Public Member Functions inherited from Dali::BaseHandle
 BaseHandle (Dali::BaseObject *handle)
 This constructor is used by Dali New() methods. More...
 
 BaseHandle ()
 This constructor provides an uninitialized Dali::BaseHandle. More...
 
 ~BaseHandle ()
 Dali::BaseHandle is intended as a base class. More...
 
 BaseHandle (const BaseHandle &handle)
 This copy constructor is required for (smart) pointer semantics. More...
 
BaseHandleoperator= (const BaseHandle &rhs)
 This assignment operator is required for (smart) pointer semantics. More...
 
template<class T >
bool ConnectSignal (ConnectionTrackerInterface *connectionTracker, const std::string &signalName, const T &functor)
 Connects a void() functor to a specified signal. More...
 
bool DoAction (const std::string &actionName, const Property::Map &attributes)
 Perform action on this object with the given action name and attributes. More...
 
const std::string & GetTypeName () const
 Returns the type name for the Handle. More...
 
bool GetTypeInfo (Dali::TypeInfo &info) const
 Returns the type info for the Handle. More...
 
BaseObjectGetBaseObject ()
 Retrieve the internal Dali resource. More...
 
const BaseObjectGetBaseObject () const
 Retrieve the internal Dali resource. More...
 
void Reset ()
 Resets the handle. More...
 
 operator BooleanType () const
 Converts an handle to a BooleanType. More...
 
bool operator== (const BaseHandle &rhs) const
 Equality operator overload. More...
 
bool operator!= (const BaseHandle &rhs) const
 Inequality operator overload. More...
 
Dali::RefObjectGetObjectPtr () const
 Get the reference counted object pointer. More...
 

Static Public Member Functions

static Geometry New ()
 Creates a new Geometry object. More...
 
static Geometry DownCast (BaseHandle handle)
 Downcast to a geometry. More...
 
- Static Public Member Functions inherited from Dali::Handle
static Handle New ()
 Create a new object. More...
 
static Handle DownCast (BaseHandle handle)
 Downcast to a handle. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Dali::BaseHandle
void ThisIsSaferThanReturningVoidStar () const
 Used by the safe bool idiom. More...
 

Detailed Description

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

Definition at line 40 of file geometry.h.

Member Enumeration Documentation

Enumerator
POINTS 
LINES 
LINE_LOOP 
LINE_STRIP 
TRIANGLES 
TRIANGLE_FAN 
TRIANGLE_STRIP 

Definition at line 44 of file geometry.h.

Constructor & Destructor Documentation

Dali::Geometry::Geometry ( )

Default constructor, creates an empty handle.

Definition at line 33 of file geometry.cpp.

Referenced by DownCast(), and New().

Here is the caller graph for this function:

Dali::Geometry::~Geometry ( )

Destructor.

Definition at line 37 of file geometry.cpp.

Dali::Geometry::Geometry ( const Geometry handle)

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

Parameters
[in]handleHandle to an object

Definition at line 41 of file geometry.cpp.

Dali::Geometry::Geometry ( Internal::Geometry pointer)
explicit

The constructor.

Parameters
[in]pointerA pointer to a newly allocated Geometry

Definition at line 99 of file geometry.cpp.

Member Function Documentation

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

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

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

Definition at line 57 of file geometry.cpp.

References DALI_ASSERT_ALWAYS, and Dali::GetImplementation().

Referenced by Dali::Toolkit::Internal::BorderRenderer::CreateBorderGeometry(), Dali::Toolkit::Internal::CreateBouncingEffectActor(), CreateGeometry(), Dali::Toolkit::Internal::ObjLoader::CreateGeometry(), Dali::Toolkit::Internal::BubbleEmitter::CreateGeometry(), Dali::Toolkit::Text::AtlasRenderer::Impl::CreateMeshActor(), Dali::Toolkit::Internal::anonymous_namespace{cube-transition-effect-impl.cpp}::CreateQuadGeometry(), Dali::Toolkit::Internal::RendererFactoryCache::CreateQuadGeometry(), Dali::CreateQuadGeometryFromBuffer(), Dali::Toolkit::Internal::DebugRenderer::CreateQuadWireframeGeometry(), Dali::Toolkit::Internal::anonymous_namespace{image-renderer.cpp}::GenerateGeometry(), Dali::Toolkit::Internal::anonymous_namespace{npatch-renderer.cpp}::GenerateGeometry(), Dali::Toolkit::Text::Decorator::Impl::UpdateHighlight(), UtcDaliGeometryAddVertexBuffer(), UtcDaliGeometryGetNumberOfVertexBuffers(), UtcDaliGeometryRemoveVertexBuffer(), UtcDaliGeometrySetGetGeometryType01(), UtcDaliGeometrySetGetGeometryType02(), UtcDaliGeometrySetIndexBuffer(), UtcDaliPropertyBufferSetData01(), and UtcDaliPropertyBufferSetData02().

Here is the call graph for this function:

Here is the caller graph for this function:

Geometry Dali::Geometry::DownCast ( BaseHandle  handle)
static

Downcast to a geometry.

If not the returned handle is left uninitialized.

Parameters
[in]handleto an object
Returns
geometry handle or an uninitialized handle

Definition at line 46 of file geometry.cpp.

References Geometry(), and Dali::BaseHandle::GetObjectPtr().

Referenced by UtcDaliGeometryDownCast01(), and UtcDaliGeometryDownCast02().

Here is the call graph for this function:

Here is the caller graph for this function:

Geometry::GeometryType Dali::Geometry::GetGeometryType ( ) const

Get the type of primitives this geometry contains.

Calling this function sets the property GEOMETRY_TYPE

Returns
Type of primitives this geometry contains

Definition at line 84 of file geometry.cpp.

References Dali::GetImplementation().

Referenced by anonymous_namespace{utc-Dali-DebugRenderer.cpp}::IsDebugRenderer(), UtcDaliGeometrySetGetGeometryType01(), and UtcDaliGeometrySetGetGeometryType02().

Here is the call graph for this function:

Here is the caller graph for this function:

std::size_t Dali::Geometry::GetNumberOfVertexBuffers ( ) const

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

Returns
Number of vertex buffers that have been added to this geometry

Definition at line 63 of file geometry.cpp.

References Dali::GetImplementation().

Referenced by UtcDaliGeometryGetNumberOfVertexBuffers(), and UtcDaliGeometryRemoveVertexBuffer().

Here is the call graph for this function:

Here is the caller graph for this function:

bool Dali::Geometry::GetRequiresDepthTesting ( ) const

Return if the geometry requires depth testing.

Returns
True if the geometry requires depth testing

Definition at line 94 of file geometry.cpp.

References Dali::GetImplementation().

Referenced by UtcDaliGeometrySetGetRequireDepthTesting().

Here is the call graph for this function:

Here is the caller graph for this function:

Geometry Dali::Geometry::New ( )
static

Creates a new Geometry object.

Returns
An handle to a newly allocated Geometry

Definition at line 27 of file geometry.cpp.

References Geometry(), Dali::IntrusivePtr< T >::Get(), and Dali::Internal::Geometry::New().

Referenced by Dali::Internal::anonymous_namespace{geometry-impl.cpp}::Create(), Dali::Toolkit::Internal::BorderRenderer::CreateBorderGeometry(), Dali::Toolkit::Internal::CreateBouncingEffectActor(), CreateGeometry(), Dali::Toolkit::Internal::ObjLoader::CreateGeometry(), Dali::Toolkit::Internal::BubbleEmitter::CreateGeometry(), Dali::Toolkit::Text::AtlasRenderer::Impl::CreateMeshActor(), Dali::Toolkit::Internal::anonymous_namespace{cube-transition-effect-impl.cpp}::CreateQuadGeometry(), Dali::Toolkit::Internal::RendererFactoryCache::CreateQuadGeometry(), Dali::CreateQuadGeometryFromBuffer(), Dali::Toolkit::Internal::DebugRenderer::CreateQuadWireframeGeometry(), Dali::Toolkit::Internal::anonymous_namespace{image-renderer.cpp}::GenerateGeometry(), Dali::Toolkit::Internal::anonymous_namespace{npatch-renderer.cpp}::GenerateGeometry(), Dali::Toolkit::Internal::Model3dView::OnInitialize(), Dali::Toolkit::Text::Decorator::Impl::UpdateHighlight(), UtcDaliGeometryAddVertexBuffer(), UtcDaliGeometryAssignmentOperator(), UtcDaliGeometryCopyConstructor(), UtcDaliGeometryDownCast01(), UtcDaliGeometryGetNumberOfVertexBuffers(), UtcDaliGeometryNew01(), UtcDaliGeometryRemoveVertexBuffer(), UtcDaliGeometrySetGetGeometryType01(), UtcDaliGeometrySetGetGeometryType02(), UtcDaliGeometrySetIndexBuffer(), UtcDaliPropertyBufferSetData01(), and UtcDaliPropertyBufferSetData02().

Here is the call graph for this function:

Here is the caller graph for this function:

Geometry & Dali::Geometry::operator= ( const Geometry handle)

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

Parameters
[in]handleHandle to an object
Returns
Reference to the assigned object

Definition at line 51 of file geometry.cpp.

References Dali::BaseHandle::operator=().

Here is the call graph for this function:

void Dali::Geometry::RemoveVertexBuffer ( std::size_t  index)

Remove a vertex buffer.

The index must be between 0 and GetNumberOfVertexBuffers()

Parameters
[in]indexIndex to the vertex buffer to remove

Definition at line 68 of file geometry.cpp.

References Dali::GetImplementation().

Referenced by UtcDaliGeometryGetNumberOfVertexBuffers(), and UtcDaliGeometryRemoveVertexBuffer().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Geometry::SetGeometryType ( GeometryType  geometryType)
void Dali::Geometry::SetIndexBuffer ( PropertyBuffer indexBuffer)
void Dali::Geometry::SetRequiresDepthTesting ( bool  requiresDepthTest)

Set if the geometry requires depth testing.

Should be set to true if this geometry has overlapping triangles in arbitrary order

Calling this function is equivalent to setting the REQUIRES_DEPTH_TESTING property

Parameters
[in]requiresDepthTestSpecifies if the geometry requires depth testing

Definition at line 89 of file geometry.cpp.

References Dali::GetImplementation().

Referenced by Dali::Toolkit::Internal::ObjLoader::CreateGeometry(), and UtcDaliGeometrySetGetRequireDepthTesting().

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following files:
Dali Docs Home
Read more about Dali