Class used for storing a given vessel's data. More...
#include <MFDData.hpp>
Public Member Functions | |
MFDData (VESSEL *vessel) | |
Default constructor. | |
virtual | ~MFDData () |
Destructor. | |
virtual void | Update ()=0 |
Updates the vessel's state. | |
VESSEL * | GetVessel () const |
Returns associated vessel. | |
void | Invalidate () |
Sets this object as invalid. | |
bool | IsValid () const |
Checks if this object is still valid. |
Class used for storing a given vessel's data.
Stores a given vessel's data, that can be retrieved later, or updated on every MFD refresh, or every simulation step if needed.
MFDData::MFDData | ( | VESSEL * | vessel | ) |
Default constructor.
Constructs MFDData object for a given vessel.
Should only be called from within PluginMultipleVessels::AssociateMFDData().
vessel | passed by PluginMultipleVessels::AssociateMFDData() |
VESSEL * MFDData::GetVessel | ( | ) | const |
Returns associated vessel.
Returns the vessel associated with this object
void MFDData::Invalidate | ( | ) |
Sets this object as invalid.
Sets this object as invalid in the event of deleting the associated vessel.
Called automatically from PluginMultipleVessels::DeleteVessel().
bool MFDData::IsValid | ( | ) | const |
Checks if this object is still valid.
Checks if this object is still, because it may have been invalidated
upon vessel deletion. In such case, no operations should be performed on this object.
|
pure virtual |
Updates the vessel's state.
Updates the vessel's state as in for example - position, velocity, reference planet, etc.
Should be called from MyMFDMultipleVessels::Update() and on every simulation step from PluginMultipleVessels::UpdateClient() if necessary. This method should update all the required data of the vessel to be able operate properly without an opened MFD.
Implemented in MyMFDData.