IMS2
Pre-Alpha
An Orbiter add-on to allow on-runtime construction of spacecraft from predefined modules
|
This event can be used to notify modules and module functions that the center of gravity on the vessel has been changed. More...
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) | |
EventHandler * | GetCaller () |
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. | |
EventHandler * | caller |
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. | |
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.
|
inline |
previousCoG | The previous position of the center of gravity relative to the vessels core module |
newCoG | The new position of the center of gravity relative to the vessels core module |
|
inline |
|
inline |
|
inline |