Stg::StgWorld Class Reference

#include <stage.hh>

Inherits Stg::StgAncestor.

Inherited by Stg::StgWorldGui.

List of all members.


Detailed Description

WORLD CLASS

Public Member Functions

void AddBlock (StgBlock *block)
virtual void AddModel (StgModel *mod)
void CancelQuit ()
void CancelQuitAll ()
void ClearRays ()
void ClockString (char *str, size_t maxlen)
void ForEachModel (GHFunc func, void *arg)
stg_bounds3d_t GetExtent ()
StgModelGetModel (const char *name)
StgModelGetModel (const stg_id_t id)
GList * GetRayList ()
stg_usec_t GetSimInterval ()
long unsigned int GetUpdateCount ()
WorldfileGetWorldFile ()
void IdleUntilNextUpdateTime (int(*idler)(void))
virtual void Load (const char *worldfile_path)
void PauseUntilNextUpdateTime (void)
void Quit ()
void QuitAll ()
stg_usec_t RealTimeNow (void)
stg_usec_t RealTimeSinceStart (void)
virtual bool RealTimeUpdate (void)
virtual bool RealTimeUpdateWithIdler (int(*idler)(void))
virtual void Reload ()
void RemoveBlock (StgBlock *block)
virtual void RemoveModel (StgModel *mod)
double Resolution ()
virtual void Save ()
stg_usec_t SimTimeNow (void)
void Start ()
 StgWorld (const char *token, stg_msec_t interval_sim, stg_msec_t interval_real, double ppm)
 StgWorld ()
void Stop ()
bool TestQuit ()
void TogglePause ()
virtual bool Update (void)
virtual ~StgWorld ()

Protected Member Functions

void Extend (stg_point3_t pt)
void RecordRay (double x1, double y1, double x2, double y2)

Protected Attributes

stg_bounds3d_t extent
bool graphics
stg_usec_t interval_real
 real-time interval between updates - set this to zero for 'as fast as possible
GArray lines
GList * ray_list
GHashTable * superregions
Worldfilewf
 If set, points to the worldfile used to create this world.

Friends

class StgBlock
class StgModel
class StgTime

Constructor & Destructor Documentation

StgWorld::StgWorld ( void   ) 

StgWorld::StgWorld ( const char *  token,
stg_msec_t  interval_sim,
stg_msec_t  interval_real,
double  ppm 
)

StgWorld::~StgWorld ( void   )  [virtual]

References PRINT_DEBUG2, and wf.


Member Function Documentation

void Stg::StgWorld::AddBlock ( StgBlock block  ) 

void StgWorld::AddModel ( StgModel mod  )  [virtual]

References Stg::StgModel::Id().

Referenced by Stg::StgModel::StgModel().

void Stg::StgWorld::CancelQuit (  )  [inline]

void Stg::StgWorld::CancelQuitAll (  )  [inline]

void StgWorld::ClearRays (  ) 

References ray_list.

Referenced by Stg::StgCanvas::draw().

void StgWorld::ClockString ( char *  str,
size_t  maxlen 
)

References Stg::INTERVAL_LOG_LEN.

Referenced by Stg::StgCanvas::draw().

void StgWorld::Extend ( stg_point3_t  pt  )  [protected]

void Stg::StgWorld::ForEachModel ( GHFunc  func,
void *  arg 
) [inline]

Referenced by Reload(), and Save().

stg_bounds3d_t Stg::StgWorld::GetExtent (  )  [inline]

References extent.

Referenced by Stg::StgCanvas::draw().

StgModel * StgWorld::GetModel ( const char *  name  ) 

References PRINT_DEBUG1, and PRINT_WARN1.

GList* Stg::StgWorld::GetRayList (  )  [inline]

References ray_list.

Referenced by Stg::StgCanvas::draw().

stg_usec_t Stg::StgWorld::GetSimInterval (  )  [inline]

long unsigned int Stg::StgWorld::GetUpdateCount (  )  [inline]

void StgWorld::IdleUntilNextUpdateTime ( int(*)(void)  idler  ) 

void StgWorld::PauseUntilNextUpdateTime ( void   ) 

void Stg::StgWorld::Quit (  )  [inline]

void Stg::StgWorld::QuitAll (  )  [inline]

stg_usec_t StgWorld::RealTimeNow ( void   ) 

Referenced by Load(), and RealTimeSinceStart().

stg_usec_t StgWorld::RealTimeSinceStart ( void   ) 

bool StgWorld::RealTimeUpdate ( void   )  [virtual]

Reimplemented in Stg::StgWorldGui.

References PauseUntilNextUpdateTime(), and Update().

Referenced by main(), and StgDriver::Update().

bool StgWorld::RealTimeUpdateWithIdler ( int(*)(void)  idler  )  [virtual]

void StgWorld::RecordRay ( double  x1,
double  y1,
double  x2,
double  y2 
) [protected]

References ray_list.

void StgWorld::Reload ( void   )  [virtual]

References ForEachModel().

void Stg::StgWorld::RemoveBlock ( StgBlock block  ) 

void StgWorld::RemoveModel ( StgModel mod  )  [virtual]

double Stg::StgWorld::Resolution (  )  [inline]

Referenced by Stg::StgCanvas::draw().

void StgWorld::Save ( void   )  [virtual]

Reimplemented in Stg::StgWorldGui.

References ForEachModel(), Stg::Worldfile::Save(), and wf.

Referenced by Stg::StgWorldGui::Save().

stg_usec_t Stg::StgWorld::SimTimeNow ( void   )  [inline]

void Stg::StgWorld::Start (  )  [inline]

void Stg::StgWorld::Stop (  )  [inline]

bool Stg::StgWorld::TestQuit (  )  [inline]

Referenced by main().

void Stg::StgWorld::TogglePause (  )  [inline]

Referenced by Stg::StgCanvas::handle().

bool StgWorld::Update ( void   )  [virtual]


Friends And Related Function Documentation

friend class StgBlock [friend]

friend class StgModel [friend]

friend class StgTime [friend]


Member Data Documentation

Referenced by Extend(), and GetExtent().

real-time interval between updates - set this to zero for 'as fast as possible

Referenced by Stg::StgWorldGui::RealTimeUpdate().

GArray Stg::StgWorld::lines [protected]

GList* Stg::StgWorld::ray_list [protected]

Referenced by ClearRays(), GetRayList(), and RecordRay().

If set, points to the worldfile used to create this world.

Referenced by GetWorldFile(), Stg::StgWorldGui::Load(), Load(), Stg::StgModel::Load(), Stg::StgWorldGui::Save(), Save(), Stg::StgModel::Save(), and ~StgWorld().


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

Generated on Thu Jan 7 17:42:17 2010 for Stage by  doxygen 1.5.5