Stg::PowerPack Class Reference

#include <stage.hh>

List of all members.


Classes

class  DissipationVis

Public Member Functions

void Add (stg_joules_t j)
void ChargeStart ()
void ChargeStop ()
void Dissipate (stg_joules_t j, const Pose &p)
void Dissipate (stg_joules_t j)
stg_joules_t GetCapacity () const
bool GetCharging () const
stg_joules_t GetDissipated () const
stg_joules_t GetStored () const
 PowerPack (Model *mod)
void Print (const char *prefix) const
void Print (char *prefix) const
double ProportionRemaining () const
stg_joules_t RemainingCapacity () const
void SetCapacity (stg_joules_t j)
void SetStored (stg_joules_t j)
void Subtract (stg_joules_t j)
void TransferTo (PowerPack *dest, stg_joules_t amount)
void Visualize (Camera *cam) const
 ~PowerPack ()

Protected Attributes

stg_joules_t capacity
bool charging
stg_joules_t dissipated
Stg::PowerPack::DissipationVis event_vis
Modelmod
StripPlotVis output_vis
stg_joules_t stored
StripPlotVis stored_vis

Static Protected Attributes

static stg_joules_t global_capacity = 0.0
static stg_joules_t global_dissipated = 0.0
static stg_joules_t global_input = 0.0
static stg_joules_t global_stored = 0.0

Constructor & Destructor Documentation

PowerPack::PowerPack ( Model mod  ) 

PowerPack::~PowerPack (  ) 


Member Function Documentation

void PowerPack::Add ( stg_joules_t  j  ) 

Add to the energy store

void Stg::PowerPack::ChargeStart (  )  [inline]

void Stg::PowerPack::ChargeStop (  )  [inline]

void PowerPack::Dissipate ( stg_joules_t  j,
const Pose p 
)

Lose energy as work or heat, and record the event

void PowerPack::Dissipate ( stg_joules_t  j  ) 

Lose energy as work or heat

stg_joules_t PowerPack::GetCapacity (  )  const

bool Stg::PowerPack::GetCharging (  )  const [inline]

Returns true iff the device received energy at the last timestep

stg_joules_t PowerPack::GetDissipated (  )  const

stg_joules_t PowerPack::GetStored (  )  const

void Stg::PowerPack::Print ( const char *  prefix  )  const [inline]

void PowerPack::Print ( char *  prefix  )  const

Print human-readable status on stdout, prefixed with the argument string

double Stg::PowerPack::ProportionRemaining (  )  const [inline]

stg_joules_t PowerPack::RemainingCapacity (  )  const

Returns the energy capacity minus the current amount stored

void PowerPack::SetCapacity ( stg_joules_t  j  ) 

void PowerPack::SetStored ( stg_joules_t  j  ) 

void PowerPack::Subtract ( stg_joules_t  j  ) 

Subtract from the energy store

void PowerPack::TransferTo ( PowerPack dest,
stg_joules_t  amount 
)

Transfer some stored energy to another power pack

void PowerPack::Visualize ( Camera cam  )  const

OpenGL visualization of the powerpack state


Member Data Documentation

Energy capacity

bool Stg::PowerPack::charging [protected]

TRUE iff the device is receiving energy

Energy dissipated

stg_joules_t PowerPack::global_capacity = 0.0 [static, protected]

stg_joules_t PowerPack::global_dissipated = 0.0 [static, protected]

stg_joules_t PowerPack::global_input = 0.0 [static, protected]

stg_joules_t PowerPack::global_stored = 0.0 [static, protected]

Model* Stg::PowerPack::mod [protected]

The model that owns this object

Energy stored


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

Generated on Wed Jul 22 11:51:05 2009 for Stage by  doxygen 1.5.9