# Ogre::AnimableValue Class Reference

Defines an object property which is animable, ie may be keyframed. More...

`#include <OgreAnimable.h>`

List of all members.

## Public Types

enum | ValueType { INT, REAL, VECTOR2, VECTOR3, VECTOR4, QUATERNION, COLOUR }
| The type of the value being animated. More...

## Public Member Functions

| AnimableValue (ValueType t)
virtual | ~AnimableValue ()
ValueType | getType (void) const
| Gets the value type of this animable value.
virtual void | setCurrentStateAsBaseValue (void)=0
| Sets the current state as the 'base' value; used for delta animation.
virtual void | setValue (int val)
| Set value.
virtual void | setValue (Real val)
| Set value.
virtual void | setValue (const Vector2 &val)
| Set value.
virtual void | setValue (const Vector3 &val)
| Set value.
virtual void | setValue (const Vector4 &val)
| Set value.
virtual void | setValue (const Quaternion &val)
| Set value.
virtual void | setValue (const ColourValue &val)
| Set value.
virtual void | setValue (const Any &val)
| Set value.
virtual void | resetToBaseValue (void)
virtual void | applyDeltaValue (int val)
| Apply delta value.
virtual void | applyDeltaValue (Real val)
| Set value.
virtual void | applyDeltaValue (const Vector2 &val)
| Apply delta value.
virtual void | applyDeltaValue (const Vector3 &val)
| Apply delta value.
virtual void | applyDeltaValue (const Vector4 &val)
| Apply delta value.
virtual void | applyDeltaValue (const Quaternion &val)
| Apply delta value.
virtual void | applyDeltaValue (const ColourValue &val)
| Apply delta value.
virtual void | applyDeltaValue (const Any &val)
| Apply delta value.

## Protected Member Functions

virtual void | setAsBaseValue (int val)
| Internal method to set a value as base.
virtual void | setAsBaseValue (Real val)
| Internal method to set a value as base.
virtual void | setAsBaseValue (const Vector2 &val)
| Internal method to set a value as base.
virtual void | setAsBaseValue (const Vector3 &val)
| Internal method to set a value as base.
virtual void | setAsBaseValue (const Vector4 &val)
| Internal method to set a value as base.
virtual void | setAsBaseValue (const Quaternion &val)
| Internal method to set a value as base.
virtual void | setAsBaseValue (const Any &val)
| Internal method to set a value as base.
virtual void | setAsBaseValue (const ColourValue &val)
| Internal method to set a value as base.

## Protected Attributes

ValueType | mType
| Value type.
int | mBaseValueInt
Real | mBaseValueReal [4]

## Detailed Description

Defines an object property which is animable, ie may be keyframed.

Remarks:
  Animable properties are those which can be altered over time by a predefined keyframe sequence. They may be set directly, or they may be modified from their existing state (common if multiple animations are expected to apply at once). Implementors of this interface are expected to override the 'setValue', 'setCurrentStateAsBaseValue' and 'applyDeltaValue' methods appropriate to the type in question, and to initialise the type.

  AnimableValue instances are accessible through any class which extends AnimableObject in order to expose it's animable properties.

Note:
  This class is an instance of the Adapter pattern, since it generalises access to a particular property. Whilst it could have been templated such that the type which was being referenced was compiled in, this would make it more difficult to aggregated generically, and since animations are often comprised of multiple properties it helps to be able to deal with all values through a single class.

Definition at line 61 of file OgreAnimable.h.

## Member Enumeration Documentation

enum Ogre::AnimableValue::ValueType

The type of the value being animated.

Enumeration values:

  INT |
  REAL |
  VECTOR2 |
  VECTOR3 |
  VECTOR4 |
  QUATERNION |
  COLOUR |

Definition at line 65 of file OgreAnimable.h.

## Constructor & Destructor Documentation

Ogre::AnimableValue::AnimableValue | ( | ValueType | t | ) |

| Definition at line 115 of file OgreAnimable.h.

virtual Ogre::AnimableValue::~AnimableValue | ( |  | ) | `[virtual]`

| Definition at line 116 of file OgreAnimable.h.

## Member Function Documentation

virtual void Ogre::AnimableValue::applyDeltaValue | ( | const Any & | val | ) | `[virtual]`

| Apply delta value.

virtual void Ogre::AnimableValue::applyDeltaValue | ( | const ColourValue & | val | ) | `[virtual]`

| Apply delta value. Definition at line 183 of file OgreAnimable.h. References Ogre::Exception::ERR_NOT_IMPLEMENTED, and OGRE_EXCEPT.

virtual void Ogre::AnimableValue::applyDeltaValue | ( | const Quaternion & | val | ) | `[virtual]`

| Apply delta value. Definition at line 179 of file OgreAnimable.h. References Ogre::Exception::ERR_NOT_IMPLEMENTED, and OGRE_EXCEPT.

virtual void Ogre::AnimableValue::applyDeltaValue | ( | const Vector4 & | val | ) | `[virtual]`

| Apply delta value. Definition at line 175 of file OgreAnimable.h. References Ogre::Exception::ERR_NOT_IMPLEMENTED, and OGRE_EXCEPT.

virtual void Ogre::AnimableValue::applyDeltaValue | ( | const Vector3 & | val | ) | `[virtual]`

| Apply delta value. Definition at line 171 of file OgreAnimable.h. References Ogre::Exception::ERR_NOT_IMPLEMENTED, and OGRE_EXCEPT.

virtual void Ogre::AnimableValue::applyDeltaValue | ( | const Vector2 & | val | ) | `[virtual]`

| Apply delta value. Definition at line 167 of file OgreAnimable.h. References Ogre::Exception::ERR_NOT_IMPLEMENTED, and OGRE_EXCEPT.

virtual void Ogre::AnimableValue::applyDeltaValue | ( | Real | val | ) | `[virtual]`

| Set value. Definition at line 163 of file OgreAnimable.h. References Ogre::Exception::ERR_NOT_IMPLEMENTED, and OGRE_EXCEPT.

virtual void Ogre::AnimableValue::applyDeltaValue | ( | int | val | ) | `[virtual]`

| Apply delta value. Definition at line 159 of file OgreAnimable.h. References Ogre::Exception::ERR_NOT_IMPLEMENTED, and OGRE_EXCEPT.

ValueType Ogre::AnimableValue::getType | ( | void |  | ) | const

| Gets the value type of this animable value. Definition at line 119 of file OgreAnimable.h.

virtual void Ogre::AnimableValue::resetToBaseValue | ( | void |  | ) | `[virtual]`

virtual void Ogre::AnimableValue::setAsBaseValue | ( | const ColourValue & | val | ) | `[protected, virtual]`

| Internal method to set a value as base. Definition at line 105 of file OgreAnimable.h. References Ogre::ColourValue::a, Ogre::ColourValue::b, Ogre::ColourValue::g, and Ogre::ColourValue::r.

virtual void Ogre::AnimableValue::setAsBaseValue | ( | const Any & | val | ) | `[protected, virtual]`

| Internal method to set a value as base.

virtual void Ogre::AnimableValue::setAsBaseValue | ( | const Quaternion & | val | ) | `[protected, virtual]`

| Internal method to set a value as base. Definition at line 100 of file OgreAnimable.h. References Ogre::Quaternion::val.

virtual void Ogre::AnimableValue::setAsBaseValue | ( | const Vector4 & | val | ) | `[protected, virtual]`

| Internal method to set a value as base. Definition at line 97 of file OgreAnimable.h. References Ogre::Vector4::val.

virtual void Ogre::AnimableValue::setAsBaseValue | ( | const Vector3 & | val | ) | `[protected, virtual]`

| Internal method to set a value as base. Definition at line 94 of file OgreAnimable.h. References Ogre::Vector3::val.

virtual void Ogre::AnimableValue::setAsBaseValue | ( | const Vector2 & | val | ) | `[protected, virtual]`

| Internal method to set a value as base. Definition at line 91 of file OgreAnimable.h. References Ogre::Vector2::val.

virtual void Ogre::AnimableValue::setAsBaseValue | ( | Real | val | ) | `[protected, virtual]`

| Internal method to set a value as base. Definition at line 89 of file OgreAnimable.h.

virtual void Ogre::AnimableValue::setAsBaseValue | ( | int | val | ) | `[protected, virtual]`

| Internal method to set a value as base. Definition at line 87 of file OgreAnimable.h.

virtual void Ogre::AnimableValue::setCurrentStateAsBaseValue | ( | void |  | ) | `[pure virtual]`

| Sets the current state as the 'base' value; used for delta animation.

virtual void Ogre::AnimableValue::setValue | ( | const Any & | val | ) | `[virtual]`

| Set value.

virtual void Ogre::AnimableValue::setValue | ( | const ColourValue & | val | ) | `[virtual]`

| Set value. Definition at line 149 of file OgreAnimable.h. References Ogre::Exception::ERR_NOT_IMPLEMENTED, and OGRE_EXCEPT.

virtual void Ogre::AnimableValue::setValue | ( | const Quaternion & | val | ) | `[virtual]`

| Set value. Definition at line 145 of file OgreAnimable.h. References Ogre::Exception::ERR_NOT_IMPLEMENTED, and OGRE_EXCEPT.

virtual void Ogre::AnimableValue::setValue | ( | const Vector4 & | val | ) | `[virtual]`

| Set value. Definition at line 141 of file OgreAnimable.h. References Ogre::Exception::ERR_NOT_IMPLEMENTED, and OGRE_EXCEPT.

virtual void Ogre::AnimableValue::setValue | ( | const Vector3 & | val | ) | `[virtual]`

| Set value. Definition at line 137 of file OgreAnimable.h. References Ogre::Exception::ERR_NOT_IMPLEMENTED, and OGRE_EXCEPT.

virtual void Ogre::AnimableValue::setValue | ( | const Vector2 & | val | ) | `[virtual]`

| Set value. Definition at line 133 of file OgreAnimable.h. References Ogre::Exception::ERR_NOT_IMPLEMENTED, and OGRE_EXCEPT.

virtual void Ogre::AnimableValue::setValue | ( | Real | val | ) | `[virtual]`

| Set value. Definition at line 129 of file OgreAnimable.h. References Ogre::Exception::ERR_NOT_IMPLEMENTED, and OGRE_EXCEPT.

virtual void Ogre::AnimableValue::setValue | ( | int | val | ) | `[virtual]`

| Set value. Definition at line 125 of file OgreAnimable.h. References Ogre::Exception::ERR_NOT_IMPLEMENTED, and OGRE_EXCEPT.

## Member Data Documentation

int Ogre::AnimableValue::mBaseValueInt `[protected]`

| Definition at line 82 of file OgreAnimable.h.

Real Ogre::AnimableValue::mBaseValueReal[4]`[protected]`

| Definition at line 83 of file OgreAnimable.h.

ValueType Ogre::AnimableValue::mType `[protected]`

| Value type. Definition at line 77 of file OgreAnimable.h.

The documentation for this class was generated from the following file:

- OgreAnimable.h

Copyright © 2000-2005 by The OGRE Team
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun Sep 17 15:39:19 2006