/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
const SceneGraph::Node* node = GetNodeWithId( id );
if( node )
{
- position = mTransformManager.GetVector3PropertyValue( node->mTransformId, SceneGraph::TRANSFORM_PROPERTY_POSITION );
+ const SceneGraph::TransformManager& transformManager = mTransformManager; // To ensure we call the const getter
+ position = transformManager.GetVector3PropertyValue( node->mTransformId, SceneGraph::TRANSFORM_PROPERTY_POSITION );
success = true;
}
return success;
const SceneGraph::Node* node = GetNodeWithId( id );
if( node )
{
- size = mTransformManager.GetVector3PropertyValue( node->mTransformId, SceneGraph::TRANSFORM_PROPERTY_SIZE );
+ const SceneGraph::TransformManager& transformManager = mTransformManager; // To ensure we call the const getter
+ size = transformManager.GetVector3PropertyValue( node->mTransformId, SceneGraph::TRANSFORM_PROPERTY_SIZE );
success = true;
}
return success;
const SceneGraph::Node* node = GetNodeWithId( id );
if( node )
{
- position = mTransformManager.GetVector3PropertyValue( node->mTransformId, SceneGraph::TRANSFORM_PROPERTY_POSITION );
- size = mTransformManager.GetVector3PropertyValue( node->mTransformId, SceneGraph::TRANSFORM_PROPERTY_SIZE );
+ const SceneGraph::TransformManager& transformManager = mTransformManager; // To ensure we call the const getter
+ position = transformManager.GetVector3PropertyValue( node->mTransformId, SceneGraph::TRANSFORM_PROPERTY_POSITION );
+ size = transformManager.GetVector3PropertyValue( node->mTransformId, SceneGraph::TRANSFORM_PROPERTY_SIZE );
success = true;
}
return success;
const SceneGraph::Node* node = GetNodeWithId( id );
if( node )
{
- scale = mTransformManager.GetVector3PropertyValue( node->mTransformId, SceneGraph::TRANSFORM_PROPERTY_SCALE );
+ const SceneGraph::TransformManager& transformManager = mTransformManager; // To ensure we call the const getter
+ scale = transformManager.GetVector3PropertyValue( node->mTransformId, SceneGraph::TRANSFORM_PROPERTY_SCALE );
success = true;
}
bool UpdateProxy::GetColor( uint32_t id, Vector4& color ) const
{
bool success = false;
- SceneGraph::Node* node = GetNodeWithId( id );
+ const SceneGraph::Node* node = GetNodeWithId( id );
if( node )
{
color = node->mColor.Get( mCurrentBufferIndex );