1 #ifndef __DALI_INTERNAL_SCENE_GRAPH_NODE_H__
2 #define __DALI_INTERNAL_SCENE_GRAPH_NODE_H__
5 * Copyright (c) 2016 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
22 #include <dali/public-api/actors/actor-enumerations.h>
23 #include <dali/public-api/actors/draw-mode.h>
24 #include <dali/devel-api/common/set-wrapper.h>
25 #include <dali/public-api/math/quaternion.h>
26 #include <dali/public-api/math/math-utils.h>
27 #include <dali/public-api/math/vector3.h>
28 #include <dali/integration-api/debug.h>
29 #include <dali/internal/common/message.h>
30 #include <dali/internal/event/common/event-thread-services.h>
31 #include <dali/internal/render/data-providers/node-data-provider.h>
32 #include <dali/internal/update/common/animatable-property.h>
33 #include <dali/internal/update/common/property-owner.h>
34 #include <dali/internal/update/common/property-vector3.h>
35 #include <dali/internal/update/common/scene-graph-buffers.h>
36 #include <dali/internal/update/common/inherited-property.h>
37 #include <dali/internal/update/manager/transform-manager.h>
38 #include <dali/internal/update/manager/transform-manager-property.h>
39 #include <dali/internal/update/nodes/node-declarations.h>
40 #include <dali/internal/update/rendering/scene-graph-renderer.h>
48 // value types used by messages
49 template <> struct ParameterType< ColorMode > : public BasicType< ColorMode > {};
50 template <> struct ParameterType< PositionInheritanceMode > : public BasicType< PositionInheritanceMode > {};
61 * Flag whether property has changed, during the Update phase.
63 enum NodePropertyFlags
66 TransformFlag = 0x001,
71 SortModifierFlag = 0x020,
72 ChildDeletedFlag = 0x040
75 static const int AllFlags = ( ChildDeletedFlag << 1 ) - 1; // all the flags
78 * Size is not inherited. VisibleFlag is inherited
80 static const int InheritedDirtyFlags = TransformFlag | VisibleFlag | ColorFlag | OverlayFlag;
82 // Flags which require the scene renderable lists to be updated
83 static const int RenderableUpdateFlags = TransformFlag | SortModifierFlag | ChildDeletedFlag;
86 * Node is the base class for all nodes in the Scene Graph.
88 * Each node provides a transformation which applies to the node and
89 * its children. Node data is double-buffered. This allows an update
90 * thread to modify node data, without interferring with another
91 * thread reading the values from the previous update traversal.
93 class Node : public PropertyOwner, public NodeDataProvider
98 static const PositionInheritanceMode DEFAULT_POSITION_INHERITANCE_MODE;
99 static const ColorMode DEFAULT_COLOR_MODE;
104 * Construct a new Node.
114 * Overriden delete operator
115 * Deletes the node from its global memory pool
117 void operator delete( void* ptr );
120 * Called during UpdateManager::DestroyNode shortly before Node is destroyed.
127 * Query whether the node is a layer.
128 * @return True if the node is a layer.
132 return (GetLayer() != NULL);
136 * Convert a node to a layer.
137 * @return A pointer to the layer, or NULL.
139 virtual Layer* GetLayer()
145 * Add a renderer to the node
146 * @param[in] renderer The renderer added to the node
148 void AddRenderer( Renderer* renderer )
150 //Check that it has not been already added
151 unsigned int rendererCount( mRenderer.Size() );
152 for( unsigned int i(0); i<rendererCount; ++i )
154 if( mRenderer[i] == renderer )
156 //Renderer already in the list
161 //If it is the first renderer added, make sure the world transform will be calculated
162 //in the next update as world transform is not computed if node has no renderers
163 if( rendererCount == 0 )
165 mDirtyFlags |= TransformFlag;
168 mRenderer.PushBack( renderer );
172 * Remove a renderer from the node
173 * @param[in] renderer The renderer to be removed
175 void RemoveRenderer( Renderer* renderer );
178 * Get the renderer at the given index
181 Renderer* GetRendererAt( unsigned int index )
183 return mRenderer[index];
187 * Retrieve the number of renderers for the node
189 unsigned int GetRendererCount()
191 return mRenderer.Size();
194 // Containment methods
197 * Query whether a node is the root node. Root nodes cannot have a parent node.
198 * A node becomes a root node, when it is installed by UpdateManager.
199 * @return True if the node is a root node.
207 * Set whether a node is the root node. Root nodes cannot have a parent node.
208 * This method should only be called by UpdateManager.
209 * @pre When isRoot is true, the node must not have a parent.
210 * @param[in] isRoot Whether the node is now a root node.
212 void SetRoot(bool isRoot);
215 * Retrieve the parent of a Node.
216 * @return The parent node, or NULL if the Node has not been added to the scene-graph.
224 * Retrieve the parent of a Node.
225 * @return The parent node, or NULL if the Node has not been added to the scene-graph.
227 const Node* GetParent() const
233 * Connect a node to the scene-graph.
234 * @pre A node cannot be added to itself.
235 * @pre The parent node is connected to the scene-graph.
236 * @pre The childNode does not already have a parent.
237 * @pre The childNode is not a root node.
238 * @param[in] childNode The child to add.
240 void ConnectChild( Node* childNode );
243 * Disconnect a child (& its children) from the scene-graph.
244 * @pre childNode is a child of this Node.
245 * @param[in] updateBufferIndex The current update buffer index.
246 * @param[in] childNode The node to disconnect.
248 void DisconnectChild( BufferIndex updateBufferIndex, Node& childNode );
251 * Retrieve the children a Node.
252 * @return The container of children.
254 const NodeContainer& GetChildren() const
260 * Retrieve the children a Node.
261 * @return The container of children.
263 NodeContainer& GetChildren()
271 * Flag that one of the node values has changed in the current frame.
272 * @param[in] flag The flag to set.
274 void SetDirtyFlag(NodePropertyFlags flag)
280 * Flag that all of the node values are dirty.
282 void SetAllDirtyFlags()
284 mDirtyFlags = AllFlags;
288 * Query whether a node is dirty.
289 * @return The dirty flags
291 int GetDirtyFlags() const;
294 * Query whether a node is clean.
295 * @return True if the node is clean.
299 return ( NothingFlag == GetDirtyFlags() );
303 * Retrieve the parent-origin of the node.
304 * @return The parent-origin.
306 const Vector3& GetParentOrigin() const
308 return mParentOrigin.Get(0);
312 * Sets both the local & base parent-origins of the node.
313 * @param[in] origin The new local & base parent-origins.
315 void SetParentOrigin(const Vector3& origin)
317 mParentOrigin.Set(0,origin );
321 * Retrieve the anchor-point of the node.
322 * @return The anchor-point.
324 const Vector3& GetAnchorPoint() const
326 return mAnchorPoint.Get(0);
330 * Sets both the local & base anchor-points of the node.
331 * @param[in] anchor The new local & base anchor-points.
333 void SetAnchorPoint(const Vector3& anchor)
335 mAnchorPoint.Set(0, anchor );
339 * Retrieve the local position of the node, relative to its parent.
340 * @param[in] bufferIndex The buffer to read from.
341 * @return The local position.
343 const Vector3& GetPosition(BufferIndex bufferIndex) const
345 if( mTransformId != INVALID_TRANSFORM_ID )
347 return mPosition.Get(bufferIndex);
350 return Vector3::ZERO;
354 * Retrieve the position of the node derived from the position of all its parents.
355 * @return The world position.
357 const Vector3& GetWorldPosition( BufferIndex bufferIndex ) const
359 return mWorldPosition.Get(bufferIndex);
363 * Set whether the Node inherits position.
364 * @param[in] inherit True if the parent position is inherited.
366 void SetInheritPosition(bool inherit)
368 if( mTransformId != INVALID_TRANSFORM_ID )
370 mTransformManager->SetInheritPosition( mTransformId, inherit );
375 * Retrieve the local orientation of the node, relative to its parent.
376 * @param[in] bufferIndex The buffer to read from.
377 * @return The local orientation.
379 const Quaternion& GetOrientation(BufferIndex bufferIndex) const
381 if( mTransformId != INVALID_TRANSFORM_ID )
383 return mOrientation.Get(0);
386 return Quaternion::IDENTITY;
390 * Retrieve the orientation of the node derived from the rotation of all its parents.
391 * @param[in] bufferIndex The buffer to read from.
392 * @return The world rotation.
394 const Quaternion& GetWorldOrientation( BufferIndex bufferIndex ) const
396 return mWorldOrientation.Get(0);
400 * Set whether the Node inherits orientation.
401 * @param[in] inherit True if the parent orientation is inherited.
403 void SetInheritOrientation(bool inherit)
405 if( mTransformId != INVALID_TRANSFORM_ID )
407 mTransformManager->SetInheritOrientation(mTransformId, inherit );
412 * Retrieve the local scale of the node, relative to its parent.
413 * @param[in] bufferIndex The buffer to read from.
414 * @return The local scale.
416 const Vector3& GetScale(BufferIndex bufferIndex) const
418 if( mTransformId != INVALID_TRANSFORM_ID )
420 return mScale.Get(0);
428 * Retrieve the scale of the node derived from the scale of all its parents.
429 * @param[in] bufferIndex The buffer to read from.
430 * @return The world scale.
432 const Vector3& GetWorldScale( BufferIndex bufferIndex ) const
434 return mWorldScale.Get(0);
438 * Set whether the Node inherits scale.
439 * @param inherit True if the Node inherits scale.
441 void SetInheritScale( bool inherit )
443 if( mTransformId != INVALID_TRANSFORM_ID )
445 mTransformManager->SetInheritScale(mTransformId, inherit );
450 * Retrieve the visibility of the node.
451 * @param[in] bufferIndex The buffer to read from.
452 * @return True if the node is visible.
454 bool IsVisible(BufferIndex bufferIndex) const
456 return mVisible[bufferIndex];
460 * Retrieve the opacity of the node.
461 * @param[in] bufferIndex The buffer to read from.
462 * @return The opacity.
464 float GetOpacity(BufferIndex bufferIndex) const
466 return mColor[bufferIndex].a;
470 * Retrieve the color of the node.
471 * @param[in] bufferIndex The buffer to read from.
474 const Vector4& GetColor(BufferIndex bufferIndex) const
476 return mColor[bufferIndex];
480 * Sets the color of the node derived from the color of all its parents.
481 * @param[in] color The world color.
482 * @param[in] updateBufferIndex The current update buffer index.
484 void SetWorldColor(const Vector4& color, BufferIndex updateBufferIndex)
486 mWorldColor.Set( updateBufferIndex, color );
490 * Sets the color of the node derived from the color of all its parents.
491 * This method should only be called when the parents world color is up-to-date.
492 * @pre The node has a parent.
493 * @param[in] updateBufferIndex The current update buffer index.
495 void InheritWorldColor( BufferIndex updateBufferIndex )
497 DALI_ASSERT_DEBUG(mParent != NULL);
500 if( mColorMode == USE_OWN_MULTIPLY_PARENT_ALPHA )
502 const Vector4& ownColor = mColor[updateBufferIndex];
503 mWorldColor.Set( updateBufferIndex, ownColor.r, ownColor.g, ownColor.b, ownColor.a * mParent->GetWorldColor(updateBufferIndex).a );
505 else if( mColorMode == USE_OWN_MULTIPLY_PARENT_COLOR )
507 mWorldColor.Set( updateBufferIndex, mParent->GetWorldColor(updateBufferIndex) * mColor[updateBufferIndex] );
509 else if( mColorMode == USE_PARENT_COLOR )
511 mWorldColor.Set( updateBufferIndex, mParent->GetWorldColor(updateBufferIndex) );
513 else // USE_OWN_COLOR
515 mWorldColor.Set( updateBufferIndex, mColor[updateBufferIndex] );
520 * Copies the previous inherited scale, if this changed in the previous frame.
521 * This method should be called instead of InheritWorldScale i.e. if the inherited scale
522 * does not need to be recalculated in the current frame.
523 * @param[in] updateBufferIndex The current update buffer index.
525 void CopyPreviousWorldColor( BufferIndex updateBufferIndex )
527 mWorldColor.CopyPrevious( updateBufferIndex );
531 * Retrieve the color of the node, possibly derived from the color
532 * of all its parents, depending on the value of mColorMode.
533 * @param[in] bufferIndex The buffer to read from.
534 * @return The world color.
536 const Vector4& GetWorldColor(BufferIndex bufferIndex) const
538 return mWorldColor[bufferIndex];
542 * Set the color mode. This specifies whether the Node uses its own color,
543 * or inherits its parent color.
544 * @param[in] colorMode The new color mode.
546 void SetColorMode(ColorMode colorMode)
548 mColorMode = colorMode;
550 SetDirtyFlag(ColorFlag);
554 * Retrieve the color mode.
555 * @return The color mode.
557 ColorMode GetColorMode() const
563 * Retrieve the size of the node.
564 * @param[in] bufferIndex The buffer to read from.
567 const Vector3& GetSize(BufferIndex bufferIndex) const
569 if( mTransformId != INVALID_TRANSFORM_ID )
574 return Vector3::ZERO;
578 * Retrieve the bounding sphere of the node
579 * @return A vector4 describing the bounding sphere. XYZ is the center and W is the radius
581 const Vector4& GetBoundingSphere() const
583 if( mTransformId != INVALID_TRANSFORM_ID )
585 return mTransformManager->GetBoundingSphere( mTransformId );
588 return Vector4::ZERO;
592 * Retrieve world matrix and size of the node
593 * @param[out] The local to world matrix of the node
594 * @param[out] size The current size of the node
596 void GetWorldMatrixAndSize( Matrix& worldMatrix, Vector3& size ) const
598 if( mTransformId != INVALID_TRANSFORM_ID )
600 mTransformManager->GetWorldMatrixAndSize( mTransformId, worldMatrix, size );
605 * Checks if local matrix has changed since last update
606 * @return true if local matrix has changed, false otherwise
608 bool IsLocalMatrixDirty() const
610 return (mTransformId != INVALID_TRANSFORM_ID) &&
611 (mTransformManager->IsLocalMatrixDirty( mTransformId ));
616 * Retrieve the cached world-matrix of a node.
617 * @param[in] bufferIndex The buffer to read from.
618 * @return The world-matrix.
620 const Matrix& GetWorldMatrix( BufferIndex bufferIndex ) const
622 return mWorldMatrix.Get(bufferIndex);
626 * Mark the node as exclusive to a single RenderTask.
627 * @param[in] renderTask The render-task, or NULL if the Node is not exclusive to a single RenderTask.
629 void SetExclusiveRenderTask( RenderTask* renderTask )
631 mExclusiveRenderTask = renderTask;
635 * Query whether the node is exclusive to a single RenderTask.
636 * @return The render-task, or NULL if the Node is not exclusive to a single RenderTask.
638 RenderTask* GetExclusiveRenderTask() const
640 return mExclusiveRenderTask;
644 * Set how the Node and its children should be drawn; see Dali::Actor::SetDrawMode() for more details.
645 * @param[in] drawMode The new draw-mode to use.
647 void SetDrawMode( const DrawMode::Type& drawMode )
649 mDrawMode = drawMode;
653 * Returns whether node is an overlay or not.
654 * @return True if node is an overlay, false otherwise.
656 DrawMode::Type GetDrawMode() const
662 * Returns the transform id of the node
663 * @return The transform component id of the node
665 TransformId GetTransformId() const
671 * Equality operator, checks for identity, not values.
674 bool operator==( const Node* rhs ) const
683 unsigned short GetDepth() const
690 * @copydoc UniformMap::Add
692 void AddUniformMapping( UniformPropertyMapping* map );
695 * @copydoc UniformMap::Remove
697 void RemoveUniformMapping( const std::string& uniformName );
700 * Prepare the node for rendering.
701 * This is called by the UpdateManager when an object is due to be rendered in the current frame.
702 * @param[in] updateBufferIndex The current update buffer index.
704 void PrepareRender( BufferIndex bufferIndex );
707 * Called by UpdateManager when the node is added.
708 * Creates a new transform component in the transform manager and initialize all the properties
709 * related to the transformation
710 * @param[in] transformManager A pointer to the trnasform manager (Owned by UpdateManager)
712 void CreateTransform( SceneGraph::TransformManager* transformManager );
717 * Set the parent of a Node.
718 * @param[in] parentNode the new parent.
720 void SetParent(Node& parentNode);
723 * Protected constructor; See also Node::New()
727 private: // from NodeDataProvider
730 * @copydoc NodeDataProvider::GetModelMatrix
732 virtual const Matrix& GetModelMatrix( unsigned int bufferId ) const
734 return GetWorldMatrix( bufferId );
738 * @copydoc NodeDataProvider::GetRenderColor
740 virtual const Vector4& GetRenderColor( unsigned int bufferId ) const
742 return GetWorldColor( bufferId );
745 public: // From UniformMapDataProvider
747 * @copydoc UniformMapDataProvider::GetUniformMapChanged
749 virtual bool GetUniformMapChanged( BufferIndex bufferIndex ) const
751 return mUniformMapChanged[bufferIndex];
755 * @copydoc UniformMapDataProvider::GetUniformMap
757 virtual const CollectedUniformMap& GetUniformMap( BufferIndex bufferIndex ) const
759 return mCollectedUniformMap[bufferIndex];
768 Node& operator=(const Node& rhs);
771 * @copydoc Dali::Internal::SceneGraph::PropertyOwner::ResetDefaultProperties()
773 virtual void ResetDefaultProperties( BufferIndex updateBufferIndex );
776 * Recursive helper to disconnect a Node and its children.
777 * Disconnected Nodes have no parent or children.
778 * @param[in] updateBufferIndex The current update buffer index.
780 void RecursiveDisconnectFromSceneGraph( BufferIndex updateBufferIndex );
782 public: // Default properties
784 TransformManager* mTransformManager;
785 TransformId mTransformId;
786 TransformManagerPropertyVector3 mParentOrigin; ///< Local transform; the position is relative to this. Sets the TransformFlag dirty when changed
787 TransformManagerPropertyVector3 mAnchorPoint; ///< Local transform; local center of rotation. Sets the TransformFlag dirty when changed
788 TransformManagerPropertyVector3 mSize; ///< Size is provided for layouting
789 TransformManagerPropertyVector3 mPosition; ///< Local transform; distance between parent-origin & anchor-point
790 TransformManagerPropertyQuaternion mOrientation; ///< Local transform; rotation relative to parent node
791 TransformManagerPropertyVector3 mScale; ///< Local transform; scale relative to parent node
793 AnimatableProperty<bool> mVisible; ///< Visibility can be inherited from the Node hierachy
794 AnimatableProperty<Vector4> mColor; ///< Color can be inherited from the Node hierarchy
796 // Inherited properties; read-only from public API
798 TransformManagerVector3Input mWorldPosition; ///< Full inherited position
799 TransformManagerVector3Input mWorldScale;
800 TransformManagerQuaternionInput mWorldOrientation; ///< Full inherited orientation
801 TransformManagerMatrixInput mWorldMatrix; ///< Full inherited world matrix
802 InheritedColor mWorldColor; ///< Full inherited color
806 Node* mParent; ///< Pointer to parent node (a child is owned by its parent)
807 RenderTask* mExclusiveRenderTask; ///< Nodes can be marked as exclusive to a single RenderTask
809 RendererContainer mRenderer; ///< Container of renderers; not owned
811 NodeContainer mChildren; ///< Container of children; not owned
813 CollectedUniformMap mCollectedUniformMap[2]; ///< Uniform maps of the node
814 unsigned int mUniformMapChanged[2]; ///< Records if the uniform map has been altered this frame
815 unsigned int mRegenerateUniformMap : 2; ///< Indicate if the uniform map has to be regenerated this frame
817 // flags, compressed to bitfield
818 unsigned short mDepth: 12; ///< Depth in the hierarchy
819 int mDirtyFlags:8; ///< A composite set of flags for each of the Node properties
821 bool mIsRoot:1; ///< True if the node cannot have a parent
823 DrawMode::Type mDrawMode:2; ///< How the Node and its children should be drawn
824 ColorMode mColorMode:2; ///< Determines whether mWorldColor is inherited, 2 bits is enough
826 // Changes scope, should be at end of class
827 DALI_LOG_OBJECT_STRING_DECLARATION;
832 inline void SetInheritOrientationMessage( EventThreadServices& eventThreadServices, const Node& node, bool inherit )
834 typedef MessageValue1< Node, bool > LocalType;
836 // Reserve some memory inside the message queue
837 unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
839 // Construct message in the message queue memory; note that delete should not be called on the return value
840 new (slot) LocalType( &node, &Node::SetInheritOrientation, inherit );
843 inline void SetParentOriginMessage( EventThreadServices& eventThreadServices, const Node& node, const Vector3& origin )
845 typedef MessageValue1< Node, Vector3 > LocalType;
847 // Reserve some memory inside the message queue
848 unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
850 // Construct message in the message queue memory; note that delete should not be called on the return value
851 new (slot) LocalType( &node, &Node::SetParentOrigin, origin );
854 inline void SetAnchorPointMessage( EventThreadServices& eventThreadServices, const Node& node, const Vector3& anchor )
856 typedef MessageValue1< Node, Vector3 > LocalType;
858 // Reserve some memory inside the message queue
859 unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
861 // Construct message in the message queue memory; note that delete should not be called on the return value
862 new (slot) LocalType( &node, &Node::SetAnchorPoint, anchor );
865 inline void SetInheritPositionMessage( EventThreadServices& eventThreadServices, const Node& node, bool inherit )
867 typedef MessageValue1< Node, bool > LocalType;
869 // Reserve some memory inside the message queue
870 unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
872 // Construct message in the message queue memory; note that delete should not be called on the return value
873 new (slot) LocalType( &node, &Node::SetInheritPosition, inherit );
876 inline void SetInheritScaleMessage( EventThreadServices& eventThreadServices, const Node& node, bool inherit )
878 typedef MessageValue1< Node, bool > LocalType;
880 // Reserve some memory inside the message queue
881 unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
883 // Construct message in the message queue memory; note that delete should not be called on the return value
884 new (slot) LocalType( &node, &Node::SetInheritScale, inherit );
887 inline void SetColorModeMessage( EventThreadServices& eventThreadServices, const Node& node, ColorMode colorMode )
889 typedef MessageValue1< Node, ColorMode > LocalType;
891 // Reserve some memory inside the message queue
892 unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
894 // Construct message in the message queue memory; note that delete should not be called on the return value
895 new (slot) LocalType( &node, &Node::SetColorMode, colorMode );
898 inline void SetDrawModeMessage( EventThreadServices& eventThreadServices, const Node& node, DrawMode::Type drawMode )
900 typedef MessageValue1< Node, DrawMode::Type > LocalType;
902 // Reserve some memory inside the message queue
903 unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
905 // Construct message in the message queue memory; note that delete should not be called on the return value
906 new (slot) LocalType( &node, &Node::SetDrawMode, drawMode );
909 inline void AddRendererMessage( EventThreadServices& eventThreadServices, const Node& node, Renderer* renderer )
911 typedef MessageValue1< Node, Renderer* > LocalType;
913 // Reserve some memory inside the message queue
914 unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
916 // Construct message in the message queue memory; note that delete should not be called on the return value
917 new (slot) LocalType( &node, &Node::AddRenderer, renderer );
920 inline void RemoveRendererMessage( EventThreadServices& eventThreadServices, const Node& node, Renderer* renderer )
922 typedef MessageValue1< Node, Renderer* > LocalType;
924 // Reserve some memory inside the message queue
925 unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
927 // Construct message in the message queue memory; note that delete should not be called on the return value
928 new (slot) LocalType( &node, &Node::RemoveRenderer, renderer );
930 } // namespace SceneGraph
932 } // namespace Internal
936 #endif // __DALI_INTERNAL_SCENE_GRAPH_NODE_H_