IMS2  Pre-Alpha
An Orbiter add-on to allow on-runtime construction of spacecraft from predefined modules
IMS_Location Class Referenceabstract

Abstract class that provides an interface for handling movables. More...

Inherited by IMS_ModuleFunction_Pressurised.

Public Member Functions

void AddMovable (IMS_Movable *movable)
 Adds a movable to this location.
 
void RemoveMovable (IMS_Movable *movable)
 removes a movable from this location
 
virtual IMS_ModuleGetModule ()=0
 returns the module this location is a part of
 
double GetMovableMass ()
 
void InvokeMovablePreStep ()
 invokes PostStep() on all movables currently in this location More...
 

Protected Attributes

vector< IMS_Movable * > movables
 contains all movables currently at this location
 

Detailed Description

Abstract class that provides an interface for handling movables.

Anything that contains movables should be a location. Movables, at the lowest level, move only between locations, without knowledge of any wider context. The implementation of the location must provide a method to return the module in which the location is located, though. Most commonly, certain modulefunctions will be locations.

Todo:
implement connection and pathfinding interface

Member Function Documentation

double IMS_Location::GetMovableMass ( )
Returns
The total mass of all movables currently at this location
void IMS_Location::InvokeMovablePreStep ( )

invokes PostStep() on all movables currently in this location

Note
This method must be called every frame by someone (preferably the implementing class), but never more than once!

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