/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
// INTERNAL INCLUDES
#include <dali/internal/common/internal-constants.h>
#include <dali/internal/common/memory-pool-object-allocator.h>
-#include <dali/internal/update/node-attachments/node-attachment.h>
#include <dali/internal/update/common/discard-queue.h>
#include <dali/public-api/common/dali-common.h>
#include <dali/public-api/common/constants.h>
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 ),
+ mClippingSortModifier( 0u ),
mParent( NULL ),
mExclusiveRenderTask( NULL ),
- mAttachment( 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;
void Node::OnDestroy()
{
- // Node attachments should be notified about the disconnection.
- if ( mAttachment )
- {
- mAttachment->OnDestroy();
- }
-
// Animators, Constraints etc. should be disconnected from the child's properties.
PropertyOwner::Destroy();
}
mWorldMatrix.Initialize( transformManager, mTransformId );
}
-void Node::Attach( NodeAttachment& object )
-{
- DALI_ASSERT_DEBUG(!mAttachment);
-
- object.SetParent(*this);
-
- mAttachment = &object;
- SetAllDirtyFlags();
-
- mAttachment->ConnectedToSceneGraph();
-}
-
void Node::SetRoot(bool isRoot)
{
DALI_ASSERT_DEBUG(!isRoot || mParent == NULL); // Root nodes cannot have a parent
// Inform property observers of new connection
childNode->ConnectToSceneGraph();
-
- // Inform child node attachment that the node has been added to the stage
- if( childNode->mAttachment )
- {
- childNode->mAttachment->ConnectedToSceneGraph();
- }
}
void Node::DisconnectChild( BufferIndex updateBufferIndex, Node& childNode )
// Remove all child pointers
mChildren.Clear();
- // Inform child node attachment that the node has been removed from the stage
- if( mAttachment )
- {
- mAttachment->DisconnectedFromSceneGraph();
- }
-
if( mTransformId != INVALID_TRANSFORM_ID )
{
mTransformManager->SetParent( mTransformId, INVALID_TRANSFORM_ID );