// CLASS HEADER
#include <dali/internal/update/manager/update-proxy-impl.h>
+// INTERNAL INCLUDES
+#include <dali/internal/update/manager/update-proxy-property-modifier.h>
+
namespace Dali
{
namespace
{
-SceneGraph::Node* FindNodeInSceneGraph( unsigned int id, SceneGraph::Node& node )
+SceneGraph::Node* FindNodeInSceneGraph( uint32_t id, SceneGraph::Node& node )
{
SceneGraph::Node* matchingNode = NULL;
} // unnamed namespace
-UpdateProxy::UpdateProxy( SceneGraph::TransformManager& transformManager, SceneGraph::Node& rootNode )
+UpdateProxy::UpdateProxy( SceneGraph::UpdateManager& updateManager, SceneGraph::TransformManager& transformManager, SceneGraph::Node& rootNode )
: mNodeContainer(),
mLastCachedIdNodePair( { 0u, NULL } ),
mCurrentBufferIndex( 0u ),
+ mUpdateManager( updateManager ),
mTransformManager( transformManager ),
- mRootNode( rootNode )
+ mRootNode( rootNode ),
+ mPropertyModifier( nullptr )
{
}
{
}
-bool UpdateProxy::GetPosition( unsigned int id, Vector3& position ) const
+bool UpdateProxy::GetPosition( uint32_t id, Vector3& position ) const
{
bool success = false;
const SceneGraph::Node* node = GetNodeWithId( id );
return success;
}
-bool UpdateProxy::SetPosition( unsigned int id, const Vector3& position )
+bool UpdateProxy::SetPosition( uint32_t id, const Vector3& position )
{
bool success = false;
SceneGraph::Node* node = GetNodeWithId( id );
return success;
}
-bool UpdateProxy::BakePosition( unsigned int id, const Vector3& position )
+bool UpdateProxy::BakePosition( uint32_t id, const Vector3& position )
{
bool success = false;
SceneGraph::Node* node = GetNodeWithId( id );
return success;
}
-bool UpdateProxy::GetSize( unsigned int id, Vector3& size ) const
+bool UpdateProxy::GetSize( uint32_t id, Vector3& size ) const
{
bool success = false;
const SceneGraph::Node* node = GetNodeWithId( id );
return success;
}
-bool UpdateProxy::SetSize( unsigned int id, const Vector3& size )
+bool UpdateProxy::SetSize( uint32_t id, const Vector3& size )
{
bool success = false;
SceneGraph::Node* node = GetNodeWithId( id );
return success;
}
-bool UpdateProxy::BakeSize( unsigned int id, const Vector3& size )
+bool UpdateProxy::BakeSize( uint32_t id, const Vector3& size )
{
bool success = false;
SceneGraph::Node* node = GetNodeWithId( id );
return success;
}
-bool UpdateProxy::GetPositionAndSize( unsigned int id, Vector3& position, Vector3& size ) const
+bool UpdateProxy::GetPositionAndSize( uint32_t id, Vector3& position, Vector3& size ) const
{
bool success = false;
const SceneGraph::Node* node = GetNodeWithId( id );
return success;
}
-bool UpdateProxy::GetScale( unsigned int id, Vector3& scale ) const
+bool UpdateProxy::GetScale( uint32_t id, Vector3& scale ) const
{
bool success = false;
const SceneGraph::Node* node = GetNodeWithId( id );
return success;
}
-bool UpdateProxy::SetScale( unsigned int id, const Vector3& scale )
+bool UpdateProxy::SetScale( uint32_t id, const Vector3& scale )
{
bool success = false;
SceneGraph::Node* node = GetNodeWithId( id );
return success;
}
-bool UpdateProxy::BakeScale( unsigned int id, const Vector3& scale )
+bool UpdateProxy::BakeScale( uint32_t id, const Vector3& scale )
{
bool success = false;
SceneGraph::Node* node = GetNodeWithId( id );
return success;
}
-bool UpdateProxy::GetColor( unsigned int id, Vector4& color ) const
+bool UpdateProxy::GetColor( uint32_t id, Vector4& color ) const
{
bool success = false;
SceneGraph::Node* node = GetNodeWithId( id );
return success;
}
-bool UpdateProxy::SetColor( unsigned int id, const Vector4& color ) const
+bool UpdateProxy::SetColor( uint32_t id, const Vector4& color )
{
bool success = false;
SceneGraph::Node* node = GetNodeWithId( id );
if( node )
{
node->mColor.Set( mCurrentBufferIndex, color );
+ node->SetDirtyFlag( SceneGraph::NodePropertyFlags::COLOR );
+ AddResetter( *node, node->mColor );
success = true;
}
return success;
}
-bool UpdateProxy::BakeColor( unsigned int id, const Vector4& color ) const
+bool UpdateProxy::BakeColor( uint32_t id, const Vector4& color )
{
bool success = false;
SceneGraph::Node* node = GetNodeWithId( id );
{
mLastCachedIdNodePair = { 0u, NULL };
mNodeContainer.clear();
+ mPropertyModifier.reset();
}
-SceneGraph::Node* UpdateProxy::GetNodeWithId( unsigned int id ) const
+SceneGraph::Node* UpdateProxy::GetNodeWithId( uint32_t id ) const
{
SceneGraph::Node* node = NULL;
return node;
}
+void UpdateProxy::AddResetter( SceneGraph::Node& node, SceneGraph::PropertyBase& propertyBase )
+{
+ if( ! mPropertyModifier )
+ {
+ mPropertyModifier = PropertyModifierPtr( new PropertyModifier( mUpdateManager ) );
+ }
+ mPropertyModifier->AddResetter( node, propertyBase );
+}
+
} // namespace Internal
} // namespace Dali