| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- #ifndef ANIMATIONVALUE_H_
- #define ANIMATIONVALUE_H_
- #include "Animation.h"
- namespace gameplay
- {
- /**
- * The runtime interface to represent an animation value.
- */
- class AnimationValue
- {
- friend class AnimationClip;
- public:
- /**
- * Gets the value at the specified index.
- *
- * @param index The index of the component to get the value for.
- *
- * @return The float value at the specified index.
- */
- float getFloat(unsigned int index) const;
- /**
- * Sets the value at the specified index.
- *
- * @param index The index of the component to set the value for.
- * @param value The value to set the component to.
- */
- void setFloat(unsigned int index, float value);
- /**
- * Gets the value of the AnimationValue in a float array.
- *
- * @param value The array to populate with the AnimationValue's values.
- * @param offset The offset into the value to start populating.
- * @param length The number of values to copy into the array.
- */
- void getFloat(float* value, unsigned int offset, unsigned int length) const;
- /**
- * Sets the value of the AnimationValue.
- *
- * @param value The array to populate the AnimationValue's values.
- * @param offset The offset into the value array to start populating from.
- * @param length The number of values to copy into the AnimationValue.
- */
- void setFloat(float* value, unsigned int offset, unsigned int length);
- private:
- /**
- * Constructor.
- */
- AnimationValue();
- /**
- * Constructor.
- */
- AnimationValue(unsigned int componentCount);
- /**
- * Constructor.
- */
- AnimationValue(const AnimationValue& copy);
- /**
- * Destructor.
- */
- ~AnimationValue();
- unsigned int _componentCount; // The number of float values for the property.
- unsigned int _componentSize; // The number of bytes of memory the property is.
- float* _value; // The current value of the property.
- };
- }
- #endif
|