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

UniverseAPI Class Reference

API Universe. More...

#include <S2_api.h>

List of all members.

Public Member Functions

 UniverseAPI ()
 ~UniverseAPI ()
Universe Creation and Destruction
[OSCAR] These methods should be easily mapped into S2::Universe creation/destruction methods

bool BigBang (unsigned int max_obj=S2_UNIVERSE_DEFAULT_MAX_OBJ)
void BigCrunch ()
System creation and destruction
[OSCAR] These methods will encapsulate the complexity of creating/destroying Systems and adding/removing S2::Objects to them.

SystemAPICreateSystemAPI ()
void DestroySystemAPI (SystemAPI *p_system)
Object creation and destruction
[OSCAR] These methods will encapsulate the complexity of creating/destroying and adding/removing S2::Objects of any type/model.

ParticleAPICreateParticleAPI (SystemAPI *p_sys=NULL)
void DestroyParticleAPI (ParticleAPI *p_particle)
RigidAPICreateRigidAPI (SystemAPI *p_sys=NULL)
void DestroyRigidAPI (RigidAPI *p_rigid)
Simulation methods
void Update (Real dt)
Utility methods
void Debug (S2::DebugStream &ds)

Private Attributes

S2::Universem_pUniverse


Detailed Description

API Universe.

Universe public API for Saphyre2. Offers user-level functionality for creating, running and querying an animated universe.

Factory of Animation Objects and Systems.


Constructor & Destructor Documentation

BEGIN_NAMESPACE_S2API UniverseAPI::UniverseAPI  ) 
 

UniverseAPI::~UniverseAPI  ) 
 


Member Function Documentation

bool UniverseAPI::BigBang unsigned int  max_obj = S2_UNIVERSE_DEFAULT_MAX_OBJ  ) 
 

Initializes a Universe with a rigid maximum of max_obj animation objects.

void UniverseAPI::BigCrunch  ) 
 

It's the end of the world as we know it...

ParticleAPI * UniverseAPI::CreateParticleAPI SystemAPI p_sys = NULL  ) 
 

Creates a particle and adds it to the p_sys System if not NULL. Otherwise the object is considered uncoupled with any other object (it's a free object)

RigidAPI * UniverseAPI::CreateRigidAPI SystemAPI p_sys = NULL  ) 
 

Creates a rigid body and adds it to the p_sys System if not NULL. Otherwise the object is considered uncoupled with any other object (it's a free object)

SystemAPI * UniverseAPI::CreateSystemAPI  ) 
 

Creates an empty SystemAPI in the Universe.

void UniverseAPI::Debug S2::DebugStream &  ds  ) 
 

Prints some info about the Universe in the log file.

void UniverseAPI::DestroyParticleAPI ParticleAPI p_particle  ) 
 

void UniverseAPI::DestroyRigidAPI RigidAPI p_rigid  ) 
 

void UniverseAPI::DestroySystemAPI SystemAPI p_system  ) 
 

Exactly that... and also frees the used memory, so don't try to use p_system after this call ok?

void UniverseAPI::Update Real  dt  ) 
 

Advances a timestep of dt for all the Objects currently simulated in this Universe.


Member Data Documentation

S2::Universe* UniverseAPI::m_pUniverse [private]
 


The documentation for this class was generated from the following files:
Generated on Tue Aug 10 15:58:31 2004 for Saphyre2 by doxygen 1.3.5