![]() |
VR-Forces 4.1 Class Documentation
|
The "this" version is the own-ship object. More...

Public Member Functions | |
| DtScriptOwnshipObject (const DtString &name, DtVrfObject *const vrfobject) | |
| DtScriptOwnshipObject (const DtScriptOwnshipObject &orig) | |
| ~DtScriptOwnshipObject () | |
| void | setLocation3D (const DtLocation3D &newloc) |
| Script API functions. | |
| void | setHeading (const double heading) |
| Script API functions. | |
| virtual std::list< std::string > | getResourceNames (void) const |
| Script API functions. | |
| virtual double | getResourceAmounts (const std::string &resourceName, double *fullAmount) const |
| Returns the current amount as the return value for the supplied resource name. | |
| virtual void | depleteResource (const std::string &resourceName, double amount) |
| Deplete the resource by the current amount, not going below zero. | |
| virtual void | replenishResource (const std::string &resourceName, double amount) |
| Replenishes the resource amount, not going above full. | |
| virtual bool | addResource (const std::string &resourceType, const std::string &resourceName, double currentAmount, double fullAmount) |
| Adds a new resource given the type, name (including any systems it should be in) current amount and full amount. | |
| virtual void | removeResource (const std::string &resourceName) |
| Removes the resource from the supplied system. | |
| virtual bool | isUnderFire () const |
| True if under fire, as defined in the object state repository. | |
| virtual std::list < DtScriptVrfObject > | getObservedHostileContacts (void) |
| This function supports the script API. | |
| virtual std::list < DtScriptVrfObject > | getAllHostileContacts (void) |
| This function supports the script API. | |
| virtual std::list < DtScriptVrfObject > | getAllContacts (void) |
| This function supports the script API. | |
Public Member Functions inherited from DtScriptVrfObject | |
| DtScriptVrfObject (const DtString &name, DtVrfObject *const vrfObject) | |
| DtScriptVrfObject (const DtScriptVrfObject &orig) | |
| DtScriptVrfObject & | operator= (const DtScriptVrfObject &orig) |
| ~DtScriptVrfObject () | |
| bool | operator== (const DtScriptVrfObject &orig) |
| virtual double | getHeightAboveTerrain () const |
| Gets the height above terrain, which is just ownship altitude - terrain altitude. | |
| virtual bool | hasLosToObject (const DtScriptVrfObject &target, bool &dataAvailable) const |
| Check LOS to a target entity through terrain and objects, except for ownship object and target object. | |
| virtual bool | isPointInside (const DtLocation3D &point) const |
| Determine if the given point is inside the polygon described by the vertices (footprint) of this object. | |
| virtual bool | hasLosToLocation (DtLocation3D &targetLoc, bool &dataAvailable) const |
| Check LOS to a location through terrain and objects, except for ownship object. | |
| virtual std::string | getEntityType () const |
| Return the entity type. | |
| virtual bool | isAggregate () const |
| Returns whether the object is an aggregate, using the object state repository definition of isAggregate(). | |
| virtual std::string | getEchelonLevel () const |
| Returns the echelon level as a string. | |
| virtual std::string | getForceType () const |
| Returns entity force. | |
| virtual int | getForceEnumeration () const |
| Returns entity force enumeration (interger) | |
| virtual std::string | getDamageState () const |
| Returns the current damage state as: none slight moderate destroyed. | |
| virtual bool | isDestroyed () const |
| Returns whether or not this entity is destroyed. | |
| virtual bool | isEmbarked () const |
| Returns whether or not this item is embarked on any other item. | |
| virtual DtScriptVrfObject | getEmbarkedOn () const |
| virtual std::list < DtScriptVrfObject > | getEmbarkedObjects (void) const |
| virtual std::list < DtScriptVrfObject > | getSubordinates (void) const |
| Returns the object this object is embarked on. | |
| virtual std::list < DtScriptVrfObject > | getCapableSubordinates (void) const |
| virtual std::list< DtLocation3D > | getLocations3D (void) const |
| virtual std::string | getName () const |
| virtual double | getHeading () const |
| void | deleteObject () |
| Deletes object from simulation. | |
| bool | isDeleted () const |
| Returns true if the object has been deleted from the simulation. | |
| virtual bool | isValid () const |
| virtual bool | isLocal () const |
| Returns true if the object is local to the back-end the script is running on. | |
| virtual void | setSimManager (DtSimManager *simManager) |
| Script API functions above. | |
| virtual DtString | objectType () const |
| Should return the string name of this object. | |
| DtString | serialize () |
| Inherited from DtAsciiSerializable. Returns a string serialized version of this class. | |
| bool | deserialize (const DtString &data) |
| Inherited from DtAsciiSerializable. | |
| DtVrfObject * | vrfObject () const |
| For use by C++ side methods. | |
| virtual DtLocation3D | getLocation3D () const |
| Script API functions. | |
| virtual double | getSpeed () const |
| Returns the objects current speed in meters/second. | |
| virtual DtVector3D | getDirection3D () const |
| Vector info about entity. | |
| virtual DtVector3D | getVelocity3D () const |
| Velocity of entity, meters/sec. | |
Public Member Functions inherited from DtAsciiSerializable | |
| DtAsciiSerializable () | |
| The implementer of this interface should be sure to create a creator function to create an empty object that returns a pointer to this interface. | |
| DtAsciiSerializable (const DtAsciiSerializable &orig) | |
| virtual | ~DtAsciiSerializable () |
Additional Inherited Members | |
Static Public Member Functions inherited from DtScriptVrfObject | |
| static DtAsciiSerializable * | creator () |
| Inherited from DtAsciiSerializable. Returns a new object of this type with default values. | |
Protected Member Functions inherited from DtScriptVrfObject | |
| void | testValid () const |
| Makes sure the object is valid. If not, throws exception. | |
| void | addObjectAboutToBeRemovedCallback () |
| Adds the object about to be removed callback. | |
| void | removeObjectAboutToBeRemovedCallback () |
| Removes the object about to be removed callback. | |
| virtual void | processObjectAboutToBeRemoved (DtVrfObject *) |
Static Protected Member Functions inherited from DtScriptVrfObject | |
| static void | objectAboutToBeRemovedCallback (DtVrfObject *, void *usr) |
Protected Attributes inherited from DtScriptVrfObject | |
| DtString | myEntityName |
| DtVrfObject * | myObject |
| bool | myDeleted |
| DtSimManager * | mySimManager |
The "this" version is the own-ship object.
It is separated to allow special functions for the ownship that are not available for other objects.
| DtScriptOwnshipObject::DtScriptOwnshipObject | ( | const DtString & | name, |
| DtVrfObject *const | vrfobject | ||
| ) |
| DtScriptOwnshipObject::DtScriptOwnshipObject | ( | const DtScriptOwnshipObject & | orig | ) |
| DtScriptOwnshipObject::~DtScriptOwnshipObject | ( | ) |
| void DtScriptOwnshipObject::setLocation3D | ( | const DtLocation3D & | newloc | ) |
Script API functions.
////////////////////////////////////
| void DtScriptOwnshipObject::setHeading | ( | const double | heading | ) |
Script API functions.
////////////////////////////////////
|
virtual |
Script API functions.
////////////////////////////////////
|
virtual |
Returns the current amount as the return value for the supplied resource name.
Note that in the Lua interface, fullAmount is a pure_out_value, meaning that the parameter is not included as a function argument, but is provided as a second return value of the function. E.g. use: curAmount, fullAmount = getResourceAmounts(resourceName)
|
virtual |
Deplete the resource by the current amount, not going below zero.
|
virtual |
Replenishes the resource amount, not going above full.
|
virtual |
Adds a new resource given the type, name (including any systems it should be in) current amount and full amount.
If the resource type (see rsrcTypes.h) is not valid will not create resource. Return true if resource is created
|
virtual |
Removes the resource from the supplied system.
|
virtual |
True if under fire, as defined in the object state repository.
|
virtual |
This function supports the script API.
It gets the list of contacts for the entity and filters out all but known hostile objects that were detected by sensors (vs. just spot reports).
|
virtual |
This function supports the script API.
It gets the list of contacts for the entity and filters out all but known hostile objects. The Lua API function requires this list be returned in a table, so there is a wrapper function for it in the vrfLua module.
|
virtual |
This function supports the script API.
It gets the list of contacts and returns it. The Lua API function requires this list be returned in a table, so there is a wrapper function for it in the vrfLua module.