Dali 3D User Interface Engine
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions
Dali::Internal::SceneGraph::NodeAttachment Class Referenceabstract

NodeAttachment is a base class for objects attached to Nodes in the scene graph. More...

#include <node-attachment.h>

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

Public Member Functions

virtual ~NodeAttachment ()
 Virtual destructor. More...
 
virtual void Initialize (SceneController &sceneController, BufferIndex updateBufferIndex)=0
 Second-phase construction. More...
 
virtual void OnDestroy ()=0
 Called shortly before destruction. More...
 
virtual void ConnectedToSceneGraph ()=0
 Called when the parent node is connected to the SceneGraph. More...
 
virtual void DisconnectedFromSceneGraph ()=0
 Called when the parent node is disconnected from the SceneGraph. More...
 
void SetParent (Node &parent)
 Set the parent of a NodeAttachment. More...
 
NodeGetParent ()
 Retrieve the parent node of a NodeAttachment. More...
 
NodeGetParent () const
 Retrieve the parent node of a NodeAttachment. More...
 
virtual void Update (BufferIndex updateBufferIndex, const Node &owningNode, int nodeDirtyFlags)
 Called when the attachment or it's owning node is flagged as dirty during scene graph updates. More...
 

Protected Member Functions

 NodeAttachment ()
 Derived versions of NodeAttachment should be constructed. More...
 

Protected Attributes

NodemParent
 Pointer to parent node which owns the attachment. More...
 

Private Member Functions

 NodeAttachment (const NodeAttachment &)
 
NodeAttachmentoperator= (const NodeAttachment &rhs)
 

Detailed Description

NodeAttachment is a base class for objects attached to Nodes in the scene graph.

The position of the object is provided by its parent node. NodeAttachment data is double-buffered. This allows an update thread to modify node data, without interferring with another thread reading the values from the previous update traversal.

Definition at line 45 of file node-attachment.h.

Constructor & Destructor Documentation

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

Virtual destructor.

Definition at line 39 of file node-attachment.cpp.

Dali::Internal::SceneGraph::NodeAttachment::NodeAttachment ( )
protected

Derived versions of NodeAttachment should be constructed.

Definition at line 34 of file node-attachment.cpp.

Dali::Internal::SceneGraph::NodeAttachment::NodeAttachment ( const NodeAttachment )
private

Member Function Documentation

virtual void Dali::Internal::SceneGraph::NodeAttachment::ConnectedToSceneGraph ( )
pure virtual

Called when the parent node is connected to the SceneGraph.

Implemented in Dali::Internal::SceneGraph::CameraAttachment.

virtual void Dali::Internal::SceneGraph::NodeAttachment::DisconnectedFromSceneGraph ( )
pure virtual

Called when the parent node is disconnected from the SceneGraph.

Implemented in Dali::Internal::SceneGraph::CameraAttachment.

Node& Dali::Internal::SceneGraph::NodeAttachment::GetParent ( )
inline

Retrieve the parent node of a NodeAttachment.

Returns
The parent node, or NULL if the NodeAttachment has not been added to the scene-graph.

Definition at line 88 of file node-attachment.h.

References DALI_ASSERT_DEBUG, and mParent.

Node& Dali::Internal::SceneGraph::NodeAttachment::GetParent ( ) const
inline

Retrieve the parent node of a NodeAttachment.

Returns
The parent node, or NULL if the NodeAttachment has not been added to the scene-graph.

Definition at line 98 of file node-attachment.h.

References DALI_ASSERT_DEBUG, and mParent.

virtual void Dali::Internal::SceneGraph::NodeAttachment::Initialize ( SceneController sceneController,
BufferIndex  updateBufferIndex 
)
pure virtual

Second-phase construction.

This is called by the UpdateManager when the attachment is attached to the scene-graph.

Parameters
[in]sceneControllerAllows attachments to get camera controllers.
[in]updateBufferIndexThe current update buffer index.

Implemented in Dali::Internal::SceneGraph::CameraAttachment.

virtual void Dali::Internal::SceneGraph::NodeAttachment::OnDestroy ( )
pure virtual

Called shortly before destruction.

After this method has been called, the SceneController cannot be safely accessed.

Implemented in Dali::Internal::SceneGraph::CameraAttachment.

NodeAttachment& Dali::Internal::SceneGraph::NodeAttachment::operator= ( const NodeAttachment rhs)
private
void Dali::Internal::SceneGraph::NodeAttachment::SetParent ( Node parent)

Set the parent of a NodeAttachment.

Parameters
[in]parentthe new parent.

Definition at line 43 of file node-attachment.cpp.

References DALI_ASSERT_DEBUG, and mParent.

virtual void Dali::Internal::SceneGraph::NodeAttachment::Update ( BufferIndex  updateBufferIndex,
const Node owningNode,
int  nodeDirtyFlags 
)
inlinevirtual

Called when the attachment or it's owning node is flagged as dirty during scene graph updates.

Allows derived classes to perform extra processing

Parameters
[in]updateBufferIndexThe current update buffer index.
[in]owningNodeThe attachment's owning node
[in]nodeDirtyFlagsof the owning node

Reimplemented in Dali::Internal::SceneGraph::CameraAttachment.

Definition at line 113 of file node-attachment.h.

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

Here is the caller graph for this function:

Member Data Documentation

Node* Dali::Internal::SceneGraph::NodeAttachment::mParent
protected

Pointer to parent node which owns the attachment.

Definition at line 132 of file node-attachment.h.

Referenced by GetParent(), and SetParent().


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