VR-Forces 4.1.1 Class Documentation
List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes
DtScriptVrfObject Class Reference
Inheritance diagram for DtScriptVrfObject:
Inheritance graph
[legend]

Public Member Functions

 DtScriptVrfObject (const DtString &name, DtVrfObject *const vrfObject)
 DtScriptVrfObject (const DtScriptVrfObject &orig)
DtScriptVrfObjectoperator= (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< DtLocation3DgetLocations3D (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.
DtVrfObjectvrfObject () 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 ()

Static Public Member Functions

static DtAsciiSerializablecreator ()
 Inherited from DtAsciiSerializable. Returns a new object of this type with default values.

Protected Member Functions

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

static void objectAboutToBeRemovedCallback (DtVrfObject *, void *usr)

Protected Attributes

DtString myEntityName
DtVrfObjectmyObject
bool myDeleted
DtSimManagermySimManager

Constructor & Destructor Documentation

DtScriptVrfObject::DtScriptVrfObject ( const DtString name,
DtVrfObject *const  vrfObject 
)
DtScriptVrfObject::DtScriptVrfObject ( const DtScriptVrfObject orig)
DtScriptVrfObject::~DtScriptVrfObject ( )

Member Function Documentation

DtScriptVrfObject& DtScriptVrfObject::operator= ( const DtScriptVrfObject orig)
bool DtScriptVrfObject::operator== ( const DtScriptVrfObject orig)
virtual DtLocation3D DtScriptVrfObject::getLocation3D ( ) const
virtual

Script API functions.

////////////////////////////////////Returns the location of the entity.

virtual double DtScriptVrfObject::getSpeed ( ) const
virtual

Returns the objects current speed in meters/second.

virtual DtVector3D DtScriptVrfObject::getDirection3D ( ) const
virtual

Vector info about entity.

Note that these vectors can be converted to a "geocentric" DtVectorGeoc3D with DtVector3D::makeVectorGeoc3DAtLoc.

Returns a unit vector in the direction the entity is facing. In local, e.g. north-east-down, terms, not geocentric.

virtual DtVector3D DtScriptVrfObject::getVelocity3D ( ) const
virtual

Velocity of entity, meters/sec.

In local, e.g. north-east-down, terms, not geocentric.

virtual double DtScriptVrfObject::getHeightAboveTerrain ( ) const
virtual

Gets the height above terrain, which is just ownship altitude - terrain altitude.

virtual bool DtScriptVrfObject::hasLosToObject ( const DtScriptVrfObject target,
bool dataAvailable 
) const
virtual

Check LOS to a target entity through terrain and objects, except for ownship object and target object.

LOS is taken from the center of the observer (not a specific sensor location).

virtual bool DtScriptVrfObject::isPointInside ( const DtLocation3D point) const
virtual

Determine if the given point is inside the polygon described by the vertices (footprint) of this object.

This is intended for area control objects, but can be called on any object. Not guaranteed to be correct if the polygon is not convex. The algorithm effectively projects the points into a plane determined by the first two edges of the polygon. If the points are not all coplanar, there is some chance of error.

virtual bool DtScriptVrfObject::hasLosToLocation ( DtLocation3D targetLoc,
bool dataAvailable 
) const
virtual

Check LOS to a location through terrain and objects, except for ownship object.

LOS is taken from the center of the observer (not a specific sensor location).

virtual std::string DtScriptVrfObject::getEntityType ( ) const
virtual

Return the entity type.

virtual bool DtScriptVrfObject::isAggregate ( ) const
virtual

Returns whether the object is an aggregate, using the object state repository definition of isAggregate().

virtual std::string DtScriptVrfObject::getEchelonLevel ( ) const
virtual

Returns the echelon level as a string.

Uses the DIS aggregate categories, amended by MAK (see objTypeEnums.h)

virtual std::string DtScriptVrfObject::getForceType ( ) const
virtual

Returns entity force.

virtual int DtScriptVrfObject::getForceEnumeration ( ) const
virtual

Returns entity force enumeration (interger)

virtual std::string DtScriptVrfObject::getDamageState ( ) const
virtual

Returns the current damage state as: none slight moderate destroyed.

virtual bool DtScriptVrfObject::isDestroyed ( ) const
virtual

Returns whether or not this entity is destroyed.

virtual bool DtScriptVrfObject::isEmbarked ( ) const
virtual

Returns whether or not this item is embarked on any other item.

virtual DtScriptVrfObject DtScriptVrfObject::getEmbarkedOn ( ) const
virtual
virtual std::list<DtScriptVrfObject> DtScriptVrfObject::getEmbarkedObjects ( void  ) const
virtual
virtual std::list<DtScriptVrfObject> DtScriptVrfObject::getSubordinates ( void  ) const
virtual

Returns the object this object is embarked on.

Even if not embarked will return an object, however, it will not be valid

virtual std::list<DtScriptVrfObject> DtScriptVrfObject::getCapableSubordinates ( void  ) const
virtual
virtual std::list<DtLocation3D> DtScriptVrfObject::getLocations3D ( void  ) const
virtual
virtual std::string DtScriptVrfObject::getName ( ) const
virtual
virtual double DtScriptVrfObject::getHeading ( ) const
virtual
void DtScriptVrfObject::deleteObject ( )

Deletes object from simulation.

bool DtScriptVrfObject::isDeleted ( ) const

Returns true if the object has been deleted from the simulation.

virtual bool DtScriptVrfObject::isValid ( ) const
virtual
virtual bool DtScriptVrfObject::isLocal ( ) const
virtual

Returns true if the object is local to the back-end the script is running on.

virtual void DtScriptVrfObject::setSimManager ( DtSimManager simManager)
virtual

Script API functions above.

//////////////////////////////////// Used by the object serializer so that an instance of this object can call checkSelf()

virtual DtString DtScriptVrfObject::objectType ( ) const
virtual

Should return the string name of this object.

The object name should not be part of the serialization unless you want it to be, but you should take it into account when implementing both functions.

Implements DtAsciiSerializable.

DtString DtScriptVrfObject::serialize ( )
virtual

Inherited from DtAsciiSerializable. Returns a string serialized version of this class.

Implements DtAsciiSerializable.

bool DtScriptVrfObject::deserialize ( const DtString data)
virtual

Inherited from DtAsciiSerializable.

Returns true if it could fill its members with the data contained in the string. False otherwise.

Implements DtAsciiSerializable.

static DtAsciiSerializable* DtScriptVrfObject::creator ( )
static

Inherited from DtAsciiSerializable. Returns a new object of this type with default values.

DtVrfObject* DtScriptVrfObject::vrfObject ( ) const
inline

For use by C++ side methods.

void DtScriptVrfObject::testValid ( ) const
protected

Makes sure the object is valid. If not, throws exception.

void DtScriptVrfObject::addObjectAboutToBeRemovedCallback ( )
protected

Adds the object about to be removed callback.

void DtScriptVrfObject::removeObjectAboutToBeRemovedCallback ( )
protected

Removes the object about to be removed callback.

static void DtScriptVrfObject::objectAboutToBeRemovedCallback ( DtVrfObject ,
void *  usr 
)
staticprotected
virtual void DtScriptVrfObject::processObjectAboutToBeRemoved ( DtVrfObject )
protectedvirtual

Member Data Documentation

DtString DtScriptVrfObject::myEntityName
protected
DtVrfObject* DtScriptVrfObject::myObject
mutableprotected
bool DtScriptVrfObject::myDeleted
protected
DtSimManager* DtScriptVrfObject::mySimManager
protected

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

Document ID: Generated on Mon Apr 8 19:24:01 EDT 2013 from SVN revision 125877
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)