Ogre::AnimableValue Class Referenceabstract
Core » Animation

Defines an object property which is animable, i.e. More...

`#include <OgreAnimable.h>`

Inheritance diagram for Ogre::AnimableValue:
[legend]

## Public Types

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

## Public Member Functions

| AnimableValue (ValueType t)
virtual | ~AnimableValue ()
virtual void | applyDeltaValue (int)
| Apply delta value. More...
virtual void | applyDeltaValue (Real)
| Set value. More...
virtual void | applyDeltaValue (const Vector2 &)
| Apply delta value. More...
virtual void | applyDeltaValue (const Vector3 &)
| Apply delta value. More...
virtual void | applyDeltaValue (const Vector4 &)
| Apply delta value. More...
virtual void | applyDeltaValue (const Quaternion &)
| Apply delta value. More...
virtual void | applyDeltaValue (const ColourValue &)
| Apply delta value. More...
virtual void | applyDeltaValue (const Degree &)
| Apply delta value. More...
virtual void | applyDeltaValue (const Radian &)
| Apply delta value. More...
virtual void | applyDeltaValue (const Any &val)
| Apply delta value. More...
ValueType | getType (void) const
| Gets the value type of this animable value. More...
void | operator delete (void *ptr)
void | operator delete (void *ptr, void *)
void | operator delete (void *ptr, const char *, int, const char *)
void | operator delete[] (void *ptr)
void | operator delete[] (void *ptr, const char *, int, const char *)
void * | operator new (size_t sz, const char *file, int line, const char *func)
| operator new, with debug line info More...
void * | operator new (size_t sz)
void * | operator new (size_t sz, void *ptr)
| placement operator new More...
void * | operator new[] (size_t sz, const char *file, int line, const char *func)
| array operator new, with debug line info More...
void * | operator new[] (size_t sz)
virtual void | resetToBaseValue (void)
virtual void | setCurrentStateAsBaseValue (void)=0
| Sets the current state as the 'base' value; used for delta animation. More...
virtual void | setValue (int)
| Set value. More...
virtual void | setValue (Real)
| Set value. More...
virtual void | setValue (const Vector2 &)
| Set value. More...
virtual void | setValue (const Vector3 &)
| Set value. More...
virtual void | setValue (const Vector4 &)
| Set value. More...
virtual void | setValue (const Quaternion &)
| Set value. More...
virtual void | setValue (const ColourValue &)
| Set value. More...
virtual void | setValue (const Radian &)
| Set value. More...
virtual void | setValue (const Degree &)
| Set value. More...
virtual void | setValue (const Any &val)
| Set value. More...

## Protected Member Functions

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

## Protected Attributes

union {
int mBaseValueInt
Real mBaseValueReal [4]
}; |
| Base value data. More...
ValueType | mType
| Value type. More...

## Detailed Description

Defines an object property which is animable, i.e.

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 72 of file OgreAnimable.h.

## Member Enumeration Documentation

## ValueType

enum Ogre::AnimableValue::ValueType

The type of the value being animated.

Enumerator
INT |
REAL |
VECTOR2 |
VECTOR3 |
VECTOR4 |
QUATERNION |
COLOUR |
RADIAN |
DEGREE |

Definition at line 76 of file OgreAnimable.h.

## Constructor & Destructor Documentation

## AnimableValue()

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

Definition at line 138 of file OgreAnimable.h.

## ~AnimableValue()

virtual Ogre::AnimableValue::~AnimableValue | ( |  | ) |

virtual

Definition at line 139 of file OgreAnimable.h.

## Member Function Documentation

## applyDeltaValue() [1/10]

virtual void Ogre::AnimableValue::applyDeltaValue | ( | int |  | ) |

virtual

Apply delta value.

Definition at line 190 of file OgreAnimable.h.

References Ogre::Exception::ERR_NOT_IMPLEMENTED, and OGRE_EXCEPT.

## applyDeltaValue() [2/10]

virtual void Ogre::AnimableValue::applyDeltaValue | ( | Real |  | ) |

virtual

Set value.

Definition at line 194 of file OgreAnimable.h.

References Ogre::Exception::ERR_NOT_IMPLEMENTED, and OGRE_EXCEPT.

## applyDeltaValue() [3/10]

virtual void Ogre::AnimableValue::applyDeltaValue | ( | const Vector2 & |  | ) |

virtual

Apply delta value.

Definition at line 198 of file OgreAnimable.h.

References Ogre::Exception::ERR_NOT_IMPLEMENTED, and OGRE_EXCEPT.

## applyDeltaValue() [4/10]

virtual void Ogre::AnimableValue::applyDeltaValue | ( | const Vector3 & |  | ) |

virtual

Apply delta value.

Definition at line 202 of file OgreAnimable.h.

References Ogre::Exception::ERR_NOT_IMPLEMENTED, and OGRE_EXCEPT.

## applyDeltaValue() [5/10]

virtual void Ogre::AnimableValue::applyDeltaValue | ( | const Vector4 & |  | ) |

virtual

Apply delta value.

Definition at line 206 of file OgreAnimable.h.

References Ogre::Exception::ERR_NOT_IMPLEMENTED, and OGRE_EXCEPT.

## applyDeltaValue() [6/10]

virtual void Ogre::AnimableValue::applyDeltaValue | ( | const Quaternion & |  | ) |

virtual

Apply delta value.

Definition at line 210 of file OgreAnimable.h.

References Ogre::Exception::ERR_NOT_IMPLEMENTED, and OGRE_EXCEPT.

## applyDeltaValue() [7/10]

virtual void Ogre::AnimableValue::applyDeltaValue | ( | const ColourValue & |  | ) |

virtual

Apply delta value.

Definition at line 214 of file OgreAnimable.h.

References Ogre::Exception::ERR_NOT_IMPLEMENTED, and OGRE_EXCEPT.

## applyDeltaValue() [8/10]

virtual void Ogre::AnimableValue::applyDeltaValue | ( | const Degree & |  | ) |

virtual

Apply delta value.

Definition at line 218 of file OgreAnimable.h.

References Ogre::Exception::ERR_NOT_IMPLEMENTED, and OGRE_EXCEPT.

## applyDeltaValue() [9/10]

virtual void Ogre::AnimableValue::applyDeltaValue | ( | const Radian & |  | ) |

virtual

Apply delta value.

Definition at line 222 of file OgreAnimable.h.

References Ogre::Exception::ERR_NOT_IMPLEMENTED, and OGRE_EXCEPT.

## applyDeltaValue() [10/10]

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

virtual

Apply delta value.

## getType()

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

Gets the value type of this animable value.

Definition at line 142 of file OgreAnimable.h.

## operator delete() [1/3]

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr | ) |

inherited

Definition at line 96 of file OgreMemoryAllocatedObject.h.

## operator delete() [2/3]

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr,
|  | void * |
| ) |  |

inherited

Definition at line 102 of file OgreMemoryAllocatedObject.h.

## operator delete() [3/3]

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr,
|  | const char * | ,
|  | int | ,
|  | const char * |
| ) |  |

inherited

Definition at line 108 of file OgreMemoryAllocatedObject.h.

## operator delete[]() [1/2]

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete[] | ( | void * | ptr | ) |

inherited

Definition at line 113 of file OgreMemoryAllocatedObject.h.

## operator delete[]() [2/2]

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete[] | ( | void * | ptr,
|  | const char * | ,
|  | int | ,
|  | const char * |
| ) |  |

inherited

Definition at line 119 of file OgreMemoryAllocatedObject.h.

## operator new() [1/3]

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz,
|  | const char * | file,
|  | int | line,
|  | const char * | func
| ) |  |

inherited

operator new, with debug line info

Definition at line 68 of file OgreMemoryAllocatedObject.h.

## operator new() [2/3]

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz | ) |

inherited

Definition at line 73 of file OgreMemoryAllocatedObject.h.

## operator new() [3/3]

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz,
|  | void * | ptr
| ) |  |

inherited

placement operator new

Definition at line 79 of file OgreMemoryAllocatedObject.h.

## operator new[]() [1/2]

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new[] | ( | size_t | sz,
|  | const char * | file,
|  | int | line,
|  | const char * | func
| ) |  |

inherited

array operator new, with debug line info

Definition at line 86 of file OgreMemoryAllocatedObject.h.

## operator new[]() [2/2]

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new[] | ( | size_t | sz | ) |

inherited

Definition at line 91 of file OgreMemoryAllocatedObject.h.

## resetToBaseValue()

virtual void Ogre::AnimableValue::resetToBaseValue | ( | void |  | ) |

virtual

## setAsBaseValue() [1/10]

virtual void Ogre::AnimableValue::setAsBaseValue | ( | int | val | ) |

protected virtual

Internal method to set a value as base.

Definition at line 100 of file OgreAnimable.h.

## setAsBaseValue() [2/10]

virtual void Ogre::AnimableValue::setAsBaseValue | ( | Real | val | ) |

protected virtual

Internal method to set a value as base.

Definition at line 102 of file OgreAnimable.h.

## setAsBaseValue() [3/10]

virtual void Ogre::AnimableValue::setAsBaseValue | ( | const Vector2 & | val | ) |

protected virtual

Internal method to set a value as base.

Definition at line 104 of file OgreAnimable.h.

References Ogre::Vector2::ptr().

## setAsBaseValue() [4/10]

virtual void Ogre::AnimableValue::setAsBaseValue | ( | const Vector3 & | val | ) |

protected virtual

Internal method to set a value as base.

Definition at line 107 of file OgreAnimable.h.

References Ogre::Vector3::ptr().

## setAsBaseValue() [5/10]

virtual void Ogre::AnimableValue::setAsBaseValue | ( | const Vector4 & | val | ) |

protected virtual

Internal method to set a value as base.

Definition at line 110 of file OgreAnimable.h.

References Ogre::Vector4::ptr().

## setAsBaseValue() [6/10]

virtual void Ogre::AnimableValue::setAsBaseValue | ( | const Quaternion & | val | ) |

protected virtual

Internal method to set a value as base.

Definition at line 113 of file OgreAnimable.h.

References Ogre::Quaternion::ptr().

## setAsBaseValue() [7/10]

virtual void Ogre::AnimableValue::setAsBaseValue | ( | const Any & | val | ) |

protected virtual

Internal method to set a value as base.

## setAsBaseValue() [8/10]

virtual void Ogre::AnimableValue::setAsBaseValue | ( | const ColourValue & | val | ) |

protected virtual

Internal method to set a value as base.

Definition at line 118 of file OgreAnimable.h.

References Ogre::ColourValue::a, Ogre::ColourValue::b, Ogre::ColourValue::g, and Ogre::ColourValue::r.

## setAsBaseValue() [9/10]

virtual void Ogre::AnimableValue::setAsBaseValue | ( | const Radian & | val | ) |

protected virtual

Internal method to set a value as base.

Definition at line 126 of file OgreAnimable.h.

References Ogre::Radian::valueRadians().

## setAsBaseValue() [10/10]

virtual void Ogre::AnimableValue::setAsBaseValue | ( | const Degree & | val | ) |

protected virtual

Internal method to set a value as base.

Definition at line 131 of file OgreAnimable.h.

References Ogre::Degree::valueRadians().

## setCurrentStateAsBaseValue()

virtual void Ogre::AnimableValue::setCurrentStateAsBaseValue | ( | void |  | ) |

pure virtual

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

## setValue() [1/10]

virtual void Ogre::AnimableValue::setValue | ( | int |  | ) |

virtual

Set value.

Definition at line 148 of file OgreAnimable.h.

References Ogre::Exception::ERR_NOT_IMPLEMENTED, and OGRE_EXCEPT.

## setValue() [2/10]

virtual void Ogre::AnimableValue::setValue | ( | Real |  | ) |

virtual

Set value.

Definition at line 152 of file OgreAnimable.h.

References Ogre::Exception::ERR_NOT_IMPLEMENTED, and OGRE_EXCEPT.

## setValue() [3/10]

virtual void Ogre::AnimableValue::setValue | ( | const Vector2 & |  | ) |

virtual

Set value.

Definition at line 156 of file OgreAnimable.h.

References Ogre::Exception::ERR_NOT_IMPLEMENTED, and OGRE_EXCEPT.

## setValue() [4/10]

virtual void Ogre::AnimableValue::setValue | ( | const Vector3 & |  | ) |

virtual

Set value.

Definition at line 160 of file OgreAnimable.h.

References Ogre::Exception::ERR_NOT_IMPLEMENTED, and OGRE_EXCEPT.

## setValue() [5/10]

virtual void Ogre::AnimableValue::setValue | ( | const Vector4 & |  | ) |

virtual

Set value.

Definition at line 164 of file OgreAnimable.h.

References Ogre::Exception::ERR_NOT_IMPLEMENTED, and OGRE_EXCEPT.

## setValue() [6/10]

virtual void Ogre::AnimableValue::setValue | ( | const Quaternion & |  | ) |

virtual

Set value.

Definition at line 168 of file OgreAnimable.h.

References Ogre::Exception::ERR_NOT_IMPLEMENTED, and OGRE_EXCEPT.

## setValue() [7/10]

virtual void Ogre::AnimableValue::setValue | ( | const ColourValue & |  | ) |

virtual

Set value.

Definition at line 172 of file OgreAnimable.h.

References Ogre::Exception::ERR_NOT_IMPLEMENTED, and OGRE_EXCEPT.

## setValue() [8/10]

virtual void Ogre::AnimableValue::setValue | ( | const Radian & |  | ) |

virtual

Set value.

Definition at line 176 of file OgreAnimable.h.

References Ogre::Exception::ERR_NOT_IMPLEMENTED, and OGRE_EXCEPT.

## setValue() [9/10]

virtual void Ogre::AnimableValue::setValue | ( | const Degree & |  | ) |

virtual

Set value.

Definition at line 180 of file OgreAnimable.h.

References Ogre::Exception::ERR_NOT_IMPLEMENTED, and OGRE_EXCEPT.

## setValue() [10/10]

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

virtual

Set value.

## Member Data Documentation

## @1

union { ... }

Base value data.

## mBaseValueInt

int Ogre::AnimableValue::mBaseValueInt

Definition at line 95 of file OgreAnimable.h.

## mBaseValueReal

Real Ogre::AnimableValue::mBaseValueReal[4]

Definition at line 96 of file OgreAnimable.h.

## mType

ValueType Ogre::AnimableValue::mType

protected

Value type.

Definition at line 90 of file OgreAnimable.h.

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

- OgreAnimable.h

Copyright © 2012 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.