1 #ifndef __DALI_INTERNAL_SCENE_GRAPH_ANIMATABLE_PROPERTY_H__
2 #define __DALI_INTERNAL_SCENE_GRAPH_ANIMATABLE_PROPERTY_H__
5 * Copyright (c) 2015 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
25 #include <dali/public-api/common/dali-common.h>
26 #include <dali/public-api/object/property.h>
27 #include <dali/public-api/object/property-input.h>
28 #include <dali/public-api/object/property-types.h>
29 #include <dali/internal/common/message.h>
30 #include <dali/internal/event/common/event-thread-services.h>
31 #include <dali/internal/event/common/property-input-impl.h>
32 #include <dali/internal/update/common/double-buffered.h>
33 #include <dali/internal/update/common/property-base.h>
34 #include <dali/internal/update/common/scene-graph-buffers.h>
46 * Dirty flags record whether an animatable property has changed.
47 * In the frame following a change, the property is reset to a base value.
49 * If the property was "Baked", then the base value matches the (double-buffered) value from the previous frame.
50 * Therefore when reset, the property is flagged as "clean".
52 * However if the property was only "Set" (and not "Baked"), then typically the base value and previous value will not match.
53 * In this case the reset operation is equivalent to a "Bake", and the value is considered "dirty" for an additional frame.
55 static const unsigned int CLEAN_FLAG = 0x00; ///< Indicates that the value did not change in this, or the previous frame
56 static const unsigned int BAKED_FLAG = 0x01; ///< Indicates that the value was Baked during the previous frame
57 static const unsigned int SET_FLAG = 0x02; ///< Indicates that the value was Set during the previous frame
60 class AnimatableProperty;
63 * Base class to reduce code size from the templates.
65 class AnimatablePropertyBase : public PropertyBase
70 * Constructor, initialize the dirty flag
72 AnimatablePropertyBase()
74 mDirtyFlags( BAKED_FLAG )
80 virtual ~AnimatablePropertyBase()
83 protected: // for derived classes
86 * Flag that the property has been Set during the current frame.
90 mDirtyFlags = SET_FLAG;
94 * Flag that the property has been Baked during the current frame.
98 mDirtyFlags = BAKED_FLAG;
101 public: // From PropertyBase
104 * @copydoc Dali::Internal::SceneGraph::PropertyBase::IsClean()
106 virtual bool IsClean() const
108 return ( CLEAN_FLAG == mDirtyFlags );
112 * @copydoc Dali::Internal::PropertyInputImpl::InputInitialized()
114 virtual bool InputInitialized() const
116 return true; // Animatable properties are always valid
119 protected: // so that ResetToBaseValue can set it directly
121 unsigned int mDirtyFlags; ///< Flag whether value changed during previous 2 frames
127 * An boolean animatable property of a scene-graph object.
130 class AnimatableProperty<bool> : public AnimatablePropertyBase
135 * Create an animatable property.
136 * @param [in] initialValue The initial value of the property.
138 AnimatableProperty( bool initialValue )
139 : mValue( initialValue ),
140 mBaseValue( initialValue )
145 * Virtual destructor.
147 virtual ~AnimatableProperty()
152 * @copydoc Dali::Internal::SceneGraph::PropertyBase::GetType()
154 virtual Dali::Property::Type GetType() const
156 return Dali::PropertyTypes::Get<bool>();
160 * @copydoc Dali::Internal::SceneGraph::PropertyBase::ResetToBaseValue()
162 virtual void ResetToBaseValue(BufferIndex updateBufferIndex)
164 if (CLEAN_FLAG != mDirtyFlags)
166 mValue[updateBufferIndex] = mBaseValue;
168 mDirtyFlags = ( mDirtyFlags >> 1 );
173 * @copydoc Dali::Internal::PropertyInputImpl::GetBoolean()
175 virtual const bool& GetBoolean( BufferIndex bufferIndex ) const
177 return mValue[ bufferIndex ];
181 * Set the property value. This will only persist for the current frame; the property
182 * will be reset with the base value, at the beginning of the next frame.
183 * @param[in] bufferIndex The buffer to write.
184 * @param[in] value The new property value.
186 void Set(BufferIndex bufferIndex, bool value)
188 // check if the value actually changed to avoid dirtying nodes unnecessarily
189 if( mValue[bufferIndex] != value )
191 mValue[bufferIndex] = value;
198 * Change the property value by a relative amount.
199 * @param[in] bufferIndex The buffer to write.
200 * @param[in] delta The property will change by this amount.
202 void SetRelative(BufferIndex bufferIndex, bool delta)
204 // check if the value actually changed to avoid dirtying nodes unnecessarily
205 // false + false does not change value, true + false does not either
206 if( delta && !mValue[bufferIndex] )
208 mValue[bufferIndex] += delta;
215 * @copydoc Dali::SceneGraph::AnimatableProperty::Get()
217 bool& Get(size_t bufferIndex)
219 return mValue[bufferIndex];
223 * @copydoc Dali::SceneGraph::AnimatableProperty::Get()
225 const bool& Get(size_t bufferIndex) const
227 return mValue[bufferIndex];
231 * Retrieve the property value.
232 * @param[in] bufferIndex The buffer to read.
233 * @return The property value.
235 bool& operator[](size_t bufferIndex)
237 return mValue[bufferIndex];
241 * Retrieve the property value.
242 * @param[in] bufferIndex The buffer to read.
243 * @return The property value.
245 const bool& operator[](size_t bufferIndex) const
247 return mValue[bufferIndex];
251 * Set both the property value & base value.
252 * @param[in] bufferIndex The buffer to write for the property value.
253 * @param[in] value The new property value.
255 void Bake(BufferIndex bufferIndex, bool value)
257 // bake has to check the base value as current buffer value can be correct by constraint or something else
258 if( mBaseValue != value )
261 mValue[bufferIndex] = value;
268 * Change the property value & base value by a relative amount.
269 * @param[in] bufferIndex The buffer to write for the local property value.
270 * @param[in] delta The property will change by this amount.
272 void BakeRelative(BufferIndex bufferIndex, bool delta)
274 mValue[bufferIndex] += delta;
275 mBaseValue = mValue[bufferIndex];
283 AnimatableProperty(const AnimatableProperty& property);
286 AnimatableProperty& operator=(const AnimatableProperty& rhs);
290 DoubleBuffered<bool> mValue; ///< The double-buffered property value
291 bool mBaseValue; ///< Reset to this base value at the beginning of each frame
297 * An integer animatable property of a scene-graph object.
300 class AnimatableProperty<int> : public AnimatablePropertyBase
305 * Create an animatable property.
306 * @param [in] initialValue The initial value of the property.
308 AnimatableProperty( int initialValue )
309 : mValue( initialValue ),
310 mBaseValue( initialValue )
315 * Virtual destructor.
317 virtual ~AnimatableProperty()
322 * @copydoc Dali::Internal::SceneGraph::PropertyBase::GetType()
324 virtual Dali::Property::Type GetType() const
326 return Dali::PropertyTypes::Get<int>();
330 * @copydoc Dali::Internal::SceneGraph::PropertyBase::ResetToBaseValue()
332 virtual void ResetToBaseValue(BufferIndex updateBufferIndex)
334 if (CLEAN_FLAG != mDirtyFlags)
336 mValue[updateBufferIndex] = mBaseValue;
338 mDirtyFlags = ( mDirtyFlags >> 1 );
343 * @copydoc Dali::Internal::PropertyInputImpl::GetInteger()
345 virtual const int& GetInteger( BufferIndex bufferIndex ) const
347 return mValue[ bufferIndex ];
351 * Set the property value. This will only persist for the current frame; the property
352 * will be reset with the base value, at the beginning of the next frame.
353 * @param[in] bufferIndex The buffer to write.
354 * @param[in] value The new property value.
356 void Set(BufferIndex bufferIndex, int value)
358 mValue[bufferIndex] = value;
364 * Change the property value by a relative amount.
365 * @param[in] bufferIndex The buffer to write.
366 * @param[in] delta The property will change by this amount.
368 void SetRelative(BufferIndex bufferIndex, int delta)
370 mValue[bufferIndex] = mValue[bufferIndex] + delta;
376 * @copydoc Dali::SceneGraph::AnimatableProperty::Get()
378 int& Get(size_t bufferIndex)
380 return mValue[bufferIndex];
384 * @copydoc Dali::SceneGraph::AnimatableProperty::Get()
386 const int& Get(size_t bufferIndex) const
388 return mValue[bufferIndex];
392 * Retrieve the property value.
393 * @param[in] bufferIndex The buffer to read.
394 * @return The property value.
396 int& operator[](size_t bufferIndex)
398 return mValue[bufferIndex];
402 * Retrieve the property value.
403 * @param[in] bufferIndex The buffer to read.
404 * @return The property value.
406 const int& operator[](size_t bufferIndex) const
408 return mValue[bufferIndex];
412 * Set both the property value & base value.
413 * @param[in] bufferIndex The buffer to write for the property value.
414 * @param[in] value The new property value.
416 void Bake(BufferIndex bufferIndex, int value)
418 mValue[bufferIndex] = value;
419 mBaseValue = mValue[bufferIndex];
425 * Change the property value & base value by a relative amount.
426 * @param[in] bufferIndex The buffer to write for the local property value.
427 * @param[in] delta The property will change by this amount.
429 void BakeRelative(BufferIndex bufferIndex, int delta)
431 mValue[bufferIndex] = mValue[bufferIndex] + delta;
432 mBaseValue = mValue[bufferIndex];
438 * Sets both double-buffered values & the base value.
439 * This should only be used when the owning object has not been connected to the scene-graph.
440 * @param[in] value The new property value.
442 void SetInitial(const int& value)
445 mValue[1] = mValue[0];
446 mBaseValue = mValue[0];
450 * Change both double-buffered values & the base value by a relative amount.
451 * This should only be used when the owning object has not been connected to the scene-graph.
452 * @param[in] delta The property will change by this amount.
454 void SetInitialRelative(const int& delta)
456 mValue[0] = mValue[0] + delta;
457 mValue[1] = mValue[0];
458 mBaseValue = mValue[0];
464 AnimatableProperty(const AnimatableProperty& property);
467 AnimatableProperty& operator=(const AnimatableProperty& rhs);
471 DoubleBuffered<int> mValue; ///< The double-buffered property value
472 int mBaseValue; ///< Reset to this base value at the beginning of each frame
477 * An float animatable property of a scene-graph object.
480 class AnimatableProperty<float> : public AnimatablePropertyBase
485 * Create an animatable property.
486 * @param [in] initialValue The initial value of the property.
488 AnimatableProperty( float initialValue )
489 : mValue( initialValue ),
490 mBaseValue( initialValue )
495 * Virtual destructor.
497 virtual ~AnimatableProperty()
502 * @copydoc Dali::Internal::SceneGraph::PropertyBase::GetType()
504 virtual Dali::Property::Type GetType() const
506 return Dali::PropertyTypes::Get<float>();
510 * @copydoc Dali::Internal::SceneGraph::PropertyBase::ResetToBaseValue()
512 virtual void ResetToBaseValue(BufferIndex updateBufferIndex)
514 if (CLEAN_FLAG != mDirtyFlags)
516 mValue[updateBufferIndex] = mBaseValue;
518 mDirtyFlags = ( mDirtyFlags >> 1 );
523 * @copydoc Dali::Internal::PropertyInputImpl::GetFloat()
525 virtual const float& GetFloat( BufferIndex bufferIndex ) const
527 return mValue[ bufferIndex ];
531 * Set the property value. This will only persist for the current frame; the property
532 * will be reset with the base value, at the beginning of the next frame.
533 * @param[in] bufferIndex The buffer to write.
534 * @param[in] value The new property value.
536 void Set(BufferIndex bufferIndex, float value)
538 mValue[bufferIndex] = value;
544 * Change the property value by a relative amount.
545 * @param[in] bufferIndex The buffer to write.
546 * @param[in] delta The property will change by this amount.
548 void SetRelative(BufferIndex bufferIndex, float delta)
550 mValue[bufferIndex] = mValue[bufferIndex] + delta;
556 * @copydoc Dali::SceneGraph::AnimatableProperty::Get()
558 float& Get(size_t bufferIndex)
560 return mValue[bufferIndex];
564 * @copydoc Dali::SceneGraph::AnimatableProperty::Get()
566 const float& Get(size_t bufferIndex) const
568 return mValue[bufferIndex];
572 * Retrieve the property value.
573 * @param[in] bufferIndex The buffer to read.
574 * @return The property value.
576 float& operator[](size_t bufferIndex)
578 return mValue[bufferIndex];
582 * Retrieve the property value.
583 * @param[in] bufferIndex The buffer to read.
584 * @return The property value.
586 const float& operator[](size_t bufferIndex) const
588 return mValue[bufferIndex];
592 * Set both the property value & base value.
593 * @param[in] bufferIndex The buffer to write for the property value.
594 * @param[in] value The new property value.
596 void Bake(BufferIndex bufferIndex, float value)
598 mValue[bufferIndex] = value;
599 mBaseValue = mValue[bufferIndex];
605 * Change the property value & base value by a relative amount.
606 * @param[in] bufferIndex The buffer to write for the local property value.
607 * @param[in] delta The property will change by this amount.
609 void BakeRelative(BufferIndex bufferIndex, float delta)
611 mValue[bufferIndex] = mValue[bufferIndex] + delta;
612 mBaseValue = mValue[bufferIndex];
618 * Sets both double-buffered values & the base value.
619 * This should only be used when the owning object has not been connected to the scene-graph.
620 * @param[in] value The new property value.
622 void SetInitial(const float& value)
625 mValue[1] = mValue[0];
626 mBaseValue = mValue[0];
630 * Change both double-buffered values & the base value by a relative amount.
631 * This should only be used when the owning object has not been connected to the scene-graph.
632 * @param[in] delta The property will change by this amount.
634 void SetInitialRelative(const float& delta)
636 mValue[0] = mValue[0] + delta;
637 mValue[1] = mValue[0];
638 mBaseValue = mValue[0];
644 AnimatableProperty(const AnimatableProperty& property);
647 AnimatableProperty& operator=(const AnimatableProperty& rhs);
651 DoubleBuffered<float> mValue; ///< The double-buffered property value
652 float mBaseValue; ///< Reset to this base value at the beginning of each frame
656 * An Vector2 animatable property of a scene-graph object.
659 class AnimatableProperty<Vector2> : public AnimatablePropertyBase
664 * Create an animatable property.
665 * @param [in] initialValue The initial value of the property.
667 AnimatableProperty( const Vector2& initialValue )
668 : mValue( initialValue ),
669 mBaseValue( initialValue )
674 * Virtual destructor.
676 virtual ~AnimatableProperty()
681 * @copydoc Dali::Internal::SceneGraph::PropertyBase::GetType()
683 virtual Dali::Property::Type GetType() const
685 return Dali::PropertyTypes::Get<Vector2>();
689 * @copydoc Dali::Internal::SceneGraph::PropertyBase::ResetToBaseValue()
691 virtual void ResetToBaseValue(BufferIndex updateBufferIndex)
693 if (CLEAN_FLAG != mDirtyFlags)
695 mValue[updateBufferIndex] = mBaseValue;
697 mDirtyFlags = ( mDirtyFlags >> 1 );
702 * @copydoc Dali::PropertyInput::GetVector2()
704 virtual const Vector2& GetVector2( BufferIndex bufferIndex ) const
706 return mValue[ bufferIndex ];
710 * Set the property value. This will only persist for the current frame; the property
711 * will be reset with the base value, at the beginning of the next frame.
712 * @param[in] bufferIndex The buffer to write.
713 * @param[in] value The new property value.
715 void Set(BufferIndex bufferIndex, const Vector2& value)
717 mValue[bufferIndex] = value;
723 * Set the property value. This will only persist for the current frame; the property
724 * will be reset with the base value, at the beginning of the next frame.
725 * @param[in] bufferIndex The buffer to write.
726 * @param[in] value The new X value.
728 void SetX(BufferIndex bufferIndex, float value)
730 mValue[bufferIndex].x = value;
736 * Set the property value. This will only persist for the current frame; the property
737 * will be reset with the base value, at the beginning of the next frame.
738 * @param[in] bufferIndex The buffer to write.
739 * @param[in] value The new Y value.
741 void SetY(BufferIndex bufferIndex, float value)
743 mValue[bufferIndex].y = value;
749 * Change the property value by a relative amount.
750 * @param[in] bufferIndex The buffer to write.
751 * @param[in] delta The property will change by this amount.
753 void SetRelative(BufferIndex bufferIndex, const Vector2& delta)
755 mValue[bufferIndex] += delta;
761 * Change the X value by a relative amount.
762 * @param[in] bufferIndex The buffer to write.
763 * @param[in] delta The X value will change by this amount.
765 void SetXRelative(BufferIndex bufferIndex, float delta)
767 mValue[bufferIndex].x += delta;
773 * Change the Y value by a relative amount.
774 * @param[in] bufferIndex The buffer to write.
775 * @param[in] delta The Y value will change by this amount.
777 void SetYRelative(BufferIndex bufferIndex, float delta)
779 mValue[bufferIndex].y += delta;
785 * @copydoc Dali::SceneGraph::AnimatableProperty::Get()
787 Vector2& Get(size_t bufferIndex)
789 return mValue[bufferIndex];
793 * @copydoc Dali::SceneGraph::AnimatableProperty::Get()
795 const Vector2& Get(size_t bufferIndex) const
797 return mValue[bufferIndex];
801 * Retrieve the property value.
802 * @param[in] bufferIndex The buffer to read.
803 * @return The property value.
805 Vector2& operator[](size_t bufferIndex)
807 return mValue[bufferIndex];
811 * Retrieve the property value.
812 * @param[in] bufferIndex The buffer to read.
813 * @return The property value.
815 const Vector2& operator[](size_t bufferIndex) const
817 return mValue[bufferIndex];
821 * Set both the property value & base value.
822 * @param[in] bufferIndex The buffer to write for the property value.
823 * @param[in] value The new property value.
825 void Bake(BufferIndex bufferIndex, const Vector2& value)
827 mValue[bufferIndex] = value;
834 * Set both the X value & base X value.
835 * @param[in] bufferIndex The buffer to write for the property value.
836 * @param[in] value The new property value.
838 void BakeX(BufferIndex bufferIndex, float value)
840 mValue[bufferIndex].x = value;
841 mBaseValue.x = value;
847 * Set both the Y value & base Y value.
848 * @param[in] bufferIndex The buffer to write for the property value.
849 * @param[in] value The new property value.
851 void BakeY(BufferIndex bufferIndex, float value)
853 mValue[bufferIndex].y = value;
854 mBaseValue.y = value;
860 * Change the property value & base value by a relative amount.
861 * @param[in] bufferIndex The buffer to write for the local property value.
862 * @param[in] delta The property will change by this amount.
864 void BakeRelative(BufferIndex bufferIndex, const Vector2& delta)
866 mValue[bufferIndex] += delta;
867 mBaseValue = mValue[bufferIndex];
873 * Change the X value & base X value by a relative amount.
874 * @param[in] bufferIndex The buffer to write for the local property value.
875 * @param[in] delta The X value will change by this amount.
877 void BakeXRelative(BufferIndex bufferIndex, float delta)
879 mValue[bufferIndex].x += delta;
880 mBaseValue.x = mValue[bufferIndex].x;
886 * Change the Y value & base Y value by a relative amount.
887 * @param[in] bufferIndex The buffer to write for the local property value.
888 * @param[in] delta The Y value will change by this amount.
890 void BakeYRelative(BufferIndex bufferIndex, float delta)
892 mValue[bufferIndex].y += delta;
893 mBaseValue.y = mValue[bufferIndex].y;
901 AnimatableProperty(const AnimatableProperty& property);
904 AnimatableProperty& operator=(const AnimatableProperty& rhs);
908 DoubleBuffered<Vector2> mValue; ///< The double-buffered property value
909 Vector2 mBaseValue; ///< Reset to this base value at the beginning of each frame
914 * A Vector3 animatable property of a scene-graph object.
917 class AnimatableProperty<Vector3> : public AnimatablePropertyBase
922 * Create an animatable property.
931 * Create an animatable property.
932 * @param [in] initialValue The initial value of the property.
934 AnimatableProperty( const Vector3& initialValue )
935 : mValue( initialValue ),
936 mBaseValue( initialValue )
941 * Virtual destructor.
943 virtual ~AnimatableProperty()
948 * @copydoc Dali::Internal::SceneGraph::PropertyBase::GetType()
950 virtual Dali::Property::Type GetType() const
952 return Dali::PropertyTypes::Get<Vector3>();
956 * @copydoc Dali::Internal::SceneGraph::PropertyBase::ResetToBaseValue()
958 virtual void ResetToBaseValue(BufferIndex updateBufferIndex)
960 if (CLEAN_FLAG != mDirtyFlags)
962 mValue[updateBufferIndex] = mBaseValue;
964 mDirtyFlags = ( mDirtyFlags >> 1 );
969 * @copydoc Dali::PropertyInput::GetVector3()
971 virtual const Vector3& GetVector3( BufferIndex bufferIndex ) const
973 return mValue[ bufferIndex ];
977 * Set the property value. This will only persist for the current frame; the property
978 * will be reset with the base value, at the beginning of the next frame.
979 * @param[in] bufferIndex The buffer to write.
980 * @param[in] value The new property value.
982 void Set(BufferIndex bufferIndex, const Vector3& value)
984 mValue[bufferIndex] = value;
990 * Set the property value. This will only persist for the current frame; the property
991 * will be reset with the base value, at the beginning of the next frame.
992 * @param[in] bufferIndex The buffer to write.
993 * @param[in] value The new X value.
995 void SetX(BufferIndex bufferIndex, float value)
997 mValue[bufferIndex].x = value;
1003 * Set the property value. This will only persist for the current frame; the property
1004 * will be reset with the base value, at the beginning of the next frame.
1005 * @param[in] bufferIndex The buffer to write.
1006 * @param[in] value The new Y value.
1008 void SetY(BufferIndex bufferIndex, float value)
1010 mValue[bufferIndex].y = value;
1016 * Set the property value. This will only persist for the current frame; the property
1017 * will be reset with the base value, at the beginning of the next frame.
1018 * @param[in] bufferIndex The buffer to write.
1019 * @param[in] value The new Z value.
1021 void SetZ(BufferIndex bufferIndex, float value)
1023 mValue[bufferIndex].z = value;
1029 * Change the property value by a relative amount.
1030 * @param[in] bufferIndex The buffer to write.
1031 * @param[in] delta The property will change by this amount.
1033 void SetRelative(BufferIndex bufferIndex, const Vector3& delta)
1035 mValue[bufferIndex] += delta;
1041 * Change the X value by a relative amount.
1042 * @param[in] bufferIndex The buffer to write.
1043 * @param[in] delta The X value will change by this amount.
1045 void SetXRelative(BufferIndex bufferIndex, float delta)
1047 mValue[bufferIndex].x += delta;
1053 * Change the Y value by a relative amount.
1054 * @param[in] bufferIndex The buffer to write.
1055 * @param[in] delta The Y value will change by this amount.
1057 void SetYRelative(BufferIndex bufferIndex, float delta)
1059 mValue[bufferIndex].y += delta;
1065 * Change the Z value by a relative amount.
1066 * @param[in] bufferIndex The buffer to write.
1067 * @param[in] delta The Z value will change by this amount.
1069 void SetZRelative(BufferIndex bufferIndex, float delta)
1071 mValue[bufferIndex].z += delta;
1077 * @copydoc Dali::SceneGraph::AnimatableProperty::Get()
1079 Vector3& Get(size_t bufferIndex)
1081 return mValue[bufferIndex];
1085 * @copydoc Dali::SceneGraph::AnimatableProperty::Get()
1087 const Vector3& Get(size_t bufferIndex) const
1089 return mValue[bufferIndex];
1093 * Retrieve the property value.
1094 * @param[in] bufferIndex The buffer to read.
1095 * @return The property value.
1097 Vector3& operator[](size_t bufferIndex)
1099 return mValue[bufferIndex];
1103 * Retrieve the property value.
1104 * @param[in] bufferIndex The buffer to read.
1105 * @return The property value.
1107 const Vector3& operator[](size_t bufferIndex) const
1109 return mValue[bufferIndex];
1113 * Set both the property value & base value.
1114 * @param[in] bufferIndex The buffer to write for the property value.
1115 * @param[in] value The new property value.
1117 void Bake(BufferIndex bufferIndex, const Vector3& value)
1119 mValue[bufferIndex] = value;
1126 * Set both the X value & base X value.
1127 * @param[in] bufferIndex The buffer to write for the property value.
1128 * @param[in] value The new property value.
1130 void BakeX(BufferIndex bufferIndex, float value)
1132 mValue[bufferIndex].x = value;
1133 mBaseValue.x = value;
1139 * Set both the Y value & base Y value.
1140 * @param[in] bufferIndex The buffer to write for the property value.
1141 * @param[in] value The new property value.
1143 void BakeY(BufferIndex bufferIndex, float value)
1145 mValue[bufferIndex].y = value;
1146 mBaseValue.y = value;
1152 * Set both the Z value & base Z value.
1153 * @param[in] bufferIndex The buffer to write for the property value.
1154 * @param[in] value The new property value.
1156 void BakeZ(BufferIndex bufferIndex, float value)
1158 mValue[bufferIndex].z = value;
1159 mBaseValue.z = value;
1165 * Change the property value & base value by a relative amount.
1166 * @param[in] bufferIndex The buffer to write for the local property value.
1167 * @param[in] delta The property will change by this amount.
1169 void BakeRelative(BufferIndex bufferIndex, const Vector3& delta)
1171 mValue[bufferIndex] += delta;
1172 mBaseValue = mValue[bufferIndex];
1178 * Change the property value & base value by a relative amount.
1179 * @param[in] bufferIndex The buffer to write for the local property value.
1180 * @param[in] delta The property will change by this amount.
1182 void BakeRelativeMultiply(BufferIndex bufferIndex, const Vector3& delta)
1184 mValue[bufferIndex] *= delta;
1185 mBaseValue = mValue[bufferIndex];
1191 * Change the X value & base X value by a relative amount.
1192 * @param[in] bufferIndex The buffer to write for the local property value.
1193 * @param[in] delta The X value will change by this amount.
1195 void BakeXRelative(BufferIndex bufferIndex, float delta)
1197 mValue[bufferIndex].x += delta;
1198 mBaseValue.x = mValue[bufferIndex].x;
1204 * Change the Y value & base Y value by a relative amount.
1205 * @param[in] bufferIndex The buffer to write for the local property value.
1206 * @param[in] delta The Y value will change by this amount.
1208 void BakeYRelative(BufferIndex bufferIndex, float delta)
1210 mValue[bufferIndex].y += delta;
1211 mBaseValue.y = mValue[bufferIndex].y;
1217 * Change the Z value & base Z value by a relative amount.
1218 * @param[in] bufferIndex The buffer to write for the local property value.
1219 * @param[in] delta The Z value will change by this amount.
1221 void BakeZRelative(BufferIndex bufferIndex, float delta)
1223 mValue[bufferIndex].z += delta;
1224 mBaseValue.z = mValue[bufferIndex].z;
1232 AnimatableProperty(const AnimatableProperty& property);
1235 AnimatableProperty& operator=(const AnimatableProperty& rhs);
1239 DoubleBuffered<Vector3> mValue; ///< The double-buffered property value
1240 Vector3 mBaseValue; ///< Reset to this base value at the beginning of each frame
1245 * A Vector4 animatable property of a scene-graph object.
1248 class AnimatableProperty<Vector4> : public AnimatablePropertyBase
1253 * Create an animatable property.
1254 * @param [in] initialValue The initial value of the property.
1256 AnimatableProperty( const Vector4& initialValue )
1257 : mValue( initialValue ),
1258 mBaseValue( initialValue )
1263 * Virtual destructor.
1265 virtual ~AnimatableProperty()
1270 * @copydoc Dali::Internal::SceneGraph::PropertyBase::GetType()
1272 virtual Dali::Property::Type GetType() const
1274 return Dali::PropertyTypes::Get<Vector4>();
1278 * @copydoc Dali::Internal::SceneGraph::PropertyBase::ResetToBaseValue()
1280 virtual void ResetToBaseValue(BufferIndex updateBufferIndex)
1282 if (CLEAN_FLAG != mDirtyFlags)
1284 mValue[updateBufferIndex] = mBaseValue;
1286 mDirtyFlags = ( mDirtyFlags >> 1 );
1291 * @copydoc Dali::PropertyInput::GetVector4()
1293 virtual const Vector4& GetVector4( BufferIndex bufferIndex ) const
1295 return mValue[ bufferIndex ];
1299 * Set the property value. This will only persist for the current frame; the property
1300 * will be reset with the base value, at the beginning of the next frame.
1301 * @param[in] bufferIndex The buffer to write.
1302 * @param[in] value The new property value.
1304 void Set(BufferIndex bufferIndex, const Vector4& value)
1306 mValue[bufferIndex] = value;
1312 * Set the X value. This will only persist for the current frame; the property
1313 * will be reset with the base value, at the beginning of the next frame.
1314 * @param[in] bufferIndex The buffer to write.
1315 * @param[in] value The new X value.
1317 void SetX(BufferIndex bufferIndex, float value)
1319 mValue[bufferIndex].x = value;
1325 * Set the Y value. This will only persist for the current frame; the property
1326 * will be reset with the base value, at the beginning of the next frame.
1327 * @param[in] bufferIndex The buffer to write.
1328 * @param[in] value The new Y value.
1330 void SetY(BufferIndex bufferIndex, float value)
1332 mValue[bufferIndex].y = value;
1338 * Set the Z value. This will only persist for the current frame; the property
1339 * will be reset with the base value, at the beginning of the next frame.
1340 * @param[in] bufferIndex The buffer to write.
1341 * @param[in] value The new Z value.
1343 void SetZ(BufferIndex bufferIndex, float value)
1345 mValue[bufferIndex].z = value;
1351 * Set the W value. This will only persist for the current frame; the property
1352 * will be reset with the base value, at the beginning of the next frame.
1353 * @param[in] bufferIndex The buffer to write.
1354 * @param[in] value The new W value.
1356 void SetW(BufferIndex bufferIndex, float value)
1358 mValue[bufferIndex].w = value;
1364 * Change the property value by a relative amount.
1365 * @param[in] bufferIndex The buffer to write.
1366 * @param[in] delta The property will change by this amount.
1368 void SetRelative(BufferIndex bufferIndex, const Vector4& delta)
1370 mValue[bufferIndex] = mValue[bufferIndex] + delta;
1376 * Change the X value by a relative amount.
1377 * @param[in] bufferIndex The buffer to write.
1378 * @param[in] delta The X value will change by this amount.
1380 void SetXRelative(BufferIndex bufferIndex, float delta)
1382 mValue[bufferIndex].x = mValue[bufferIndex].x + delta;
1388 * Change the Y value by a relative amount.
1389 * @param[in] bufferIndex The buffer to write.
1390 * @param[in] delta The Y value will change by this amount.
1392 void SetYRelative(BufferIndex bufferIndex, float delta)
1394 mValue[bufferIndex].y = mValue[bufferIndex].y + delta;
1400 * Change the Z value by a relative amount.
1401 * @param[in] bufferIndex The buffer to write.
1402 * @param[in] delta The Z value will change by this amount.
1404 void SetZRelative(BufferIndex bufferIndex, float delta)
1406 mValue[bufferIndex].z = mValue[bufferIndex].z + delta;
1412 * Change the W value by a relative amount.
1413 * @param[in] bufferIndex The buffer to write.
1414 * @param[in] delta The W value will change by this amount.
1416 void SetWRelative(BufferIndex bufferIndex, float delta)
1418 mValue[bufferIndex].w = mValue[bufferIndex].w + delta;
1424 * @copydoc Dali::SceneGraph::AnimatableProperty::Get()
1426 Vector4& Get(size_t bufferIndex)
1428 return mValue[bufferIndex];
1432 * @copydoc Dali::SceneGraph::AnimatableProperty::Get()
1434 const Vector4& Get(size_t bufferIndex) const
1436 return mValue[bufferIndex];
1440 * Retrieve the property value.
1441 * @param[in] bufferIndex The buffer to read.
1442 * @return The property value.
1444 Vector4& operator[](size_t bufferIndex)
1446 return mValue[bufferIndex];
1450 * Retrieve the property value.
1451 * @param[in] bufferIndex The buffer to read.
1452 * @return The property value.
1454 const Vector4& operator[](size_t bufferIndex) const
1456 return mValue[bufferIndex];
1460 * Set both the property value & base value.
1461 * @param[in] bufferIndex The buffer to write for the property value.
1462 * @param[in] value The new property value.
1464 void Bake(BufferIndex bufferIndex, const Vector4& value)
1466 mValue[bufferIndex] = value;
1467 mBaseValue = mValue[bufferIndex];
1473 * Set both the X value & base X value.
1474 * @param[in] bufferIndex The buffer to write for the property value.
1475 * @param[in] value The new property value.
1477 void BakeX(BufferIndex bufferIndex, float value)
1479 mValue[bufferIndex].x = value;
1480 mBaseValue.x = mValue[bufferIndex].x;
1486 * Set both the Y value & base Y value.
1487 * @param[in] bufferIndex The buffer to write for the property value.
1488 * @param[in] value The new property value.
1490 void BakeY(BufferIndex bufferIndex, float value)
1492 mValue[bufferIndex].y = value;
1493 mBaseValue.y = mValue[bufferIndex].y;
1499 * Set both the Z value & base Z value.
1500 * @param[in] bufferIndex The buffer to write for the property value.
1501 * @param[in] value The new property value.
1503 void BakeZ(BufferIndex bufferIndex, float value)
1505 mValue[bufferIndex].z = value;
1506 mBaseValue.z = mValue[bufferIndex].z;
1512 * Set both the W value & base W value.
1513 * @param[in] bufferIndex The buffer to write for the property value.
1514 * @param[in] value The new property value.
1516 void BakeW(BufferIndex bufferIndex, float value)
1518 mValue[bufferIndex].w = value;
1519 mBaseValue.w = mValue[bufferIndex].w;
1525 * Change the property value & base value by a relative amount.
1526 * @param[in] bufferIndex The buffer to write for the local property value.
1527 * @param[in] delta The property will change by this amount.
1529 void BakeRelative(BufferIndex bufferIndex, const Vector4& delta)
1531 mValue[bufferIndex] = mValue[bufferIndex] + delta;
1532 mBaseValue = mValue[bufferIndex];
1538 * Change the X value & base X value by a relative amount.
1539 * @param[in] bufferIndex The buffer to write for the local property value.
1540 * @param[in] delta The X value will change by this amount.
1542 void BakeXRelative(BufferIndex bufferIndex, float delta)
1544 mValue[bufferIndex].x = mValue[bufferIndex].x + delta;
1545 mBaseValue.x = mValue[bufferIndex].x;
1551 * Change the Y value & base Y value by a relative amount.
1552 * @param[in] bufferIndex The buffer to write for the local property value.
1553 * @param[in] delta The Y value will change by this amount.
1555 void BakeYRelative(BufferIndex bufferIndex, float delta)
1557 mValue[bufferIndex].y = mValue[bufferIndex].y + delta;
1558 mBaseValue.y = mValue[bufferIndex].y;
1564 * Change the Z value & base Z value by a relative amount.
1565 * @param[in] bufferIndex The buffer to write for the local property value.
1566 * @param[in] delta The Z value will change by this amount.
1568 void BakeZRelative(BufferIndex bufferIndex, float delta)
1570 mValue[bufferIndex].z = mValue[bufferIndex].z + delta;
1571 mBaseValue.z = mValue[bufferIndex].z;
1577 * Change the W value & base W value by a relative amount.
1578 * @param[in] bufferIndex The buffer to write for the local property value.
1579 * @param[in] delta The W value will change by this amount.
1581 void BakeWRelative(BufferIndex bufferIndex, float delta)
1583 mValue[bufferIndex].w = mValue[bufferIndex].w + delta;
1584 mBaseValue.w = mValue[bufferIndex].w;
1590 * Sets both double-buffered W values & the base W value.
1591 * This should only be used when the owning object has not been connected to the scene-graph.
1592 * @param[in] value The new W value.
1594 void SetWInitial(float value)
1596 mValue[0].w = value;
1597 mValue[1].w = mValue[0].w;
1598 mBaseValue.w = mValue[0].w;
1604 AnimatableProperty(const AnimatableProperty& property);
1607 AnimatableProperty& operator=(const AnimatableProperty& rhs);
1611 DoubleBuffered<Vector4> mValue; ///< The double-buffered property value
1612 Vector4 mBaseValue; ///< Reset to this base value at the beginning of each frame
1616 * An Quaternion animatable property of a scene-graph object.
1619 class AnimatableProperty<Quaternion> : public AnimatablePropertyBase
1624 * Create an animatable property.
1626 AnimatableProperty()
1633 * Create an animatable property.
1634 * @param [in] initialValue The initial value of the property.
1636 AnimatableProperty( const Quaternion& initialValue )
1637 : mValue( initialValue ),
1638 mBaseValue( initialValue )
1643 * Virtual destructor.
1645 virtual ~AnimatableProperty()
1650 * @copydoc Dali::Internal::SceneGraph::PropertyBase::GetType()
1652 virtual Dali::Property::Type GetType() const
1654 return Dali::PropertyTypes::Get<Quaternion>();
1658 * @copydoc Dali::Internal::SceneGraph::PropertyBase::ResetToBaseValue()
1660 virtual void ResetToBaseValue(BufferIndex updateBufferIndex)
1662 if (CLEAN_FLAG != mDirtyFlags)
1664 mValue[updateBufferIndex] = mBaseValue;
1666 mDirtyFlags = ( mDirtyFlags >> 1 );
1671 * @copydoc Dali::PropertyInput::GetQuaternion()
1673 virtual const Quaternion& GetQuaternion( BufferIndex bufferIndex ) const
1675 return mValue[ bufferIndex ];
1679 * Set the property value. This will only persist for the current frame; the property
1680 * will be reset with the base value, at the beginning of the next frame.
1681 * @param[in] bufferIndex The buffer to write.
1682 * @param[in] value The new property value.
1684 void Set(BufferIndex bufferIndex, const Quaternion& value)
1686 mValue[bufferIndex] = value;
1692 * Change the property value by a relative amount.
1693 * @param[in] bufferIndex The buffer to write.
1694 * @param[in] delta The property will change by this amount.
1696 void SetRelative(BufferIndex bufferIndex, const Quaternion& delta)
1698 mValue[bufferIndex] *= delta;
1704 * @copydoc Dali::SceneGraph::AnimatableProperty::Get()
1706 Quaternion& Get(size_t bufferIndex)
1708 return mValue[bufferIndex];
1712 * @copydoc Dali::SceneGraph::AnimatableProperty::Get()
1714 const Quaternion& Get(size_t bufferIndex) const
1716 return mValue[bufferIndex];
1720 * Retrieve the property value.
1721 * @param[in] bufferIndex The buffer to read.
1722 * @return The property value.
1724 Quaternion& operator[](size_t bufferIndex)
1726 return mValue[bufferIndex];
1730 * Retrieve the property value.
1731 * @param[in] bufferIndex The buffer to read.
1732 * @return The property value.
1734 const Quaternion& operator[](size_t bufferIndex) const
1736 return mValue[bufferIndex];
1740 * Set both the property value & base value.
1741 * @param[in] bufferIndex The buffer to write for the property value.
1742 * @param[in] value The new property value.
1744 void Bake(BufferIndex bufferIndex, const Quaternion& value)
1746 mValue[bufferIndex] = value;
1753 * Change the property value & base value by a relative amount.
1754 * @param[in] bufferIndex The buffer to write for the local property value.
1755 * @param[in] delta The property will change by this amount.
1757 void BakeRelative(BufferIndex bufferIndex, const Quaternion& delta)
1759 mValue[bufferIndex] *= delta;
1760 mBaseValue = mValue[bufferIndex];
1768 AnimatableProperty(const AnimatableProperty& property);
1771 AnimatableProperty& operator=(const AnimatableProperty& rhs);
1775 DoubleBuffered<Quaternion> mValue; ///< The double-buffered property value
1776 Quaternion mBaseValue; ///< Reset to this base value at the beginning of each frame
1781 * A Matrix animatable property of a scene-graph object.
1784 class AnimatableProperty<Matrix> : public AnimatablePropertyBase
1789 * Create an animatable property.
1790 * @param [in] initialValue The initial value of the property.
1792 AnimatableProperty( const Matrix& initialValue )
1793 : mValue( initialValue ),
1794 mBaseValue( initialValue )
1799 * Virtual destructor.
1801 virtual ~AnimatableProperty()
1806 * @copydoc Dali::Internal::SceneGraph::PropertyBase::GetType()
1808 virtual Dali::Property::Type GetType() const
1810 return Dali::PropertyTypes::Get<Matrix>();
1814 * @copydoc Dali::Internal::SceneGraph::PropertyBase::ResetToBaseValue()
1816 virtual void ResetToBaseValue(BufferIndex updateBufferIndex)
1818 if (CLEAN_FLAG != mDirtyFlags)
1820 mValue[updateBufferIndex] = mBaseValue;
1822 mDirtyFlags = ( mDirtyFlags >> 1 );
1827 * @copydoc Dali::Internal::PropertyInputImpl::GetMatrix()
1829 virtual const Matrix& GetMatrix( BufferIndex bufferIndex ) const
1831 return mValue[ bufferIndex ];
1835 * Set the property value. This will only persist for the current frame; the property
1836 * will be reset with the base value, at the beginning of the next frame.
1837 * @param[in] bufferIndex The buffer to write.
1838 * @param[in] value The new property value.
1840 void Set(BufferIndex bufferIndex, const Matrix& value)
1842 mValue[bufferIndex] = value;
1848 * Change the property value by a relative amount.
1849 * @param[in] bufferIndex The buffer to write.
1850 * @param[in] delta The property will change by this amount.
1852 void SetRelative(BufferIndex bufferIndex, const Matrix& delta)
1855 Matrix::Multiply(temp, mValue[bufferIndex], delta);
1856 mValue[bufferIndex] = temp;
1862 * @copydoc Dali::SceneGraph::AnimatableProperty::Get()
1864 Matrix& Get(size_t bufferIndex)
1866 return mValue[bufferIndex];
1870 * @copydoc Dali::SceneGraph::AnimatableProperty::Get()
1872 const Matrix& Get(size_t bufferIndex) const
1874 return mValue[bufferIndex];
1878 * Retrieve the property value.
1879 * @param[in] bufferIndex The buffer to read.
1880 * @return The property value.
1882 Matrix& operator[](size_t bufferIndex)
1884 return mValue[bufferIndex];
1888 * Retrieve the property value.
1889 * @param[in] bufferIndex The buffer to read.
1890 * @return The property value.
1892 const Matrix& operator[](size_t bufferIndex) const
1894 return mValue[bufferIndex];
1898 * Set both the property value & base value.
1899 * @param[in] bufferIndex The buffer to write for the property value.
1900 * @param[in] value The new property value.
1902 void Bake(BufferIndex bufferIndex, const Matrix& value)
1904 mValue[bufferIndex] = value;
1905 mBaseValue = mValue[bufferIndex];
1911 * Change the property value & base value by a relative amount.
1912 * @param[in] bufferIndex The buffer to write for the local property value.
1913 * @param[in] delta The property will change by this amount.
1915 void BakeRelative(BufferIndex bufferIndex, const Matrix& delta)
1918 Matrix::Multiply(temp, mValue[bufferIndex], delta);
1919 mValue[bufferIndex] = temp;
1928 AnimatableProperty(const AnimatableProperty& property);
1931 AnimatableProperty& operator=(const AnimatableProperty& rhs);
1935 DoubleBuffered<Matrix> mValue; ///< The double-buffered property value
1936 Matrix mBaseValue; ///< Reset to this base value at the beginning of each frame
1941 * A Matrix3 animatable property of a scene-graph object.
1944 class AnimatableProperty<Matrix3> : public AnimatablePropertyBase
1949 * Create an animatable property.
1950 * @param [in] initialValue The initial value of the property.
1952 AnimatableProperty( const Matrix3& initialValue )
1953 : mValue( initialValue ),
1954 mBaseValue( initialValue )
1959 * Virtual destructor.
1961 virtual ~AnimatableProperty()
1966 * @copydoc Dali::Internal::SceneGraph::PropertyBase::GetType()
1968 virtual Dali::Property::Type GetType() const
1970 return Dali::PropertyTypes::Get<Matrix3>();
1974 * @copydoc Dali::Internal::SceneGraph::PropertyBase::ResetToBaseValue()
1976 virtual void ResetToBaseValue(BufferIndex updateBufferIndex)
1978 if (CLEAN_FLAG != mDirtyFlags)
1980 mValue[updateBufferIndex] = mBaseValue;
1982 mDirtyFlags = ( mDirtyFlags >> 1 );
1987 * @copydoc Dali::Internal::PropertyInputImpl::GetMatrix3()
1989 virtual const Matrix3& GetMatrix3( BufferIndex bufferIndex ) const
1991 return mValue[ bufferIndex ];
1995 * Set the property value. This will only persist for the current frame; the property
1996 * will be reset with the base value, at the beginning of the next frame.
1997 * @param[in] bufferIndex The buffer to write.
1998 * @param[in] value The new property value.
2000 void Set(BufferIndex bufferIndex, const Matrix3& value)
2002 mValue[bufferIndex] = value;
2007 * Change the property value by a relative amount.
2008 * @param[in] bufferIndex The buffer to write.
2009 * @param[in] delta The property will change by this amount.
2011 void SetRelative(BufferIndex bufferIndex, const Matrix3& delta)
2014 Matrix3::Multiply(temp, mValue[bufferIndex], delta);
2015 mValue[bufferIndex] = temp;
2020 * @copydoc Dali::SceneGraph::AnimatableProperty::Get()
2022 Matrix3& Get(size_t bufferIndex)
2024 return mValue[bufferIndex];
2028 * @copydoc Dali::SceneGraph::AnimatableProperty::Get()
2030 const Matrix3& Get(size_t bufferIndex) const
2032 return mValue[bufferIndex];
2036 * Retrieve the property value.
2037 * @param[in] bufferIndex The buffer to read.
2038 * @return The property value.
2040 Matrix3& operator[](size_t bufferIndex)
2042 return mValue[bufferIndex];
2046 * Retrieve the property value.
2047 * @param[in] bufferIndex The buffer to read.
2048 * @return The property value.
2050 const Matrix3& operator[](size_t bufferIndex) const
2052 return mValue[bufferIndex];
2056 * Set both the property value & base value.
2057 * @param[in] bufferIndex The buffer to write for the property value.
2058 * @param[in] value The new property value.
2060 void Bake(BufferIndex bufferIndex, const Matrix3& value)
2062 mValue[bufferIndex] = value;
2063 mBaseValue = mValue[bufferIndex];
2069 * Change the property value & base value by a relative amount.
2070 * @param[in] bufferIndex The buffer to write for the local property value.
2071 * @param[in] delta The property will change by this amount.
2073 void BakeRelative(BufferIndex bufferIndex, const Matrix3& delta)
2076 Matrix3::Multiply(temp, mValue[bufferIndex], delta);
2077 mValue[bufferIndex] = temp;
2086 AnimatableProperty(const AnimatableProperty& property);
2089 AnimatableProperty& operator=(const AnimatableProperty& rhs);
2093 DoubleBuffered<Matrix3> mValue; ///< The double-buffered property value
2094 Matrix3 mBaseValue; ///< Reset to this base value at the beginning of each frame
2098 } // namespace SceneGraph
2100 // Messages for AnimatableProperty<T>
2103 void BakeMessage( EventThreadServices& eventThreadServices,
2104 const SceneGraph::AnimatableProperty<T>& property,
2105 typename ParameterType< T >::PassingType newValue )
2107 typedef MessageDoubleBuffered1< SceneGraph::AnimatableProperty<T>, T > LocalType;
2109 // Reserve some memory inside the message queue
2110 unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
2112 // Construct message in the message queue memory; note that delete should not be called on the return value
2113 new (slot) LocalType( &property,
2114 &SceneGraph::AnimatableProperty<T>::Bake,
2119 void BakeRelativeMessage( EventThreadServices& eventThreadServices,
2120 const SceneGraph::AnimatableProperty<T>& property,
2123 typedef MessageDoubleBuffered1< SceneGraph::AnimatableProperty<T>, const T& > LocalType;
2125 // Reserve some memory inside the message queue
2126 unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
2128 // Construct message in the message queue memory; note that delete should not be called on the return value
2129 new (slot) LocalType( &property,
2130 &SceneGraph::AnimatableProperty<T>::BakeRelative,
2135 void SetXComponentMessage( EventThreadServices& eventThreadServices,
2136 const SceneGraph::AnimatableProperty<T>& property,
2137 typename ParameterType< float >::PassingType newValue )
2139 typedef MessageDoubleBuffered1< SceneGraph::AnimatableProperty<T>, float > LocalType;
2141 // Reserve some memory inside the message queue
2142 unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
2144 // Construct message in the message queue memory; note that delete should not be called on the return value
2145 new (slot) LocalType( &property,
2146 &SceneGraph::AnimatableProperty<T>::BakeX,
2151 void SetYComponentMessage( EventThreadServices& eventThreadServices,
2152 const SceneGraph::AnimatableProperty<T>& property,
2153 typename ParameterType< float >::PassingType newValue )
2155 typedef MessageDoubleBuffered1< SceneGraph::AnimatableProperty<T>, float > LocalType;
2157 // Reserve some memory inside the message queue
2158 unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
2160 // Construct message in the message queue memory; note that delete should not be called on the return value
2161 new (slot) LocalType( &property,
2162 &SceneGraph::AnimatableProperty<T>::BakeY,
2167 void SetZComponentMessage( EventThreadServices& eventThreadServices,
2168 const SceneGraph::AnimatableProperty<T>& property,
2169 typename ParameterType< float >::PassingType newValue )
2171 typedef MessageDoubleBuffered1< SceneGraph::AnimatableProperty<T>, float > LocalType;
2173 // Reserve some memory inside the message queue
2174 unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
2176 // Construct message in the message queue memory; note that delete should not be called on the return value
2177 new (slot) LocalType( &property,
2178 &SceneGraph::AnimatableProperty<T>::BakeZ,
2183 void SetWComponentMessage( EventThreadServices& eventThreadServices,
2184 const SceneGraph::AnimatableProperty<T>& property,
2185 typename ParameterType< float >::PassingType newValue )
2187 typedef MessageDoubleBuffered1< SceneGraph::AnimatableProperty<T>, float > LocalType;
2189 // Reserve some memory inside the message queue
2190 unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
2192 // Construct message in the message queue memory; note that delete should not be called on the return value
2193 new (slot) LocalType( &property,
2194 &SceneGraph::AnimatableProperty<T>::BakeW,
2198 } // namespace Internal
2202 #endif // __DALI_INTERNAL_SCENE_GRAPH_ANIMATABLE_PROPERTY_H__