Stg::WorldGui Class Reference

#include <stage.hh>

Inheritance diagram for Stg::WorldGui:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual std::string ClockString () const
void DrawBoundingBoxTree ()
std::string EnergyString (void)
Canvas * GetCanvas (void) const
virtual bool IsGUI () const
virtual void Load (const char *filename)
stg_usec_t RealTimeNow (void) const
virtual ModelRecentlySelectedModel () const
virtual void RemoveChild (Model *mod)
virtual bool Save (const char *filename)
void Show ()
virtual void Start ()
virtual void Stop ()
virtual void UnLoad ()
virtual bool Update ()
 WorldGui (int W, int H, const char *L=0)
 ~WorldGui ()

Protected Member Functions

void DrawOccupancy ()
void DrawVoxels ()
virtual void PopColor ()
virtual void PushColor (double r, double g, double b, double a)
virtual void PushColor (Color col)

Private Member Functions

virtual void AddModel (Model *mod)
bool closeWindowQuery ()
bool saveAsDialog ()
void SetTimeouts ()

Static Private Member Functions

static void fasterCb (Fl_Widget *w, WorldGui *wg)
static void fasttimeCb (Fl_Widget *w, WorldGui *wg)
static void fileExitCb (Fl_Widget *w, WorldGui *wg)
static void fileLoadCb (Fl_Widget *w, WorldGui *wg)
static void fileSaveAsCb (Fl_Widget *w, WorldGui *wg)
static void fileSaveCb (Fl_Widget *w, WorldGui *wg)
static void helpAboutCb (Fl_Widget *w, WorldGui *wg)
static void moreHelptCb (Fl_Widget *w, WorldGui *wg)
static void onceCb (Fl_Widget *w, WorldGui *wg)
static void optionsDlgCb (OptionsDlg *oDlg, WorldGui *wg)
static void pauseCb (Fl_Widget *w, WorldGui *wg)
static void realtimeCb (Fl_Widget *w, WorldGui *wg)
static void resetViewCb (Fl_Widget *w, WorldGui *wg)
static void slowerCb (Fl_Widget *w, WorldGui *wg)
static void viewOptionsCb (OptionsDlg *oDlg, WorldGui *wg)
static void windowCb (Fl_Widget *w, WorldGui *wg)

Private Attributes

Canvas * canvas
std::vector< Option * > drawOptions
FileManager * fileMan
 Used to load and save worldfiles.
std::vector< stg_usec_tinterval_log
Fl_Menu_Bar * mbar
OptionsDlg * oDlg
bool pause_time
stg_usec_t real_time_interval
stg_usec_t real_time_now
stg_usec_t real_time_recorded
float speedup
uint64_t timing_interval

Friends

class Canvas
class Model
class ModelCamera
class Option

Detailed Description

Extends World to implement an FLTK / OpenGL graphical user interface.

Definition at line 1344 of file stage.hh.


Constructor & Destructor Documentation

Stg::WorldGui::WorldGui ( int  W,
int  H,
const char *  L = 0 
)
Stg::WorldGui::~WorldGui (  ) 

Member Function Documentation

virtual void Stg::WorldGui::AddModel ( Model mod  )  [private, virtual]

Reimplemented from Stg::World.

virtual std::string Stg::WorldGui::ClockString (  )  const [virtual]

Get human readable string that describes the current simulation time.

Reimplemented from Stg::World.

bool Stg::WorldGui::closeWindowQuery (  )  [private]
void Stg::WorldGui::DrawBoundingBoxTree (  ) 
void Stg::WorldGui::DrawOccupancy (  )  [protected]
void Stg::WorldGui::DrawVoxels (  )  [protected]
std::string Stg::WorldGui::EnergyString ( void   ) 

Get human readable string that describes the current global energy state.

static void Stg::WorldGui::fasterCb ( Fl_Widget *  w,
WorldGui wg 
) [static, private]
static void Stg::WorldGui::fasttimeCb ( Fl_Widget *  w,
WorldGui wg 
) [static, private]
static void Stg::WorldGui::fileExitCb ( Fl_Widget *  w,
WorldGui wg 
) [static, private]
static void Stg::WorldGui::fileLoadCb ( Fl_Widget *  w,
WorldGui wg 
) [static, private]
static void Stg::WorldGui::fileSaveAsCb ( Fl_Widget *  w,
WorldGui wg 
) [static, private]
static void Stg::WorldGui::fileSaveCb ( Fl_Widget *  w,
WorldGui wg 
) [static, private]
Canvas* Stg::WorldGui::GetCanvas ( void   )  const [inline]

Definition at line 1435 of file stage.hh.

static void Stg::WorldGui::helpAboutCb ( Fl_Widget *  w,
WorldGui wg 
) [static, private]
virtual bool Stg::WorldGui::IsGUI (  )  const [inline, virtual]

Reimplemented from Stg::World.

Definition at line 1425 of file stage.hh.

virtual void Stg::WorldGui::Load ( const char *  filename  )  [virtual]

Reimplemented from Stg::World.

static void Stg::WorldGui::moreHelptCb ( Fl_Widget *  w,
WorldGui wg 
) [static, private]
static void Stg::WorldGui::onceCb ( Fl_Widget *  w,
WorldGui wg 
) [static, private]
static void Stg::WorldGui::optionsDlgCb ( OptionsDlg *  oDlg,
WorldGui wg 
) [static, private]
static void Stg::WorldGui::pauseCb ( Fl_Widget *  w,
WorldGui wg 
) [static, private]
virtual void Stg::WorldGui::PopColor (  )  [protected, virtual]

Reimplemented from Stg::World.

virtual void Stg::WorldGui::PushColor ( double  r,
double  g,
double  b,
double  a 
) [protected, virtual]

Reimplemented from Stg::World.

virtual void Stg::WorldGui::PushColor ( Color  col  )  [protected, virtual]

Reimplemented from Stg::World.

static void Stg::WorldGui::realtimeCb ( Fl_Widget *  w,
WorldGui wg 
) [static, private]
stg_usec_t Stg::WorldGui::RealTimeNow ( void   )  const
virtual Model* Stg::WorldGui::RecentlySelectedModel (  )  const [virtual]
virtual void Stg::WorldGui::RemoveChild ( Model mod  )  [virtual]

Reimplemented from Stg::Ancestor.

static void Stg::WorldGui::resetViewCb ( Fl_Widget *  w,
WorldGui wg 
) [static, private]
virtual bool Stg::WorldGui::Save ( const char *  filename  )  [virtual]

Reimplemented from Stg::World.

bool Stg::WorldGui::saveAsDialog (  )  [private]
void Stg::WorldGui::SetTimeouts (  )  [private]
void Stg::WorldGui::Show (  ) 

show the window - need to call this if you don't Load().

static void Stg::WorldGui::slowerCb ( Fl_Widget *  w,
WorldGui wg 
) [static, private]
virtual void Stg::WorldGui::Start (  )  [virtual]

Reimplemented from Stg::World.

virtual void Stg::WorldGui::Stop (  )  [virtual]

Reimplemented from Stg::World.

virtual void Stg::WorldGui::UnLoad (  )  [virtual]

Reimplemented from Stg::World.

virtual bool Stg::WorldGui::Update (  )  [virtual]

Reimplemented from Stg::World.

static void Stg::WorldGui::viewOptionsCb ( OptionsDlg *  oDlg,
WorldGui wg 
) [static, private]
static void Stg::WorldGui::windowCb ( Fl_Widget *  w,
WorldGui wg 
) [static, private]

Friends And Related Function Documentation

friend class Canvas [friend]

Reimplemented from Stg::World.

Definition at line 1346 of file stage.hh.

friend class Model [friend]

Reimplemented from Stg::World.

Definition at line 1348 of file stage.hh.

friend class ModelCamera [friend]

Definition at line 1347 of file stage.hh.

friend class Option [friend]

Definition at line 1349 of file stage.hh.


Member Data Documentation

Canvas* Stg::WorldGui::canvas [private]

Definition at line 1353 of file stage.hh.

std::vector<Option*> Stg::WorldGui::drawOptions [private]

Definition at line 1354 of file stage.hh.

FileManager* Stg::WorldGui::fileMan [private]

Used to load and save worldfiles.

Definition at line 1355 of file stage.hh.

std::vector<stg_usec_t> Stg::WorldGui::interval_log [private]

Definition at line 1356 of file stage.hh.

Fl_Menu_Bar* Stg::WorldGui::mbar [private]

Definition at line 1362 of file stage.hh.

OptionsDlg* Stg::WorldGui::oDlg [private]

Definition at line 1363 of file stage.hh.

bool Stg::WorldGui::pause_time [private]

Definition at line 1364 of file stage.hh.

The amount of real time elapsed between $timing_interval timesteps.

Definition at line 1368 of file stage.hh.

The current real time in microseconds.

Definition at line 1371 of file stage.hh.

The last recorded real time, sampled every $timing_interval updates.

Definition at line 1375 of file stage.hh.

float Stg::WorldGui::speedup [private]

Stage attempts to run this many times faster than real time. If -1, Stage runs as fast as possible.

Definition at line 1360 of file stage.hh.

uint64_t Stg::WorldGui::timing_interval [private]

Number of updates between measuring elapsed real time.

Definition at line 1378 of file stage.hh.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


stage
Author(s): Richard Vaughan, with contributions from many others. See web page for a full credits list.
autogenerated on Fri Jan 11 10:03:40 2013