Dali 3D User Interface Engine
List of all members | Public Types | Public Member Functions | Private Attributes
Dali::Internal::SceneGraph::Geometry Class Reference

This scene graph object is a property owner. More...

#include <scene-graph-geometry.h>

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

Public Types

typedef
Dali::Geometry::GeometryType 
GeometryType
 

Public Member Functions

 Geometry ()
 Constructor. More...
 
virtual ~Geometry ()
 Destructor. More...
 
void AddVertexBuffer (Render::PropertyBuffer *vertexBuffer)
 Add a property buffer to be used as a vertex buffer. More...
 
void RemoveVertexBuffer (Render::PropertyBuffer *vertexBuffer)
 Remove a property buffer to be used as a vertex buffer. More...
 
void SetIndexBuffer (Render::PropertyBuffer *indexBuffer)
 Set the buffer to be used as a source of indices for the geometry. More...
 
void ClearIndexBuffer ()
 Clear the index buffer if it is no longer required, e.g. More...
 
void SetGeometryType (GeometryType geometryType)
 Set the type of geometry to draw (Points, Lines, Triangles, etc) More...
 
void SetRequiresDepthTest (bool requiresDepthTest)
 Set if the geometry requires depth testing. More...
 
void ConnectToSceneGraph (SceneController &sceneController, BufferIndex bufferIndex)
 Connect the object to the scene graph. More...
 
void DisconnectFromSceneGraph (SceneController &sceneController, BufferIndex bufferIndex)
 Disconnect the object from the scene graph. More...
 
void AddConnectionObserver (ConnectionChangePropagator::Observer &observer)
  More...
 
void RemoveConnectionObserver (ConnectionChangePropagator::Observer &observer)
  More...
 
virtual void UniformMappingsChanged (const UniformMap &mappings)
  More...
 
Vector< Render::PropertyBuffer * > & GetVertexBuffers ()
 Get the vertex buffers of the geometry. More...
 
Render::PropertyBufferGetIndexBuffer ()
 Get the index buffer of the geometry. More...
 
RenderGeometryGetRenderGeometry (SceneController *sceneController)
 Gets the associated RenderGeometry. More...
 
void OnRendererDisconnect ()
 Called from renderers using this geometry when they get disconnected from the scenegraph. More...
 
virtual GeometryType GetGeometryType (BufferIndex bufferIndex) const
 Get the type of geometry to draw. More...
 
virtual bool GetRequiresDepthTesting (BufferIndex bufferIndex) const
 Returns true if this geometry requires depth testing, e.g. More...
 
- Public Member Functions inherited from Dali::Internal::SceneGraph::PropertyOwner
virtual ~PropertyOwner ()
 Virtual destructor; this is intended as a base class. More...
 
void AddObserver (Observer &observer)
 Add an observer. More...
 
void RemoveObserver (Observer &observer)
 Remove an observer. More...
 
bool IsObserved ()
 This method can be used to determine if there is an animation or constraint that is using this property owner. More...
 
void Destroy ()
 Called just before destruction to disconnect all observers and remove constraints. More...
 
void ConnectToSceneGraph ()
 Notify all observers that the object has been connected This occurs when the object is connected to the scene-graph during UpdateManager::Update(). More...
 
void DisconnectFromSceneGraph (BufferIndex updateBufferIndex)
 Notify all observers that the object has been disconnected and remove constraints. More...
 
void InstallCustomProperty (PropertyBase *property)
 Install a custom property. More...
 
OwnedPropertyContainerGetCustomProperties ()
 Retrieve the custom properties owned by the object. More...
 
const OwnedPropertyContainerGetCustomProperties () const
 Retrieve the custom properties owned by the object. More...
 
void ResetToBaseValues (BufferIndex updateBufferIndex)
 Reset animatable properties to the corresponding base values. More...
 
void ApplyConstraint (ConstraintBase *constraint)
 Apply a constraint. More...
 
void RemoveConstraint (ConstraintBase *constraint)
 Begin removal of constraints. More...
 
ConstraintOwnerContainerGetConstraints ()
 Retrieve the constraints that are currently applied. More...
 
virtual void AddUniformMapping (UniformPropertyMapping *map)
 Add a map to the mappings table. More...
 
virtual void RemoveUniformMapping (const std::string &uniformName)
 Remove a map from the mappings table. More...
 
const UniformMapGetUniformMap () const
 Get the mappings table. More...
 
void AddUniformMapObserver (UniformMap::Observer &observer)
  More...
 
void RemoveUniformMapObserver (UniformMap::Observer &observer)
  More...
 

Private Attributes

RenderGeometrymRenderGeometry
 
SceneControllermSceneController
 
Render::PropertyBuffermIndexBuffer
 The index buffer if required. More...
 
Vector< Render::PropertyBuffer * > mVertexBuffers
 The vertex buffers. More...
 
ConnectionChangePropagator mConnectionObservers
 
Geometry::GeometryType mGeometryType
 
unsigned int mRendererRefCount
 
bool mRequiresDepthTest
 

Additional Inherited Members

- Static Public Member Functions inherited from Dali::Internal::SceneGraph::PropertyOwner
static PropertyOwnerNew ()
 Create a property owner. More...
 
- Protected Member Functions inherited from Dali::Internal::SceneGraph::PropertyOwner
 PropertyOwner ()
 Protected constructor. More...
 
- Protected Attributes inherited from Dali::Internal::SceneGraph::PropertyOwner
OwnedPropertyContainer mCustomProperties
 Properties provided with InstallCustomProperty() More...
 
UniformMap mUniformMaps
 Container of owned uniform maps. More...
 

Detailed Description

This scene graph object is a property owner.

It describes a geometry using a number of PropertyBuffers acting as Vertex buffers.

Definition at line 46 of file scene-graph-geometry.h.

Member Typedef Documentation

Definition at line 50 of file scene-graph-geometry.h.

Constructor & Destructor Documentation

Dali::Internal::SceneGraph::Geometry::Geometry ( )

Constructor.

Definition at line 33 of file scene-graph-geometry.cpp.

References Dali::Internal::SceneGraph::PropertyOwner::AddUniformMapObserver().

Here is the call graph for this function:

Dali::Internal::SceneGraph::Geometry::~Geometry ( )
virtual

Destructor.

Definition at line 46 of file scene-graph-geometry.cpp.

References Dali::Internal::SceneGraph::ConnectionChangePropagator::Destroy(), and mConnectionObservers.

Here is the call graph for this function:

Member Function Documentation

void Dali::Internal::SceneGraph::Geometry::AddConnectionObserver ( ConnectionChangePropagator::Observer observer)

Definition at line 156 of file scene-graph-geometry.cpp.

References Dali::Internal::SceneGraph::ConnectionChangePropagator::Add(), and mConnectionObservers.

Referenced by Dali::Internal::SceneGraph::Renderer::SetGeometry().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::SceneGraph::Geometry::AddVertexBuffer ( Render::PropertyBuffer vertexBuffer)
void Dali::Internal::SceneGraph::Geometry::ClearIndexBuffer ( )

Clear the index buffer if it is no longer required, e.g.

if changing geometry type to POINTS.

Definition at line 97 of file scene-graph-geometry.cpp.

References Dali::Internal::SceneGraph::ConnectionChangePropagator::ConnectionsChanged(), Dali::Internal::SceneGraph::SceneController::GetRenderMessageDispatcher(), mConnectionObservers, mIndexBuffer, mRenderGeometry, mSceneController, and Dali::Internal::SceneGraph::RenderMessageDispatcher::RemovePropertyBuffer().

Referenced by Dali::Internal::SceneGraph::ClearIndexBufferMessage().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::SceneGraph::Geometry::ConnectToSceneGraph ( SceneController sceneController,
BufferIndex  bufferIndex 
)

Connect the object to the scene graph.

Parameters
[in]sceneControllerThe scene controller - used for sending messages to render thread
[in]bufferIndexThe current buffer index - used for sending messages to render thread

Definition at line 148 of file scene-graph-geometry.cpp.

void Dali::Internal::SceneGraph::Geometry::DisconnectFromSceneGraph ( SceneController sceneController,
BufferIndex  bufferIndex 
)

Disconnect the object from the scene graph.

Parameters
[in]sceneControllerThe scene controller - used for sending messages to render thread
[in]bufferIndexThe current buffer index - used for sending messages to render thread

Definition at line 152 of file scene-graph-geometry.cpp.

Geometry::GeometryType Dali::Internal::SceneGraph::Geometry::GetGeometryType ( BufferIndex  bufferIndex) const
virtual

Get the type of geometry to draw.

Parameters
[in]bufferIndexIndex for double buffered values

Definition at line 138 of file scene-graph-geometry.cpp.

References mGeometryType.

Render::PropertyBuffer * Dali::Internal::SceneGraph::Geometry::GetIndexBuffer ( )

Get the index buffer of the geometry.

Returns
A pointer to the index buffer if it exists, or NULL if it doesn't.

Definition at line 133 of file scene-graph-geometry.cpp.

References mIndexBuffer.

RenderGeometry * Dali::Internal::SceneGraph::Geometry::GetRenderGeometry ( SceneController sceneController)
bool Dali::Internal::SceneGraph::Geometry::GetRequiresDepthTesting ( BufferIndex  bufferIndex) const
virtual

Returns true if this geometry requires depth testing, e.g.

if it is a set of vertices with z != 0

Parameters
[in]bufferIndexIndex for double buffered values

Definition at line 143 of file scene-graph-geometry.cpp.

References mRequiresDepthTest.

Vector< Render::PropertyBuffer * > & Dali::Internal::SceneGraph::Geometry::GetVertexBuffers ( )

Get the vertex buffers of the geometry.

Returns
A const reference to the vertex buffers

Definition at line 128 of file scene-graph-geometry.cpp.

References mVertexBuffers.

Referenced by Dali::Internal::SceneGraph::Renderer::PrepareRender().

Here is the caller graph for this function:

void Dali::Internal::SceneGraph::Geometry::OnRendererDisconnect ( )

Called from renderers using this geometry when they get disconnected from the scenegraph.

Definition at line 200 of file scene-graph-geometry.cpp.

References Dali::Internal::SceneGraph::SceneController::GetRenderMessageDispatcher(), mRendererRefCount, mRenderGeometry, mSceneController, and Dali::Internal::SceneGraph::RenderMessageDispatcher::RemoveGeometry().

Referenced by Dali::Internal::SceneGraph::Renderer::OnStageDisconnect(), and Dali::Internal::SceneGraph::Renderer::SetGeometry().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::SceneGraph::Geometry::RemoveConnectionObserver ( ConnectionChangePropagator::Observer observer)

Definition at line 161 of file scene-graph-geometry.cpp.

References mConnectionObservers, and Dali::Internal::SceneGraph::ConnectionChangePropagator::Remove().

Referenced by Dali::Internal::SceneGraph::Renderer::SetGeometry(), and Dali::Internal::SceneGraph::Renderer::~Renderer().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::SceneGraph::Geometry::RemoveVertexBuffer ( Render::PropertyBuffer vertexBuffer)
void Dali::Internal::SceneGraph::Geometry::SetGeometryType ( Geometry::GeometryType  geometryType)

Set the type of geometry to draw (Points, Lines, Triangles, etc)

Parameters
[in]bufferIndexIndex for double buffered values
[in]geometryTypeThe geometry type

Definition at line 110 of file scene-graph-geometry.cpp.

References Dali::Internal::SceneGraph::SceneController::GetRenderMessageDispatcher(), mGeometryType, mRenderGeometry, mSceneController, and Dali::Internal::SceneGraph::RenderMessageDispatcher::SetGeometryType().

Referenced by Dali::Internal::SceneGraph::SetGeometryTypeMessage().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::SceneGraph::Geometry::SetIndexBuffer ( Render::PropertyBuffer indexBuffer)

Set the buffer to be used as a source of indices for the geometry.

Parameters
[in]indexBufferthe Property buffer describing the indexes for Line, Triangle tyes.

Definition at line 83 of file scene-graph-geometry.cpp.

References Dali::Internal::SceneGraph::RenderMessageDispatcher::AddPropertyBuffer(), Dali::Internal::SceneGraph::ConnectionChangePropagator::ConnectionsChanged(), Dali::Internal::SceneGraph::SceneController::GetRenderMessageDispatcher(), mConnectionObservers, mIndexBuffer, mRenderGeometry, and mSceneController.

Referenced by Dali::Internal::SceneGraph::SetIndexBufferMessage().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::SceneGraph::Geometry::SetRequiresDepthTest ( bool  requiresDepthTest)

Set if the geometry requires depth testing.

Parameters
[in]requiresDepthTestTrue if depth testing is required, false otherwise

Definition at line 119 of file scene-graph-geometry.cpp.

References Dali::Internal::SceneGraph::SceneController::GetRenderMessageDispatcher(), mRenderGeometry, mRequiresDepthTest, mSceneController, and Dali::Internal::SceneGraph::RenderMessageDispatcher::SetGeometryRequiresDepthTest().

Referenced by Dali::Internal::SceneGraph::SetGeometryRequiresDepthTestMessage().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::SceneGraph::Geometry::UniformMappingsChanged ( const UniformMap mappings)
virtual

Member Data Documentation

ConnectionChangePropagator Dali::Internal::SceneGraph::Geometry::mConnectionObservers
private
Geometry::GeometryType Dali::Internal::SceneGraph::Geometry::mGeometryType
private

Definition at line 177 of file scene-graph-geometry.h.

Referenced by GetGeometryType(), GetRenderGeometry(), and SetGeometryType().

Render::PropertyBuffer* Dali::Internal::SceneGraph::Geometry::mIndexBuffer
private

The index buffer if required.

Definition at line 172 of file scene-graph-geometry.h.

Referenced by ClearIndexBuffer(), GetIndexBuffer(), GetRenderGeometry(), and SetIndexBuffer().

unsigned int Dali::Internal::SceneGraph::Geometry::mRendererRefCount
private

Definition at line 178 of file scene-graph-geometry.h.

Referenced by GetRenderGeometry(), and OnRendererDisconnect().

RenderGeometry* Dali::Internal::SceneGraph::Geometry::mRenderGeometry
private
bool Dali::Internal::SceneGraph::Geometry::mRequiresDepthTest
private
SceneController* Dali::Internal::SceneGraph::Geometry::mSceneController
private
Vector<Render::PropertyBuffer*> Dali::Internal::SceneGraph::Geometry::mVertexBuffers
private

The vertex buffers.

Definition at line 173 of file scene-graph-geometry.h.

Referenced by AddVertexBuffer(), GetRenderGeometry(), GetVertexBuffers(), and RemoveVertexBuffer().


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