Stg::StgWorld Class Reference
#include <stage.hh>
Inherits Stg::StgAncestor.
Inherited by Stg::StgWorldGui.
Detailed Description
WORLD CLASSPublic 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 () |
| StgModel * | GetModel (const char *name) |
| StgModel * | GetModel (const stg_id_t id) |
| GList * | GetRayList () |
| stg_usec_t | GetSimInterval () |
| long unsigned int | GetUpdateCount () |
| Worldfile * | GetWorldFile () |
| 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 |
| Worldfile * | wf |
| 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] |
| void Stg::StgWorld::CancelQuit | ( | ) | [inline] |
| void Stg::StgWorld::CancelQuitAll | ( | ) | [inline] |
| void StgWorld::ClearRays | ( | ) |
| void StgWorld::ClockString | ( | char * | str, | |
| size_t | maxlen | |||
| ) |
| void StgWorld::Extend | ( | stg_point3_t | pt | ) | [protected] |
Enlarge the bounding volume to include this point
References extent, Stg::stg_bounds_t::max, Stg::stg_bounds_t::min, Stg::stg_point3_t::x, Stg::stg_bounds3d_t::x, Stg::stg_point3_t::y, Stg::stg_bounds3d_t::y, Stg::stg_point3_t::z, and Stg::stg_bounds3d_t::z.
| void Stg::StgWorld::ForEachModel | ( | GHFunc | func, | |
| void * | arg | |||
| ) | [inline] |
| stg_bounds3d_t Stg::StgWorld::GetExtent | ( | ) | [inline] |
| StgModel * StgWorld::GetModel | ( | const char * | name | ) |
References PRINT_DEBUG1, and PRINT_WARN1.
References PRINT_DEBUG1.
Referenced by Stg::StgModel::GetModel(), Load(), StgDriver::LocateModel(), main(), InterfaceSimulation::ProcessMessage(), and Stg::StgCanvas::Select().
| GList* Stg::StgWorld::GetRayList | ( | ) | [inline] |
| stg_usec_t Stg::StgWorld::GetSimInterval | ( | ) | [inline] |
Referenced by Stg::StgModelPosition::Update().
| long unsigned int Stg::StgWorld::GetUpdateCount | ( | ) | [inline] |
| Worldfile* Stg::StgWorld::GetWorldFile | ( | ) | [inline] |
| void StgWorld::IdleUntilNextUpdateTime | ( | int(*)(void) | idler | ) |
References Stg::INTERVAL_LOG_LEN, and RealTimeSinceStart().
Referenced by RealTimeUpdateWithIdler().
| void StgWorld::Load | ( | const char * | worldfile_path | ) | [virtual] |
Reimplemented in Stg::StgWorldGui.
References Stg::Worldfile::GetEntityCount(), Stg::Worldfile::GetEntityParent(), Stg::Worldfile::GetEntityType(), GetModel(), init_models(), Stg::StgModel::Load(), Stg::Worldfile::Load(), Stg::million, PRINT_DEBUG1, PRINT_DEBUG2, PRINT_ERR1, Stg::Worldfile::PropertyExists(), Stg::Worldfile::ReadFloat(), Stg::Worldfile::ReadInt(), Stg::Worldfile::ReadString(), RealTimeNow(), STG_DEFAULT_WORLD_PPM, Stg::thousand, Stg::Typetable(), Stg::Worldfile::WarnUnused(), and wf.
Referenced by InterfaceSimulation::InterfaceSimulation(), Stg::StgWorldGui::Load(), and main().
| 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] |
References IdleUntilNextUpdateTime(), and Update().
Referenced by Stg::StgWorldGui::RealTimeUpdate().
| 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] |
Referenced by Stg::StgModel::~StgModel().
| 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] |
Referenced by StTime::GetTime(), and StTime::GetTimeDouble().
| void Stg::StgWorld::Start | ( | ) | [inline] |
Referenced by InterfaceSimulation::InterfaceSimulation().
| 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] |
Reimplemented in Stg::StgWorldGui.
Referenced by main(), RealTimeUpdate(), RealTimeUpdateWithIdler(), and Stg::StgWorldGui::Update().
Friends And Related Function Documentation
friend class StgBlock [friend] |
friend class StgModel [friend] |
friend class StgTime [friend] |
Member Data Documentation
stg_bounds3d_t Stg::StgWorld::extent [protected] |
Referenced by Extend(), and GetExtent().
bool Stg::StgWorld::graphics [protected] |
Referenced by Stg::StgModel::Map(), and Stg::StgWorldGui::StgWorldGui().
stg_usec_t Stg::StgWorld::interval_real [protected] |
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().
GHashTable* Stg::StgWorld::superregions [protected] |
Referenced by Stg::StgWorldGui::DrawFloor(), and Stg::StgWorldGui::DrawTree().
Worldfile* Stg::StgWorld::wf [protected] |
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
1.5.5
