projects
/
platform
/
core
/
uifw
/
dali-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revert "[Tizen] Add temporaty log to node"
[platform/core/uifw/dali-core.git]
/
dali
/
internal
/
update
/
manager
/
transform-manager-property.h
diff --git
a/dali/internal/update/manager/transform-manager-property.h
b/dali/internal/update/manager/transform-manager-property.h
index
f64d65e
..
619abee
100644
(file)
--- a/
dali/internal/update/manager/transform-manager-property.h
+++ b/
dali/internal/update/manager/transform-manager-property.h
@@
-2,7
+2,7
@@
#define TRANSFORM_MANAGER_PROPERTY_H_
/*
#define TRANSFORM_MANAGER_PROPERTY_H_
/*
- * Copyright (c) 20
16
Samsung Electronics Co., Ltd.
+ * Copyright (c) 20
21
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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@
-18,8
+18,8
@@
*
*/
*
*/
-#include <dali/internal/update/manager/transform-manager.h>
#include <dali/internal/update/common/animatable-property.h>
#include <dali/internal/update/common/animatable-property.h>
+#include <dali/internal/update/manager/transform-manager.h>
namespace Dali
{
namespace Dali
{
@@
-27,43
+27,48
@@
namespace Internal
{
namespace SceneGraph
{
{
namespace SceneGraph
{
-
-template <typename T>
+template<typename T>
struct TransformManagerPropertyHandler : public AnimatablePropertyBase
{
/**
* Constructor
*/
struct TransformManagerPropertyHandler : public AnimatablePropertyBase
{
/**
* Constructor
*/
- TransformManagerPropertyHandler()
- :mTxManager(0),
- mId( INVALID_TRANSFORM_ID )
- {}
+ TransformManagerPropertyHandler() = default;
/**
* @copydoc Dali::Internal::SceneGraph::PropertyBase::GetType()
*/
/**
* @copydoc Dali::Internal::SceneGraph::PropertyBase::GetType()
*/
-
virtual Dali::Property::Type GetType() const
= 0;
+
Dali::Property::Type GetType() const override
= 0;
/**
* @copydoc Dali::SceneGraph::AnimatableProperty::Get()
*/
/**
* @copydoc Dali::SceneGraph::AnimatableProperty::Get()
*/
- virtual T& Get(
size_t
bufferIndex) = 0;
+ virtual T& Get(
BufferIndex
bufferIndex) = 0;
/**
* @copydoc Dali::SceneGraph::AnimatableProperty::Get()
*/
/**
* @copydoc Dali::SceneGraph::AnimatableProperty::Get()
*/
- virtual const T& Get(
size_t
bufferIndex) const = 0;
+ virtual const T& Get(
BufferIndex
bufferIndex) const = 0;
/**
* @copydoc Dali::PropertyInput::GetVector3()
*/
/**
* @copydoc Dali::PropertyInput::GetVector3()
*/
- virtual const Vector3& GetVector3( BufferIndex bufferIndex ) const{ return Vector3::ZERO; }
+ const Vector3& GetVector3(BufferIndex bufferIndex) const override
+ {
+ return Vector3::ZERO;
+ }
/**
* Retrieve a component of property
* @param[in] component The component of the property
*/
/**
* Retrieve a component of property
* @param[in] component The component of the property
*/
- virtual const float& GetFloatComponent(unsigned int component)=0;
+ virtual const float& GetFloatComponent(uint32_t component) const
+ {
+ DALI_ASSERT_DEBUG(0 && "Invalid call");
+
+ static const float value = 0.0f;
+ return value;
+ }
/**
* Set the property value. This will only persist for the current frame; the property
/**
* Set the property value. This will only persist for the current frame; the property
@@
-78,7
+83,9
@@
struct TransformManagerPropertyHandler : public AnimatablePropertyBase
* @param[in] value The new value of the component
* @param[in] component The component of the property
*/
* @param[in] value The new value of the component
* @param[in] component The component of the property
*/
- virtual void SetFloatComponent( float value, unsigned int component){}
+ virtual void SetFloatComponent(float value, uint32_t component)
+ {
+ }
/**
* @copydoc Dali::AnimatableProperty::Bake()
/**
* @copydoc Dali::AnimatableProperty::Bake()
@@
-90,22
+97,30
@@
struct TransformManagerPropertyHandler : public AnimatablePropertyBase
* @param[in] value The new value of the component
* @param[in] component The component of the property
*/
* @param[in] value The new value of the component
* @param[in] component The component of the property
*/
- virtual void BakeFloatComponent( float value, unsigned int component){}
+ virtual void BakeFloatComponent(float value, uint32_t component)
+ {
+ }
/**
* @copydoc Dali::AnimatableProperty::BakeX()
*/
/**
* @copydoc Dali::AnimatableProperty::BakeX()
*/
- virtual void BakeX(BufferIndex bufferIndex, float value){}
+ virtual void BakeX(BufferIndex bufferIndex, float value)
+ {
+ }
/**
* @copydoc Dali::AnimatableProperty::BakeY()
*/
/**
* @copydoc Dali::AnimatableProperty::BakeY()
*/
- virtual void BakeY(BufferIndex bufferIndex, float value){}
+ virtual void BakeY(BufferIndex bufferIndex, float value)
+ {
+ }
/**
* @copydoc Dali::AnimatableProperty::BakeZ()
*/
/**
* @copydoc Dali::AnimatableProperty::BakeZ()
*/
- virtual void BakeZ(BufferIndex bufferIndex, float value){}
+ virtual void BakeZ(BufferIndex bufferIndex, float value)
+ {
+ }
/**
* @copydoc Dali::AnimatableProperty::BakeRelative()
/**
* @copydoc Dali::AnimatableProperty::BakeRelative()
@@
-120,175
+135,165
@@
struct TransformManagerPropertyHandler : public AnimatablePropertyBase
/**
* @copydoc Dali::AnimatableProperty::ResetToBaseValue()
*/
/**
* @copydoc Dali::AnimatableProperty::ResetToBaseValue()
*/
- virtual void ResetToBaseValue(BufferIndex updateBufferIndex){}
+ void ResetToBaseValue(BufferIndex updateBufferIndex) override
+ {
+ }
/**
* @copydoc Dali::AnimatableProperty::IsClean()
*/
/**
* @copydoc Dali::AnimatableProperty::IsClean()
*/
- virtual bool IsClean() const{ return false; }
+ bool IsClean() const override
+ {
+ return false;
+ }
/**
* Initializes the property
* @param[in] transformManager Pointer to the transform manager
* @param[in] Id of the transformation the property is associated with
*/
/**
* Initializes the property
* @param[in] transformManager Pointer to the transform manager
* @param[in] Id of the transformation the property is associated with
*/
- void Initialize(
TransformManager* transformManager, TransformId id
)
+ void Initialize(
TransformManagerData* data
)
{
{
-
mTxManager = transformManager
;
- m
Id = id
;
+
DALI_ASSERT_ALWAYS(data != nullptr && data->Manager() != nullptr)
;
+ m
TxManagerData = data
;
}
/**
* @copydoc Dali::Internal::PropertyInputImpl::IsTransformManagerProperty()
*/
}
/**
* @copydoc Dali::Internal::PropertyInputImpl::IsTransformManagerProperty()
*/
- virtual bool IsTransformManagerProperty() const
+ bool IsTransformManagerProperty() const override
{
return true;
}
{
return true;
}
- TransformManager* mTxManager;
- TransformId mId;
+ TransformManagerData* mTxManagerData{nullptr};
};
};
-struct TransformManagerPropertyVector3 : public TransformManagerPropertyHandler<Vector3>
+template<TransformManagerProperty PropertyT>
+struct TransformManagerPropertyVector3 final : public TransformManagerPropertyHandler<Vector3>
{
{
+ TransformManagerPropertyVector3() = default;
- TransformManagerPropertyVector3(TransformManagerProperty property)
- :TransformManagerPropertyHandler(),
- mProperty( property )
- {}
-
- Dali::Property::Type GetType() const
+ Dali::Property::Type GetType() const override
{
return Dali::PropertyTypes::Get<Vector3>();
}
{
return Dali::PropertyTypes::Get<Vector3>();
}
- Vector3& Get(
size_t bufferIndex)
+ Vector3& Get(
BufferIndex bufferIndex) override
{
{
- return mTxManager
->GetVector3PropertyValue( mId, mProperty
);
+ return mTxManager
Data->Manager()->GetVector3PropertyValue(mTxManagerData->Id(), PropertyT
);
}
}
- const Vector3& Get(
size_t bufferIndex) const
+ const Vector3& Get(
BufferIndex bufferIndex) const override
{
{
- return mTxManager
->GetVector3PropertyValue( mId, mProperty
);
+ return mTxManager
Data->Manager()->GetVector3PropertyValue(mTxManagerData->Id(), PropertyT
);
}
}
- virtual const Vector3& GetVector3( BufferIndex bufferIndex ) const
+ const Vector3& GetVector3(BufferIndex bufferIndex) const override
{
return Get(bufferIndex);
}
{
return Get(bufferIndex);
}
- const float& GetFloatComponent(
unsigned int component )
+ const float& GetFloatComponent(
uint32_t component) const override
{
{
- return mTxManager
->GetVector3PropertyComponentValue( mId, mProperty, component
);
+ return mTxManager
Data->Manager()->GetVector3PropertyComponentValue(mTxManagerData->Id(), PropertyT, component
);
}
}
- void Set(BufferIndex bufferIndex, const Vector3& value)
+ void Set(BufferIndex bufferIndex, const Vector3& value)
override
{
{
- mTxManager
->SetVector3PropertyValue( mId, mProperty, value
);
+ mTxManager
Data->Manager()->SetVector3PropertyValue(mTxManagerData->Id(), PropertyT, value
);
}
}
- void SetComponent(BufferIndex bufferIndex, float value, u
nsigned in
t component)
+ void SetComponent(BufferIndex bufferIndex, float value, u
int32_
t component)
{
{
- mTxManager
->SetVector3PropertyComponentValue( mId, mProperty
, value, component);
+ mTxManager
Data->Manager()->SetVector3PropertyComponentValue(mTxManagerData->Id(), PropertyT
, value, component);
}
}
- void BakeComponent(BufferIndex bufferIndex, float value, u
nsigned in
t component)
+ void BakeComponent(BufferIndex bufferIndex, float value, u
int32_
t component)
{
{
- mTxManager
->BakeVector3PropertyComponentValue( mId, mProperty
, value, component);
+ mTxManager
Data->Manager()->BakeVector3PropertyComponentValue(mTxManagerData->Id(), PropertyT
, value, component);
}
}
- void Bake(BufferIndex bufferIndex, const Vector3& value)
+ void Bake(BufferIndex bufferIndex, const Vector3& value)
override
{
{
- mTxManager
->BakeVector3PropertyValue(mId, mProperty, value
);
+ mTxManager
Data->Manager()->BakeVector3PropertyValue(mTxManagerData->Id(), PropertyT, value
);
}
}
- void BakeX(BufferIndex bufferIndex, float value)
+ void BakeX(BufferIndex bufferIndex, float value)
override
{
{
- mTxManager
->BakeXVector3PropertyValue(mId, mProperty, value
);
+ mTxManager
Data->Manager()->BakeXVector3PropertyValue(mTxManagerData->Id(), PropertyT, value
);
}
}
- void BakeY(BufferIndex bufferIndex, float value)
+ void BakeY(BufferIndex bufferIndex, float value)
override
{
{
- mTxManager
->BakeYVector3PropertyValue(mId, mProperty, value
);
+ mTxManager
Data->Manager()->BakeYVector3PropertyValue(mTxManagerData->Id(), PropertyT, value
);
}
}
- void BakeZ(BufferIndex bufferIndex, float value)
+ void BakeZ(BufferIndex bufferIndex, float value)
override
{
{
- mTxManager
->BakeZVector3PropertyValue(mId, mProperty, value
);
+ mTxManager
Data->Manager()->BakeZVector3PropertyValue(mTxManagerData->Id(), PropertyT, value
);
}
}
- void SetFloatComponent(
float value, unsigned int component)
+ void SetFloatComponent(
float value, uint32_t component) override
{
{
- mTxManager
->SetVector3PropertyComponentValue( mId, mProperty
, value, component);
+ mTxManager
Data->Manager()->SetVector3PropertyComponentValue(mTxManagerData->Id(), PropertyT
, value, component);
}
}
- void BakeFloatComponent(
float value, unsigned int component )
+ void BakeFloatComponent(
float value, uint32_t component) override
{
{
- mTxManager
->BakeVector3PropertyComponentValue( mId, mProperty
, value, component);
+ mTxManager
Data->Manager()->BakeVector3PropertyComponentValue(mTxManagerData->Id(), PropertyT
, value, component);
}
}
- void BakeRelative(BufferIndex bufferIndex, const Vector3& value)
+ void BakeRelative(BufferIndex bufferIndex, const Vector3& value)
override
{
{
- mTxManager
->BakeRelativeVector3PropertyValue(mId, mProperty, value
);
+ mTxManager
Data->Manager()->BakeRelativeVector3PropertyValue(mTxManagerData->Id(), PropertyT, value
);
}
}
- void BakeRelativeMultiply(BufferIndex bufferIndex, const Vector3& value)
+ void BakeRelativeMultiply(BufferIndex bufferIndex, const Vector3& value)
override
{
{
- mTxManager
->BakeMultiplyVector3PropertyValue(mId, mProperty, value
);
+ mTxManager
Data->Manager()->BakeMultiplyVector3PropertyValue(mTxManagerData->Id(), PropertyT, value
);
}
}
-
- TransformManagerProperty mProperty;
};
};
-class TransformManagerPropertyQuaternion : public TransformManagerPropertyHandler<Quaternion>
+class TransformManagerPropertyQuaternion
final
: public TransformManagerPropertyHandler<Quaternion>
{
public:
{
public:
+ TransformManagerPropertyQuaternion() = default;
- TransformManagerPropertyQuaternion()
- :TransformManagerPropertyHandler()
- {}
-
- virtual Dali::Property::Type GetType() const
+ Dali::Property::Type GetType() const override
{
return Dali::PropertyTypes::Get<Quaternion>();
}
{
return Dali::PropertyTypes::Get<Quaternion>();
}
- Quaternion& Get(
size_t bufferIndex)
+ Quaternion& Get(
BufferIndex bufferIndex) override
{
{
- return mTxManager
->GetQuaternionPropertyValue( mId
);
+ return mTxManager
Data->Manager()->GetQuaternionPropertyValue(mTxManagerData->Id()
);
}
}
- const Quaternion& Get(
size_t bufferIndex) const
+ const Quaternion& Get(
BufferIndex bufferIndex) const override
{
{
- return mTxManager
->GetQuaternionPropertyValue( mId
);
+ return mTxManager
Data->Manager()->GetQuaternionPropertyValue(mTxManagerData->Id()
);
}
}
- const float& GetFloatComponent( unsigned int component)
+ void Set(BufferIndex bufferIndex, const Quaternion& value) override
{
{
- return mTxManager
->GetQuaternionPropertyValue( mId ).mVector[component]
;
+ return mTxManager
Data->Manager()->SetQuaternionPropertyValue(mTxManagerData->Id(), value)
;
}
}
- void
Set(BufferIndex bufferIndex, const Quaternion& value)
+ void
Bake(BufferIndex bufferIndex, const Quaternion& value) override
{
{
- return mTxManager
->SetQuaternionPropertyValue( mId, value
);
+ return mTxManager
Data->Manager()->BakeQuaternionPropertyValue(mTxManagerData->Id(), value
);
}
}
- void Bake
(BufferIndex bufferIndex, const Quaternion& value)
+ void Bake
Relative(BufferIndex bufferIndex, const Quaternion& value) override
{
{
- return mTxManager
->BakeQuaternionPropertyValue( mId, value
);
+ return mTxManager
Data->Manager()->BakeRelativeQuaternionPropertyValue(mTxManagerData->Id(), value
);
}
}
- void BakeRelative(BufferIndex bufferIndex, const Quaternion& value)
- {
- return mTxManager->BakeRelativeQuaternionPropertyValue( mId, value );
- }
-
- virtual const Quaternion& GetQuaternion( BufferIndex bufferIndex ) const
+ const Quaternion& GetQuaternion(BufferIndex bufferIndex) const override
{
return Get(bufferIndex);
}
{
return Get(bufferIndex);
}
-
};
/**
};
/**
@@
-297,28
+302,24
@@
public:
class TransformManagerVector3Input : public PropertyInputImpl
{
public:
class TransformManagerVector3Input : public PropertyInputImpl
{
public:
-
/**
* Create an TransformManagerVector3Input
*/
/**
* Create an TransformManagerVector3Input
*/
- TransformManagerVector3Input( TransformManagerProperty property, const Vector3& initialValue )
- :mTxManager(0),
- mId(INVALID_TRANSFORM_ID),
- mProperty(property),
- mValue(initialValue)
- {}
+ TransformManagerVector3Input(TransformManagerProperty property, const Vector3& initialValue)
+ : mProperty(property),
+ mValue(initialValue)
+ {
+ }
/**
* Virtual destructor.
*/
/**
* Virtual destructor.
*/
- virtual ~TransformManagerVector3Input()
- {
- }
+ ~TransformManagerVector3Input() override = default;
/**
* @copydoc Dali::Internal::SceneGraph::PropertyBase::GetType()
*/
/**
* @copydoc Dali::Internal::SceneGraph::PropertyBase::GetType()
*/
- virtual Dali::Property::Type GetType() const
+ Dali::Property::Type GetType() const override
{
return Dali::PropertyTypes::Get<Vector3>();
}
{
return Dali::PropertyTypes::Get<Vector3>();
}
@@
-334,7
+335,7
@@
public:
/**
* @copydoc Dali::Internal::PropertyInputImpl::InputInitialized()
*/
/**
* @copydoc Dali::Internal::PropertyInputImpl::InputInitialized()
*/
- virtual bool InputInitialized() const
+ bool InputInitialized() const override
{
return true;
}
{
return true;
}
@@
-343,7
+344,7
@@
public:
* @copydoc Dali::Internal::PropertyInputImpl::InputChanged()
* @note A constraint can only receive the inherited property from the previous frame.
*/
* @copydoc Dali::Internal::PropertyInputImpl::InputChanged()
* @note A constraint can only receive the inherited property from the previous frame.
*/
- virtual bool InputChanged() const
+ bool InputChanged() const override
{
return true;
}
{
return true;
}
@@
-354,17
+355,17
@@
public:
*/
void ComputeTransformComponent() const
{
*/
void ComputeTransformComponent() const
{
- if(
mTxManager
)
+ if(
mTxManagerData
)
{
{
- const Matrix& worldMatrix = mTxManager
->GetWorldMatrix(mId
);
+ const Matrix& worldMatrix = mTxManager
Data->Manager()->GetWorldMatrix(mTxManagerData->Id()
);
- if(
mProperty == TRANSFORM_PROPERTY_WORLD_POSITION
)
+ if(
mProperty == TRANSFORM_PROPERTY_WORLD_POSITION
)
{
mValue = worldMatrix.GetTranslation3();
}
{
mValue = worldMatrix.GetTranslation3();
}
- else if(
mProperty == TRANSFORM_PROPERTY_WORLD_SCALE
)
+ else if(
mProperty == TRANSFORM_PROPERTY_WORLD_SCALE
)
{
{
- Vector3 position;
+ Vector3
position;
Quaternion orientation;
worldMatrix.GetTransformComponents(position, orientation, mValue);
}
Quaternion orientation;
worldMatrix.GetTransformComponents(position, orientation, mValue);
}
@@
-374,7
+375,7
@@
public:
/**
* @copydoc Dali::PropertyInput::GetVector3()
*/
/**
* @copydoc Dali::PropertyInput::GetVector3()
*/
- virtual const Vector3& GetVector3( BufferIndex bufferIndex ) const
+ const Vector3& GetVector3(BufferIndex bufferIndex) const override
{
ComputeTransformComponent();
return mValue;
{
ComputeTransformComponent();
return mValue;
@@
-383,7
+384,7
@@
public:
/**
* @copydoc Dali::PropertyInput::GetConstraintInputVector3()
*/
/**
* @copydoc Dali::PropertyInput::GetConstraintInputVector3()
*/
- virtual const Vector3& GetConstraintInputVector3( BufferIndex bufferIndex ) const
+ const Vector3& GetConstraintInputVector3(BufferIndex bufferIndex) const override
{
ComputeTransformComponent();
return mValue;
{
ComputeTransformComponent();
return mValue;
@@
-392,7
+393,7
@@
public:
/**
* @copydoc Dali::SceneGraph::PropertyInterface::Get()
*/
/**
* @copydoc Dali::SceneGraph::PropertyInterface::Get()
*/
- Vector3& Get(
size_t
bufferIndex)
+ Vector3& Get(
BufferIndex
bufferIndex)
{
ComputeTransformComponent();
return mValue;
{
ComputeTransformComponent();
return mValue;
@@
-401,7
+402,7
@@
public:
/**
* @copydoc Dali::SceneGraph::PropertyInterface::Get()
*/
/**
* @copydoc Dali::SceneGraph::PropertyInterface::Get()
*/
- const Vector3& Get(
size_t
bufferIndex) const
+ const Vector3& Get(
BufferIndex
bufferIndex) const
{
ComputeTransformComponent();
return mValue;
{
ComputeTransformComponent();
return mValue;
@@
-412,7
+413,7
@@
public:
* @param[in] bufferIndex The buffer to read.
* @return The property value.
*/
* @param[in] bufferIndex The buffer to read.
* @return The property value.
*/
- const Vector3& operator[](
size_t
bufferIndex) const
+ const Vector3& operator[](
BufferIndex
bufferIndex) const
{
ComputeTransformComponent();
return mValue;
{
ComputeTransformComponent();
return mValue;
@@
-423,22
+424,21
@@
public:
* @param[in] transformManager Pointer to the transform manager
* @param[in] Id of the transformation the property is associated with
*/
* @param[in] transformManager Pointer to the transform manager
* @param[in] Id of the transformation the property is associated with
*/
- void Initialize(
TransformManager* transformManager, TransformId id
)
+ void Initialize(
TransformManagerData* data
)
{
{
-
mTxManager = transformManager
;
- m
Id = id
;
+
DALI_ASSERT_ALWAYS(data != nullptr && data->Manager() != nullptr)
;
+ m
TxManagerData = data
;
}
/**
* @copydoc Dali::Internal::PropertyInputImpl::IsTransformManagerProperty()
*/
}
/**
* @copydoc Dali::Internal::PropertyInputImpl::IsTransformManagerProperty()
*/
- virtual bool IsTransformManagerProperty() const
+ bool IsTransformManagerProperty() const override
{
return true;
}
private:
{
return true;
}
private:
-
// Undefined
TransformManagerVector3Input(const TransformManagerVector3Input& property);
// Undefined
TransformManagerVector3Input(const TransformManagerVector3Input& property);
@@
-446,41
+446,26
@@
private:
TransformManagerVector3Input& operator=(const TransformManagerVector3Input& rhs);
public:
TransformManagerVector3Input& operator=(const TransformManagerVector3Input& rhs);
public:
-
- TransformManager* mTxManager;
- TransformId mId;
+ TransformManagerData* mTxManagerData{nullptr};
TransformManagerProperty mProperty;
TransformManagerProperty mProperty;
- mutable Vector3 mValue;
+ mutable Vector3
mValue;
};
/**
* A Quaternion property used as input.
*/
};
/**
* A Quaternion property used as input.
*/
-class TransformManagerQuaternionInput : public PropertyInputImpl
+class TransformManagerQuaternionInput
final
: public PropertyInputImpl
{
public:
{
public:
-
/**
* Constructor
*/
/**
* Constructor
*/
- TransformManagerQuaternionInput()
- :mTxManager(0),
- mId(INVALID_TRANSFORM_ID),
- mValue(1.0f,0.0f,0.0f,0.0f)
- {
- }
-
- /**
- * Virtual destructor.
- */
- virtual ~TransformManagerQuaternionInput()
- {
- }
+ TransformManagerQuaternionInput() = default;
/**
* @copydoc Dali::Internal::SceneGraph::PropertyBase::GetType()
*/
/**
* @copydoc Dali::Internal::SceneGraph::PropertyBase::GetType()
*/
- virtual Dali::Property::Type GetType() const
+ Dali::Property::Type GetType() const override
{
return Dali::PropertyTypes::Get<Quaternion>();
}
{
return Dali::PropertyTypes::Get<Quaternion>();
}
@@
-496,7
+481,7
@@
public:
/**
* @copydoc Dali::Internal::PropertyInputImpl::InputInitialized()
*/
/**
* @copydoc Dali::Internal::PropertyInputImpl::InputInitialized()
*/
- virtual bool InputInitialized() const
+ bool InputInitialized() const override
{
return true;
}
{
return true;
}
@@
-505,7
+490,7
@@
public:
* @copydoc Dali::Internal::PropertyInputImpl::InputChanged()
* @note A constraint can only receive the inherited property from the previous frame.
*/
* @copydoc Dali::Internal::PropertyInputImpl::InputChanged()
* @note A constraint can only receive the inherited property from the previous frame.
*/
- virtual bool InputChanged() const
+ bool InputChanged() const override
{
return true;
}
{
return true;
}
@@
-516,10
+501,10
@@
public:
*/
void ComputeTransformComponent() const
{
*/
void ComputeTransformComponent() const
{
- if(
mTxManager
)
+ if(
mTxManagerData
)
{
{
- const Matrix& worldMatrix = mTxManager
->GetWorldMatrix(mId
);
- Vector3 position, scale;
+ const Matrix& worldMatrix = mTxManager
Data->Manager()->GetWorldMatrix(mTxManagerData->Id()
);
+ Vector3
position, scale;
worldMatrix.GetTransformComponents(position, mValue, scale);
}
}
worldMatrix.GetTransformComponents(position, mValue, scale);
}
}
@@
-527,7
+512,7
@@
public:
/**
* @copydoc Dali::PropertyInput::GetQuaternion()
*/
/**
* @copydoc Dali::PropertyInput::GetQuaternion()
*/
- virtual const Quaternion& GetQuaternion( BufferIndex bufferIndex ) const
+ const Quaternion& GetQuaternion(BufferIndex bufferIndex) const override
{
ComputeTransformComponent();
return mValue;
{
ComputeTransformComponent();
return mValue;
@@
-536,7
+521,7
@@
public:
/**
* @copydoc Dali::PropertyInput::GetConstraintInputQuaternion()
*/
/**
* @copydoc Dali::PropertyInput::GetConstraintInputQuaternion()
*/
- virtual const Quaternion& GetConstraintInputQuaternion( BufferIndex bufferIndex ) const
+ const Quaternion& GetConstraintInputQuaternion(BufferIndex bufferIndex) const override
{
ComputeTransformComponent();
return mValue;
{
ComputeTransformComponent();
return mValue;
@@
-545,7
+530,7
@@
public:
/**
* @copydoc Dali::SceneGraph::PropertyInterface::Get()
*/
/**
* @copydoc Dali::SceneGraph::PropertyInterface::Get()
*/
- Quaternion& Get(
size_t
bufferIndex)
+ Quaternion& Get(
BufferIndex
bufferIndex)
{
ComputeTransformComponent();
return mValue;
{
ComputeTransformComponent();
return mValue;
@@
-554,7
+539,7
@@
public:
/**
* @copydoc Dali::SceneGraph::PropertyInterface::Get()
*/
/**
* @copydoc Dali::SceneGraph::PropertyInterface::Get()
*/
- const Quaternion& Get(
size_t
bufferIndex) const
+ const Quaternion& Get(
BufferIndex
bufferIndex) const
{
ComputeTransformComponent();
return mValue;
{
ComputeTransformComponent();
return mValue;
@@
-565,7
+550,7
@@
public:
* @param[in] bufferIndex The buffer to read.
* @return The property value.
*/
* @param[in] bufferIndex The buffer to read.
* @return The property value.
*/
- const Quaternion& operator[](
size_t
bufferIndex) const
+ const Quaternion& operator[](
BufferIndex
bufferIndex) const
{
ComputeTransformComponent();
return mValue;
{
ComputeTransformComponent();
return mValue;
@@
-576,22
+561,21
@@
public:
* @param[in] transformManager Pointer to the transform manager
* @param[in] Id of the transformation the property is associated with
*/
* @param[in] transformManager Pointer to the transform manager
* @param[in] Id of the transformation the property is associated with
*/
- void Initialize(
TransformManager* transformManager, TransformId id
)
+ void Initialize(
TransformManagerData* data
)
{
{
-
mTxManager = transformManager
;
- m
Id = id
;
+
DALI_ASSERT_ALWAYS(data != nullptr && data->Manager() != nullptr)
;
+ m
TxManagerData = data
;
}
/**
* @copydoc Dali::Internal::PropertyInputImpl::IsTransformManagerProperty()
*/
}
/**
* @copydoc Dali::Internal::PropertyInputImpl::IsTransformManagerProperty()
*/
- virtual bool IsTransformManagerProperty() const
+ bool IsTransformManagerProperty() const override
{
return true;
}
private:
{
return true;
}
private:
-
// Undefined
TransformManagerQuaternionInput(const TransformManagerQuaternionInput& property);
// Undefined
TransformManagerQuaternionInput(const TransformManagerQuaternionInput& property);
@@
-599,39
+583,25
@@
private:
TransformManagerQuaternionInput& operator=(const TransformManagerQuaternionInput& rhs);
public:
TransformManagerQuaternionInput& operator=(const TransformManagerQuaternionInput& rhs);
public:
-
- TransformManager* mTxManager;
- TransformId mId;
- mutable Quaternion mValue;
+ TransformManagerData* mTxManagerData{nullptr};
+ mutable Quaternion mValue;
};
/**
* A Matrix property used as input.
*/
};
/**
* A Matrix property used as input.
*/
-class TransformManagerMatrixInput : public PropertyInputImpl
+class TransformManagerMatrixInput
final
: public PropertyInputImpl
{
public:
{
public:
-
/**
* Constructor
*/
/**
* Constructor
*/
- TransformManagerMatrixInput()
- :mTxManager(0),
- mId(INVALID_TRANSFORM_ID)
- {
- }
-
- /**
- * Virtual destructor.
- */
- virtual ~TransformManagerMatrixInput()
- {
- }
+ TransformManagerMatrixInput() = default;
/**
* @copydoc Dali::Internal::SceneGraph::PropertyBase::GetType()
*/
/**
* @copydoc Dali::Internal::SceneGraph::PropertyBase::GetType()
*/
- virtual Dali::Property::Type GetType() const
+ Dali::Property::Type GetType() const override
{
return Dali::PropertyTypes::Get<Matrix>();
}
{
return Dali::PropertyTypes::Get<Matrix>();
}
@@
-647,7
+617,7
@@
public:
/**
* @copydoc Dali::Internal::PropertyInputImpl::InputInitialized()
*/
/**
* @copydoc Dali::Internal::PropertyInputImpl::InputInitialized()
*/
- virtual bool InputInitialized() const
+ bool InputInitialized() const override
{
return true;
}
{
return true;
}
@@
-656,7
+626,7
@@
public:
* @copydoc Dali::Internal::PropertyInputImpl::InputChanged()
* @note A constraint can only receive the inherited property from the previous frame.
*/
* @copydoc Dali::Internal::PropertyInputImpl::InputChanged()
* @note A constraint can only receive the inherited property from the previous frame.
*/
- virtual bool InputChanged() const
+ bool InputChanged() const override
{
return true;
}
{
return true;
}
@@
-664,11
+634,11
@@
public:
/**
* @copydoc Dali::PropertyInput::GetMatrix()
*/
/**
* @copydoc Dali::PropertyInput::GetMatrix()
*/
- virtual const Matrix& GetMatrix( BufferIndex bufferIndex ) const
+ const Matrix& GetMatrix(BufferIndex bufferIndex) const override
{
{
- if(
mTxManager
)
+ if(
mTxManagerData
)
{
{
- return mTxManager
->GetWorldMatrix(mId
);
+ return mTxManager
Data->Manager()->GetWorldMatrix(mTxManagerData->Id()
);
}
return Matrix::IDENTITY;
}
return Matrix::IDENTITY;
@@
-677,11
+647,11
@@
public:
/**
* @copydoc Dali::PropertyInput::GetConstraintInputMatrix()
*/
/**
* @copydoc Dali::PropertyInput::GetConstraintInputMatrix()
*/
- virtual const Matrix& GetConstraintInputMatrix( BufferIndex bufferIndex ) const
+ const Matrix& GetConstraintInputMatrix(BufferIndex bufferIndex) const override
{
{
- if(
mTxManager
)
+ if(
mTxManagerData
)
{
{
- return mTxManager
->GetWorldMatrix(mId
);
+ return mTxManager
Data->Manager()->GetWorldMatrix(mTxManagerData->Id()
);
}
return Matrix::IDENTITY;
}
return Matrix::IDENTITY;
@@
-690,16
+660,16
@@
public:
/**
* @copydoc Dali::SceneGraph::PropertyInterface::Get()
*/
/**
* @copydoc Dali::SceneGraph::PropertyInterface::Get()
*/
- Matrix& Get(
size_t
bufferIndex)
+ Matrix& Get(
BufferIndex
bufferIndex)
{
{
- DALI_ASSERT_ALWAYS(
mTxManager != 0
);
- return mTxManager
->GetWorldMatrix(mId
);
+ DALI_ASSERT_ALWAYS(
mTxManagerData != nullptr
);
+ return mTxManager
Data->Manager()->GetWorldMatrix(mTxManagerData->Id()
);
}
/**
* @copydoc Dali::SceneGraph::PropertyInterface::Get()
*/
}
/**
* @copydoc Dali::SceneGraph::PropertyInterface::Get()
*/
- const Matrix& Get(
size_t
bufferIndex) const
+ const Matrix& Get(
BufferIndex
bufferIndex) const
{
return GetMatrix(bufferIndex);
}
{
return GetMatrix(bufferIndex);
}
@@
-709,27
+679,26
@@
public:
* @param[in] bufferIndex The buffer to read.
* @return The property value.
*/
* @param[in] bufferIndex The buffer to read.
* @return The property value.
*/
- const Matrix& operator[](
size_t
bufferIndex) const
+ const Matrix& operator[](
BufferIndex
bufferIndex) const
{
return GetMatrix(bufferIndex);
}
{
return GetMatrix(bufferIndex);
}
- void Initialize(
TransformManager* transformManager, TransformId id
)
+ void Initialize(
TransformManagerData* data
)
{
{
-
mTxManager = transformManager
;
- m
Id = id
;
+
DALI_ASSERT_ALWAYS(data != nullptr && data->Manager() != nullptr)
;
+ m
TxManagerData = data
;
}
/**
* @copydoc Dali::Internal::PropertyInputImpl::IsTransformManagerProperty()
*/
}
/**
* @copydoc Dali::Internal::PropertyInputImpl::IsTransformManagerProperty()
*/
- virtual bool IsTransformManagerProperty() const
+ bool IsTransformManagerProperty() const override
{
return true;
}
private:
{
return true;
}
private:
-
// Undefined
TransformManagerMatrixInput(const TransformManagerMatrixInput& property);
// Undefined
TransformManagerMatrixInput(const TransformManagerMatrixInput& property);
@@
-737,12
+706,9
@@
private:
TransformManagerMatrixInput& operator=(const TransformManagerMatrixInput& rhs);
public:
TransformManagerMatrixInput& operator=(const TransformManagerMatrixInput& rhs);
public:
-
- TransformManager* mTxManager;
- TransformId mId;
+ TransformManagerData* mTxManagerData{nullptr};
};
};
-
} //namespace SceneGraph
} //namespace Internal
} //namespace Dali
} //namespace SceneGraph
} //namespace Internal
} //namespace Dali