[3.0] Clipping API feature in Actor
[platform/core/uifw/dali-core.git] / dali / internal / update / nodes / node.cpp
index 0a7dc5a..e873a6f 100644 (file)
@@ -22,7 +22,6 @@
 #include <dali/internal/common/internal-constants.h>
 #include <dali/internal/common/memory-pool-object-allocator.h>
 #include <dali/internal/update/common/discard-queue.h>
-#include <dali/internal/update/manager/geometry-batcher.h>
 #include <dali/public-api/common/dali-common.h>
 #include <dali/public-api/common/constants.h>
 
@@ -50,34 +49,33 @@ Node* Node::New()
 }
 
 Node::Node()
-: mTransformManager( NULL ),
+: mTransformManager(0),
   mTransformId( INVALID_TRANSFORM_ID ),
   mParentOrigin( TRANSFORM_PROPERTY_PARENT_ORIGIN ),
   mAnchorPoint( TRANSFORM_PROPERTY_ANCHOR_POINT ),
-  mSize(TRANSFORM_PROPERTY_SIZE),     // zero initialized by default
-  mPosition(TRANSFORM_PROPERTY_POSITION), // zero initialized by default
-  mOrientation(), // initialized to identity by default
+  mSize( TRANSFORM_PROPERTY_SIZE ),                                               // Zero initialized by default
+  mPosition( TRANSFORM_PROPERTY_POSITION ),                                       // Zero initialized by default
+  mOrientation(),                                                                 // Initialized to identity by default
   mScale( TRANSFORM_PROPERTY_SCALE ),
   mVisible( true ),
   mColor( Color::WHITE ),
-  mWorldPosition(TRANSFORM_PROPERTY_WORLD_POSITION, Vector3(0.0f,0.0f,0.0f)), // zero initialized by default
-  mWorldScale( TRANSFORM_PROPERTY_WORLD_SCALE, Vector3(1.0f,1.0f,1.0f) ),
-  mWorldOrientation(), // initialized to identity by default
+  mWorldPosition( TRANSFORM_PROPERTY_WORLD_POSITION, Vector3( 0.0f,0.0f,0.0f ) ), // Zero initialized by default
+  mWorldScale( TRANSFORM_PROPERTY_WORLD_SCALE, Vector3( 1.0f,1.0f,1.0f ) ),
+  mWorldOrientation(),                                                            // Initialized to identity by default
   mWorldMatrix(),
   mWorldColor( Color::WHITE ),
-  mGeometryBatcher( NULL ),
-  mBatchIndex( BATCH_NULL_HANDLE ),
-  mIsBatchParent( false ),
+  mClippingSortModifier( 0u ),
   mParent( NULL ),
-  mBatchParent( NULL ),
   mExclusiveRenderTask( NULL ),
   mChildren(),
+  mClippingDepth( 0u ),
   mRegenerateUniformMap( 0 ),
-  mDepth(0u),
-  mDirtyFlags(AllFlags),
-  mIsRoot( false ),
+  mDepth( 0u ),
+  mDirtyFlags( AllFlags ),
   mDrawMode( DrawMode::NORMAL ),
-  mColorMode( DEFAULT_COLOR_MODE )
+  mColorMode( DEFAULT_COLOR_MODE ),
+  mClippingMode( ClippingMode::DISABLED ),
+  mIsRoot( false )
 {
   mUniformMapChanged[0] = 0u;
   mUniformMapChanged[1] = 0u;
@@ -216,35 +214,6 @@ void Node::DisconnectChild( BufferIndex updateBufferIndex, Node& childNode )
   found->RecursiveDisconnectFromSceneGraph( updateBufferIndex );
 }
 
-void Node::AddRenderer( Renderer* renderer )
-{
-  //Check that it has not been already added
-  unsigned int rendererCount( mRenderer.Size() );
-  for( unsigned int i(0); i<rendererCount; ++i )
-  {
-    if( mRenderer[i] == renderer )
-    {
-      //Renderer already in the list
-      return;
-    }
-  }
-
-  //If it is the first renderer added, make sure the world transform will be calculated
-  //in the next update as world transform is not computed if node has no renderers
-  if( rendererCount == 0 )
-  {
-    mDirtyFlags |= TransformFlag;
-  }
-
-  mRenderer.PushBack( renderer );
-
-  // Tell geometry batcher if should batch the child
-  if( mRenderer.Size() == 1 && mRenderer[0]->mBatchingEnabled )
-  {
-    mGeometryBatcher->AddNode( this );
-  }
-}
-
 void Node::RemoveRenderer( Renderer* renderer )
 {
   unsigned int rendererCount( mRenderer.Size() );
@@ -286,7 +255,7 @@ void Node::ResetDefaultProperties( BufferIndex updateBufferIndex )
   mDirtyFlags = NothingFlag;
 }
 
-void Node::SetParent( Node& parentNode )
+void Node::SetParent(Node& parentNode)
 {
   DALI_ASSERT_ALWAYS(this != &parentNode);
   DALI_ASSERT_ALWAYS(!mIsRoot);
@@ -301,29 +270,6 @@ void Node::SetParent( Node& parentNode )
   }
 }
 
-void Node::SetBatchParent( Node* batchParentNode )
-{
-  DALI_ASSERT_ALWAYS(!mIsRoot);
-  mBatchParent = batchParentNode;
-}
-
-void Node::SetIsBatchParent( bool enabled )
-{
-  if( mIsBatchParent != enabled )
-  {
-    mIsBatchParent = enabled;
-
-    if( enabled )
-    {
-      mGeometryBatcher->AddBatchParent( this );
-    }
-    else
-    {
-      mGeometryBatcher->RemoveBatchParent( this );
-    }
-  }
-}
-
 void Node::RecursiveDisconnectFromSceneGraph( BufferIndex updateBufferIndex )
 {
   DALI_ASSERT_ALWAYS(!mIsRoot);