OGRE  1.7
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Ogre::AnimableValue Class Referenceabstract

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

#include <OgreAnimable.h>

+ Inheritance diagram for Ogre::AnimableValue:
+ Collaboration diagram for Ogre::AnimableValue:

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

Member Enumeration Documentation

The type of the value being animated.

Enumerator
INT 
REAL 
VECTOR2 
VECTOR3 
VECTOR4 
QUATERNION 
COLOUR 
RADIAN 
DEGREE 

Definition at line 75 of file OgreAnimable.h.

Constructor & Destructor Documentation

Ogre::AnimableValue::AnimableValue ( ValueType  t)
inline

Definition at line 137 of file OgreAnimable.h.

virtual Ogre::AnimableValue::~AnimableValue ( )
inlinevirtual

Definition at line 138 of file OgreAnimable.h.

Member Function Documentation

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

Apply delta value.

Definition at line 189 of file OgreAnimable.h.

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

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

Set value.

Definition at line 193 of file OgreAnimable.h.

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

virtual void Ogre::AnimableValue::applyDeltaValue ( const Vector2 )
inlinevirtual

Apply delta value.

Definition at line 197 of file OgreAnimable.h.

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

virtual void Ogre::AnimableValue::applyDeltaValue ( const Vector3 )
inlinevirtual

Apply delta value.

Definition at line 201 of file OgreAnimable.h.

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

virtual void Ogre::AnimableValue::applyDeltaValue ( const Vector4 )
inlinevirtual

Apply delta value.

Definition at line 205 of file OgreAnimable.h.

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

virtual void Ogre::AnimableValue::applyDeltaValue ( const Quaternion )
inlinevirtual

Apply delta value.

Definition at line 209 of file OgreAnimable.h.

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

virtual void Ogre::AnimableValue::applyDeltaValue ( const ColourValue )
inlinevirtual

Apply delta value.

Definition at line 213 of file OgreAnimable.h.

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

virtual void Ogre::AnimableValue::applyDeltaValue ( const Degree )
inlinevirtual

Apply delta value.

Definition at line 217 of file OgreAnimable.h.

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

virtual void Ogre::AnimableValue::applyDeltaValue ( const Radian )
inlinevirtual

Apply delta value.

Definition at line 221 of file OgreAnimable.h.

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

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

Apply delta value.

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

Gets the value type of this animable value.

Definition at line 141 of file OgreAnimable.h.

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void *  ptr)
inlineinherited

Definition at line 95 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void *  ptr,
void *   
)
inlineinherited

Definition at line 101 of file OgreMemoryAllocatedObject.h.

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

Definition at line 107 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete[] ( void *  ptr)
inlineinherited

Definition at line 112 of file OgreMemoryAllocatedObject.h.

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

Definition at line 118 of file OgreMemoryAllocatedObject.h.

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

operator new, with debug line info

Definition at line 67 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz)
inlineinherited

Definition at line 72 of file OgreMemoryAllocatedObject.h.

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

placement operator new

Definition at line 78 of file OgreMemoryAllocatedObject.h.

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

array operator new, with debug line info

Definition at line 85 of file OgreMemoryAllocatedObject.h.

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

Definition at line 90 of file OgreMemoryAllocatedObject.h.

virtual void Ogre::AnimableValue::resetToBaseValue ( void  )
virtual
virtual void Ogre::AnimableValue::setAsBaseValue ( int  val)
inlineprotectedvirtual

Internal method to set a value as base.

Definition at line 99 of file OgreAnimable.h.

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

Internal method to set a value as base.

Definition at line 101 of file OgreAnimable.h.

virtual void Ogre::AnimableValue::setAsBaseValue ( const Vector2 val)
inlineprotectedvirtual

Internal method to set a value as base.

Definition at line 103 of file OgreAnimable.h.

References Ogre::Vector2::ptr().

virtual void Ogre::AnimableValue::setAsBaseValue ( const Vector3 val)
inlineprotectedvirtual

Internal method to set a value as base.

Definition at line 106 of file OgreAnimable.h.

References Ogre::Vector3::ptr().

virtual void Ogre::AnimableValue::setAsBaseValue ( const Vector4 val)
inlineprotectedvirtual

Internal method to set a value as base.

Definition at line 109 of file OgreAnimable.h.

References Ogre::Vector4::ptr().

virtual void Ogre::AnimableValue::setAsBaseValue ( const Quaternion val)
inlineprotectedvirtual

Internal method to set a value as base.

Definition at line 112 of file OgreAnimable.h.

References Ogre::Quaternion::ptr().

virtual void Ogre::AnimableValue::setAsBaseValue ( const Any val)
protectedvirtual

Internal method to set a value as base.

virtual void Ogre::AnimableValue::setAsBaseValue ( const ColourValue val)
inlineprotectedvirtual

Internal method to set a value as base.

Definition at line 117 of file OgreAnimable.h.

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

virtual void Ogre::AnimableValue::setAsBaseValue ( const Radian val)
inlineprotectedvirtual

Internal method to set a value as base.

Definition at line 125 of file OgreAnimable.h.

References Ogre::Radian::valueRadians().

virtual void Ogre::AnimableValue::setAsBaseValue ( const Degree val)
inlineprotectedvirtual

Internal method to set a value as base.

Definition at line 130 of file OgreAnimable.h.

References Ogre::Degree::valueRadians().

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 ( int  )
inlinevirtual

Set value.

Definition at line 147 of file OgreAnimable.h.

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

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

Set value.

Definition at line 151 of file OgreAnimable.h.

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

virtual void Ogre::AnimableValue::setValue ( const Vector2 )
inlinevirtual

Set value.

Definition at line 155 of file OgreAnimable.h.

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

virtual void Ogre::AnimableValue::setValue ( const Vector3 )
inlinevirtual

Set value.

Definition at line 159 of file OgreAnimable.h.

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

virtual void Ogre::AnimableValue::setValue ( const Vector4 )
inlinevirtual

Set value.

Definition at line 163 of file OgreAnimable.h.

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

virtual void Ogre::AnimableValue::setValue ( const Quaternion )
inlinevirtual

Set value.

Definition at line 167 of file OgreAnimable.h.

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

virtual void Ogre::AnimableValue::setValue ( const ColourValue )
inlinevirtual

Set value.

Definition at line 171 of file OgreAnimable.h.

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

virtual void Ogre::AnimableValue::setValue ( const Radian )
inlinevirtual

Set value.

Definition at line 175 of file OgreAnimable.h.

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

virtual void Ogre::AnimableValue::setValue ( const Degree )
inlinevirtual

Set value.

Definition at line 179 of file OgreAnimable.h.

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

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

Set value.

Member Data Documentation

union { ... }

Base value data.

int Ogre::AnimableValue::mBaseValueInt

Definition at line 94 of file OgreAnimable.h.

Real Ogre::AnimableValue::mBaseValueReal[4]

Definition at line 95 of file OgreAnimable.h.

ValueType Ogre::AnimableValue::mType
protected

Value type.

Definition at line 89 of file OgreAnimable.h.


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