Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

ani::DynamicSystem< __EntityType > Class Template Reference

#include <DynamicSystem.h>

Inheritance diagram for ani::DynamicSystem< __EntityType >:

ani::Torch< __EntityType > List of all members.

Public Types

typedef __EntityType EntityType
typedef boost::shared_ptr<
__EntityType > 
EntityTypePtr
typedef boost::shared_ptr<
ani::Operator< __EntityType > > 
OperatorPtr
typedef std::vector< EntityTypePtr > EntityList
typedef std::list< OperatorPtr > OperatorList

Public Methods

 DynamicSystem ()
 constructor. More...

virtual ~DynamicSystem ()
 if you're seeing an error about the destructor, then maybe you're not creating the DynamicSystem with new ? More...

EntityList & entities ()
 get access to the list of entities so you can render them etc... More...

const EntityList & entities () const
OperatorList & operators ()
const OperatorList & operators () const
void push_back (OperatorPtr op)
 add a function to the system to be executed last. More...

void push_back (EntityTypePtr ent)
 add an entity to the system O(1). More...

void push_front (OperatorPtr op)
 add a function to the system to be executed first. More...

void push_front (EntityTypePtr ent)
 add an entity to the system O(1). More...

void remove (OperatorPtr op)
 remove an entity from the system O(1) specify its iterator... More...

void clear ()
void clearEntities ()
void clearOperators ()
const float & timeDelta () const
virtual void step (float timeDelta)
void setSolver (const std::string &solverName="heun")

Protected Attributes

std::list< OperatorPtr > mOps
std::vector< EntityTypePtr > mEntities
ODEsolver< __EntityType > * mSolver
float mTotalTime
float mTimeDelta

template<class __EntityType>
class ani::DynamicSystem< __EntityType >


Member Typedef Documentation

template<class __EntityType>
typedef __EntityType ani::DynamicSystem< __EntityType >::EntityType
 

Definition at line 51 of file DynamicSystem.h.

Referenced by ani::DynamicSystem< __EntityType >::step().

template<class __EntityType>
typedef boost::shared_ptr<__EntityType> ani::DynamicSystem< __EntityType >::EntityTypePtr
 

Definition at line 52 of file DynamicSystem.h.

template<class __EntityType>
typedef boost::shared_ptr< ani::Operator<__EntityType> > ani::DynamicSystem< __EntityType >::OperatorPtr
 

Definition at line 53 of file DynamicSystem.h.

template<class __EntityType>
typedef std::vector<EntityTypePtr> ani::DynamicSystem< __EntityType >::EntityList
 

Definition at line 54 of file DynamicSystem.h.

template<class __EntityType>
typedef std::list<OperatorPtr> ani::DynamicSystem< __EntityType >::OperatorList
 

Definition at line 55 of file DynamicSystem.h.


Constructor & Destructor Documentation

template<class __EntityType>
ani::DynamicSystem< __EntityType >::DynamicSystem (    )  [inline]
 

constructor.

template<class __EntityType>
virtual ani::DynamicSystem< __EntityType >::~DynamicSystem (    )  [inline, virtual]
 

if you're seeing an error about the destructor, then maybe you're not creating the DynamicSystem with new ?


Member Function Documentation

template<class __EntityType>
std::vector< boost::shared_ptr< __EntityType > > & ani::DynamicSystem< __EntityType >::entities (    )  [inline]
 

get access to the list of entities so you can render them etc...

Definition at line 162 of file DynamicSystem.h.

References ani::DynamicSystem< __EntityType >::mEntities.

Referenced by gator::CollisionResponseOperator::exec(), gator::Acceleration::exec(), ani::ViscousDragOperator< __EntityType >::exec(), ani::GrowWithAgeOperator< __EntityType >::exec(), ani::GrimReaperOperator< __EntityType >::exec(), ani::GlobalForceOperator< __EntityType >::exec(), ani::CurrentOperator< __EntityType >::exec(), ani::ColorWithAgeOperator< __EntityType >::exec(), and ani::AccelerationOperator< __EntityType >::exec().

template<class __EntityType>
const std::vector< boost::shared_ptr< __EntityType > > & ani::DynamicSystem< __EntityType >::entities (    )  const [inline]
 

Definition at line 168 of file DynamicSystem.h.

References ani::DynamicSystem< __EntityType >::mEntities.

template<class __EntityType>
std::list< boost::shared_ptr< ani::Operator< __EntityType > > > & ani::DynamicSystem< __EntityType >::operators (    )  [inline]
 

Definition at line 174 of file DynamicSystem.h.

References ani::DynamicSystem< __EntityType >::mOps.

template<class __EntityType>
const std::list< boost::shared_ptr< ani::Operator< __EntityType > > > & ani::DynamicSystem< __EntityType >::operators (    )  const [inline]
 

Definition at line 180 of file DynamicSystem.h.

References ani::DynamicSystem< __EntityType >::mOps.

template<class __EntityType>
void ani::DynamicSystem< __EntityType >::push_back (  OperatorPtr    op ) 
 

add a function to the system to be executed last.

Referenced by ani::FlameEmitter< __EntityType >::exec(), and ani::Torch< __EntityType >::Torch().

template<class __EntityType>
void ani::DynamicSystem< __EntityType >::push_back (  EntityTypePtr    ent ) 
 

add an entity to the system O(1).

template<class __EntityType>
void ani::DynamicSystem< __EntityType >::push_front (  OperatorPtr    op ) 
 

add a function to the system to be executed first.

template<class __EntityType>
void ani::DynamicSystem< __EntityType >::push_front (  EntityTypePtr    ent ) 
 

add an entity to the system O(1).

template<class __EntityType>
void ani::DynamicSystem< __EntityType >::remove (  OperatorPtr    op ) 
 

remove an entity from the system O(1) specify its iterator...

this function is useful only to operators (generally).

Referenced by ani::SpringForceOperator< __EntityType >::exec().

template<class __EntityType>
void ani::DynamicSystem< __EntityType >::clear (    )  [inline]
 

Definition at line 244 of file DynamicSystem.h.

References ani::DynamicSystem< __EntityType >::clearEntities(), and ani::DynamicSystem< __EntityType >::clearOperators().

template<class __EntityType>
void ani::DynamicSystem< __EntityType >::clearEntities (    )  [inline]
 

Definition at line 231 of file DynamicSystem.h.

References ani::DynamicSystem< __EntityType >::mEntities.

Referenced by ani::DynamicSystem< __EntityType >::clear().

template<class __EntityType>
void ani::DynamicSystem< __EntityType >::clearOperators (    )  [inline]
 

Definition at line 237 of file DynamicSystem.h.

References ani::DynamicSystem< __EntityType >::mOps.

Referenced by ani::DynamicSystem< __EntityType >::clear().

template<class __EntityType>
const float & ani::DynamicSystem< __EntityType >::timeDelta (    )  const [inline]
 

Definition at line 266 of file DynamicSystem.h.

References ani::DynamicSystem< __EntityType >::mTimeDelta.

Referenced by ani::SpiralEmitter< __EntityType >::exec(), ani::GrimReaperOperator< __EntityType >::exec(), ani::FlameEmitter< __EntityType >::exec(), and ani::DynamicSystem< __EntityType >::step().

template<class __EntityType>
void ani::DynamicSystem< __EntityType >::step (  float    timeDelta )  [inline, virtual]
 

Definition at line 272 of file DynamicSystem.h.

References ani::DynamicSystem< __EntityType >::EntityType, ani::ODEsolver< __EntityType >::exec(), ani::DynamicSystem< __EntityType >::mEntities, ani::DynamicSystem< __EntityType >::mSolver, ani::DynamicSystem< __EntityType >::mTimeDelta, ani::DynamicSystem< __EntityType >::mTotalTime, ani::DynamicSystem< __EntityType >::setSolver(), and ani::DynamicSystem< __EntityType >::timeDelta().

template<class __EntityType>
void ani::DynamicSystem< __EntityType >::setSolver (  const std::string &    solverName = "heun" )  [inline]
 

Definition at line 116 of file DynamicSystem.h.

Referenced by ani::DynamicSystem< __EntityType >::step(), and ani::Torch< __EntityType >::Torch().


Member Data Documentation

template<class __EntityType>
std::list<OperatorPtr> ani::DynamicSystem< __EntityType >::mOps [protected]
 

Definition at line 129 of file DynamicSystem.h.

Referenced by ani::DynamicSystem< __EntityType >::clearOperators(), and ani::DynamicSystem< __EntityType >::operators().

template<class __EntityType>
std::vector<EntityTypePtr> ani::DynamicSystem< __EntityType >::mEntities [protected]
 

Definition at line 130 of file DynamicSystem.h.

Referenced by ani::DynamicSystem< __EntityType >::clearEntities(), ani::DynamicSystem< __EntityType >::entities(), and ani::DynamicSystem< __EntityType >::step().

template<class __EntityType>
ODEsolver<__EntityType>* ani::DynamicSystem< __EntityType >::mSolver [protected]
 

Definition at line 131 of file DynamicSystem.h.

Referenced by ani::DynamicSystem< ani::Body >::setSolver(), and ani::DynamicSystem< __EntityType >::step().

template<class __EntityType>
float ani::DynamicSystem< __EntityType >::mTotalTime [protected]
 

Definition at line 135 of file DynamicSystem.h.

Referenced by ani::DynamicSystem< __EntityType >::step().

template<class __EntityType>
float ani::DynamicSystem< __EntityType >::mTimeDelta [protected]
 

Definition at line 136 of file DynamicSystem.h.

Referenced by ani::DynamicSystem< __EntityType >::step(), and ani::DynamicSystem< __EntityType >::timeDelta().


The documentation for this class was generated from the following file:
Generated on Wed Jun 12 01:54:06 2002 for Animaniac by doxygen1.2.15