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

This event can be used to notify modules and module functions that the center of gravity on the vessel has been changed. More...

Inheritance diagram for CoGHasChangedEvent:
Event_Base

Public Member Functions

 CoGHasChangedEvent (VECTOR3 previousCoG, VECTOR3 newCoG)
 
VECTOR3 GetPreviousCoG ()
 
VECTOR3 GetNewCoG ()
 
VECTOR3 GetCoGShift ()
 
- Public Member Functions inherited from Event_Base
 Event_Base (EVENTTYPE _type, unsigned int _delay=0)
 
EventHandlerGetCaller ()
 Returns the EventHandler at which this event originated.
 
virtual bool operator== (Event_Base *e)
 Compare whether two events are the same. More...
 
virtual bool operator!= (Event_Base *e)
 
virtual bool operator== (EVENTTYPE type)
 Allows to compare an event directly to an EVENTTYPE. More...
 
EVENTPIPE GetEventPipe ()
 

Private Attributes

VECTOR3 previousCoGpos
 Stores the CoG before the shift.
 
VECTOR3 newCoGpos
 Stores the CoG after the shift.
 
VECTOR3 relativeCoGshift
 Stores the difference between old and new CoG.
 

Additional Inherited Members

- Protected Member Functions inherited from Event_Base
virtual bool sendMe ()
 Used to determine whether the event should be sent by the event generator. More...
 
- Protected Attributes inherited from Event_Base
unsigned int delay
 How many calls of ProcessEvents() on the event generator the event should be delayed.
 
EventHandlercaller
 Stores the EventHandler at which the event originated.
 
EVENTTYPE eventtype
 The type of this event.
 
EVENTPIPE pipe
 The pipe the event travels in (unless it was relayed). This is set by the EventHandler itself.
 

Detailed Description

This event can be used to notify modules and module functions that the center of gravity on the vessel has been changed.

It is not to be confused with the ShiftCG Event, which serves to inform the vessel that the CoG SHOULD be changed. This event will be fired afterwards and contains information as to where the CoG shifted to.

See also
ShiftCGEvent
EventHandler.h

Constructor & Destructor Documentation

CoGHasChangedEvent::CoGHasChangedEvent ( VECTOR3  previousCoG,
VECTOR3  newCoG 
)
inline
Parameters
previousCoGThe previous position of the center of gravity relative to the vessels core module
newCoGThe new position of the center of gravity relative to the vessels core module

Member Function Documentation

VECTOR3 CoGHasChangedEvent::GetCoGShift ( )
inline
Returns
How much the CoG has moved
VECTOR3 CoGHasChangedEvent::GetNewCoG ( )
inline
Returns
The position of the current CoG
VECTOR3 CoGHasChangedEvent::GetPreviousCoG ( )
inline
Returns
The position of the CoG before the shift

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