X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fupdate%2Fnodes%2Fnode.h;h=a886a9b1afa4bead884cf5de4d201a584c58e267;hb=4e2aa476640b5ce5557e062c6349d1fbfd1ae005;hp=d1fa90bdce8edbd8497faa5e49fa9788b4c6667b;hpb=06964233260240585eff910098688625bc3eed2d;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/update/nodes/node.h b/dali/internal/update/nodes/node.h index d1fa90b..a886a9b 100644 --- a/dali/internal/update/nodes/node.h +++ b/dali/internal/update/nodes/node.h @@ -360,7 +360,12 @@ public: */ const Vector3& GetParentOrigin() const { - return mParentOrigin.Get(0); + if(mTransformManagerData.Id() != INVALID_TRANSFORM_ID) + { + return mParentOrigin.Get(0); + } + + return Vector3::ZERO; } /** @@ -378,7 +383,12 @@ public: */ const Vector3& GetAnchorPoint() const { - return mAnchorPoint.Get(0); + if(mTransformManagerData.Id() != INVALID_TRANSFORM_ID) + { + return mAnchorPoint.Get(0); + } + + return Vector3::ZERO; } /** @@ -411,7 +421,11 @@ public: */ const Vector3& GetWorldPosition(BufferIndex bufferIndex) const { - return mWorldPosition.Get(bufferIndex); + if(mTransformManagerData.Id() != INVALID_TRANSFORM_ID) + { + return mWorldPosition.Get(bufferIndex); + } + return Vector3::ZERO; } /** @@ -448,7 +462,11 @@ public: */ const Quaternion& GetWorldOrientation(BufferIndex bufferIndex) const { - return mWorldOrientation.Get(0); + if(mTransformManagerData.Id() != INVALID_TRANSFORM_ID) + { + return mWorldOrientation.Get(0); + } + return Quaternion::IDENTITY; } /** @@ -485,7 +503,11 @@ public: */ const Vector3& GetWorldScale(BufferIndex bufferIndex) const { - return mWorldScale.Get(0); + if(mTransformManagerData.Id() != INVALID_TRANSFORM_ID) + { + return mWorldScale.Get(0); + } + return Vector3::ONE; } /** @@ -686,7 +708,12 @@ public: */ const Matrix& GetWorldMatrix(BufferIndex bufferIndex) const { - return mWorldMatrix.Get(bufferIndex); + if(mTransformManagerData.Id() != INVALID_TRANSFORM_ID) + { + return mWorldMatrix.Get(bufferIndex); + } + + return Matrix::IDENTITY; } /** @@ -759,7 +786,11 @@ public: */ void SetDepthIndex(uint32_t depthIndex) { - mDepthIndex = depthIndex; + if(depthIndex != mDepthIndex) + { + SetDirtyFlag(NodePropertyFlags::DEPTH_INDEX); + mDepthIndex = depthIndex; + } } /**