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

OpenCAL::System Class Reference

#include <System.h>

Inheritance diagram for OpenCAL::System:

Inheritance graph
[legend]
Collaboration diagram for OpenCAL::System:

Collaboration graph
[legend]
List of all members.

Public Member Functions

ObjectgetObject (unsigned int i)
ActorgetActor (unsigned int i)
AgentgetAgent (unsigned int i)
SystemgetSystem (unsigned int i)
void setRenderer (Renderer *renderer)
RenderergetRenderer ()
virtual void render ()
void setPicker (Picker *picker)
PickergetPicker ()
virtual void renderPicking ()
virtual Objectpick (int x, int y)
SystemgetParent ()
const SystemgetParent () const
ObjectgetSelectedObject ()
void selectObject (Object *object)
void unselectObject ()
unsigned int numObjects () const
unsigned int numActors () const
unsigned int numAgents () const
unsigned int numSystems () const
unsigned int numChildren () const
bool hasParent () const
bool isEnabled () const
void enable ()
void disable ()
void toggle ()
void setEnabled (bool enabled)
bool getDraw () const
void setDraw (bool enabled=true)
void enableDraw ()
void disableDraw ()
void toggleDraw ()
virtual bool isInitialized () const
virtual void initialize ()
virtual void step (float deltaSeconds)

Protected Types

typedef vector< Object * > ObjectList
typedef vector< Actor * > ActorList
typedef vector< Agent * > AgentList
typedef vector< System * > SystemList

Protected Member Functions

 System (System *parent)
virtual void addObject (Object *object)
virtual void addActor (Actor *actor)
virtual void addAgent (Agent *agent)
virtual void addSystem (System *system)
virtual void deleteObject (Object *object)
virtual void deleteActor (Actor *actor)
virtual void deleteAgent (Agent *agent)
virtual void deleteSystem (System *system)
bool isDestructing () const

Protected Attributes

ObjectList m_objects
ActorList m_actors
AgentList m_agents
SystemList m_systems
Systemm_parent
bool m_initialized
bool m_draw
bool m_enabled
float m_accuracyHint
 This variable tells OpenCAL which techniques and parameters to choose.
Objectm_selectedObject
Rendererm_renderer
Pickerm_picker

Private Attributes

bool m_destructing
 Used internally only, when destructing the system.

Detailed Description

This is the base class of an animation system, containing objects, actors and agents

Todo:
When a new child is created, m_initialized should be false again.

Definition at line 36 of file System.h.


Member Function Documentation

void System::deleteActor Actor actor  )  [protected, virtual]
 

Todo:
This is in linear time. Maybe change the std::vector to a std::list? It would be in constant time then.

Throw exception?

Definition at line 471 of file System.cpp.

References m_destructing.

void System::deleteAgent Agent agent  )  [protected, virtual]
 

Todo:
This is in linear time. Maybe change the std::vector to a std::list? It would be in constant time then.

Throw exception?

Definition at line 494 of file System.cpp.

References m_destructing.

void System::deleteObject Object object  )  [protected, virtual]
 

Todo:
This is in linear time. Maybe change the std::vector to a std::list? It would be in constant time then.

Throw exception?

Definition at line 447 of file System.cpp.

References m_destructing.

void System::deleteSystem System system  )  [protected, virtual]
 

Todo:
This is in linear time. Maybe change the std::vector to a std::list? It would be in constant time then. But: the size() function in std::list is in linear time!

Throw exception?

Definition at line 517 of file System.cpp.

References m_destructing.

Actor* OpenCAL::System::getActor unsigned int  i  )  [inline]
 

Todo:
const Actor *getActor(unsigned int i) const;
Definition at line 72 of file System.h.

Agent* OpenCAL::System::getAgent unsigned int  i  )  [inline]
 

Todo:
const Agent *getAgent(unsigned int i) const;
Definition at line 74 of file System.h.

Object* OpenCAL::System::getObject unsigned int  i  )  [inline]
 

Todo:
const Object *getObject(unsigned int i) const;
Definition at line 70 of file System.h.

Referenced by OpenCAL::ObjectIterator::operator++().

System* OpenCAL::System::getSystem unsigned int  i  )  [inline]
 

Todo:
const System *getSystem(unsigned int i) const;
Definition at line 76 of file System.h.

Referenced by OpenCAL::ObjectIterator::operator++().

void System::initialize  )  [virtual]
 

Reimplemented in OpenCAL::PhysicsSystem.

Definition at line 211 of file System.cpp.

References OpenCAL::Renderer::initialize().

Referenced by OpenCAL::PhysicsSystem::initialize(), render(), and renderPicking().

Here is the call graph for this function:

void System::render  )  [virtual]
 

Reimplemented in OpenCAL::Cloth, and OpenCAL::Rope.

Definition at line 107 of file System.cpp.

References initialize().

Here is the call graph for this function:

void System::renderPicking  )  [virtual]
 

Definition at line 150 of file System.cpp.

References initialize(), OpenCAL::Picker::loadName(), OpenCAL::Picker::popName(), and OpenCAL::Picker::pushName().

Here is the call graph for this function:


The documentation for this class was generated from the following files:
Generated on Sun Aug 15 19:19:37 2004 for OpenCAL: Open Computer Animation Library by doxygen 1.3.8