VR-Forces 4.6.1 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Protected Attributes
DtScriptVrfObject Class Reference
Inheritance diagram for DtScriptVrfObject:
Inheritance graph
[legend]

Public Member Functions

 DtScriptVrfObject (const DtUUID &name, DtVrfObject *const vrfObject)
 DtScriptVrfObject (const DtUUID &name, DtSimManager *simManager, 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 void changeAttachment (const std::string &parentUUID) const
 This allows the object to change its attachment without using the embarkation controller which is some circumstances is not desired.
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 independentlyTasked () const
 Returns true if item is independently tasked.
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 bool isPseudoAggregate () const
 Returns whether the object is an aggregate, using the object state repository definition of isAggregate() and the object is in a DtDisaggregated state.
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 (integer)
virtual std::string getDamageState () const
 Returns the current damage state as: none slight moderate destroyed.
virtual unsigned getLifeformPosture () const
 Returns the DIS enumerated value for the current lifeform posture.
virtual unsigned getAppearance () const
 Returns the current appearance bits of the entity.
virtual bool isDestroyed () const
 Returns whether or not this entity is destroyed.
virtual bool isInvisible () const
 Returns whether or not this entity is invisible.
virtual bool isEmbarked () const
 Returns whether or not this item is embarked on any other item.
virtual void attachToParent (DtScriptVrfObject &) const
 Given an object which is a parent, attach to it (immedate embark)
virtual bool isOnTopOf (DtScriptVrfObject &) const
 Will return true if this entity is near the top of the specified entity given the specified distance (in meters).
virtual bool isOnTopOfWithDistance (DtScriptVrfObject &, double) const
virtual DtScriptVrfObject getEmbarkedOn () const
 Parent this object is embarked on.
virtual std::list
< DtScriptVrfObject
getEmbarkedObjects (void) const
virtual DtVectorOffset3D getOffsetFromParent () const
virtual std::list
< DtScriptVrfObject
getSubordinates (void) const
 Returns a list of the immediate subordinates of this aggregate.
virtual std::list
< DtScriptVrfObject
getVrfSubordinates (bool isVrf) const
 Returns a list of the vrf simulated immediate subordinates of this aggregate.
virtual double recalculatePhysicalFootprintFromSubordinates (const std::list< DtScriptVrfObject > &) const
 Given the list of subordinates, return a DtRwReal that will contain the physical footprint (radius) of aggregate.
virtual std::list
< DtScriptVrfObject
getAllSubordinates (void) const
 Returns a list of all leaf (lowest level) nodes (subordinates) of this aggregate.
virtual std::list
< DtScriptVrfObject
getAllVrfSubordinates (bool isVrf) const
virtual std::list
< DtScriptVrfObject
getCapableSubordinates (void) const
virtual std::list
< DtScriptVrfObject
getCapableVrfSubordinates (bool isVrf) const
virtual bool isVrfSimulated () const
 Returns true if this object is simulated by VR-Forces.
virtual std::list< DtLocation3DgetLocations3D (void) const
virtual std::string getName () const
virtual std::string getLabel () const
virtual void setLabel (const std::string &)
virtual std::string getExtendedLabel (int) const
virtual void setExtendedLabel (int, const std::string &)
virtual std::string getGlobalId () const
virtual std::string getObjectId () const
virtual double getHeading () const
virtual double getPitch () const
virtual double getRoll () const
virtual double getDraft () const
void terrainSurfaceDebug ()
 For debugging the terrain surface(s) at the entity's location.
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 DtVectorOffset3D getBoundingVolume (DtVectorOffset3D &offset) const
 Returns the bounding volume and the bounding volume offset.
virtual std::string getNbcDamage (int &dmgPerSec, int &moppLvl) const
 Returns the damage type, damage per second, and the MOPP level required to protect against the NBC contaminated area.
virtual std::string getNbcAgent () const
 Returns the agent type of the NBC area.
virtual bool isBreached () const
 Returns true if this is an engineering object which has been breached.
virtual std::string getExtendedData (const std::string &key) const
 Returns the extended data with the given key, or an empty string if not found.
virtual DtLocation3D getClosestPointToLocation2D (const DtLocation3D &location, double &distance) const
 Finds the closest point on the object's geometry to the given location.
virtual DtLocation3D getIntersectionPointWithLine2D (const DtLocation3D &point1, const DtLocation3D &point2, bool &hasIntersection) const
 Calculates the point where the line defined by the two points intersects with the object.
virtual bool isActive () const
 Returns true if this is an environmental and it is active. All others will be considered active.
virtual std::string getDiGuyHandItem () const
 If object is lifeform with Diguy representation will return handitem if has one.
virtual bool isAnimationAvailable (const std::string &animationName) const
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.
void testValid () const
 Makes sure the object is valid. If not, throws exception.
virtual DtLocation3D getLocation3D () const
 Script API functions.
virtual double getSpeed () const
 Returns the objects current speed in meters/second.
virtual std::string getUUID () const
 Returns the UUID of this object.
virtual DtVector3D getDirection3D () const
 Vector info about entity.
virtual DtVector3D getVelocity3D () const
 Velocity of entity, meters/sec.
virtual void setNavigationEnabled (bool)
virtual bool getNavigationEnabled () const
virtual DtVectorOffset3D getPartParentPosition (int) const
virtual DtLocation3D getPartWorldPosition (int) const
virtual double getPartPitch (int) const
virtual double getPartPitchIncludingParent (int, bool includeParent=false) const
virtual double getPartHeading (int) const
virtual double getPartHeadingIncludingParent (int, bool includeParent=false) const
bool hasStateProperty (const std::string &propertyName)
 Checks to see if the property exists.
bool hasParameterProperty (const std::string &propertyName)
- 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 ()
virtual std::string objectTypeC () const
 Returns a std::string version of the objectType.
virtual void init (void *userData)
 This function is called right after the object is constructed during the deserialization process, but before deserialize() is called.

Static Public Member Functions

static DtAsciiSerializablecreator ()
 Inherited from DtAsciiSerializable. Returns a new object of this type with default values.
static DtScriptVrfObject nullObject ()
 Returns a null object.
- Static Public Member Functions inherited from DtObjectDebugger< DtScriptVrfObject >
static DtObjectCounter::CounterType ObjectCount ()
static const DtObjectContainer * ObjectContainer ()

Protected Attributes

DtRwUUID myUUID
DtSimManagermySimManager
DtVrfObjectDeletionHandle myObjectDeletionHandle

Additional Inherited Members

- Protected Member Functions inherited from DtObjectDebugger< DtAsciiSerializable >
 DtObjectDebugger ()
 DtObjectDebugger (const DtObjectDebugger &)
 ~DtObjectDebugger ()
- Protected Member Functions inherited from DtObjectDebugger< DtScriptVrfObject >
 DtObjectDebugger ()
 DtObjectDebugger (const DtObjectDebugger &)
 ~DtObjectDebugger ()

Constructor & Destructor Documentation

DtScriptVrfObject::DtScriptVrfObject ( const DtUUID name,
DtVrfObject *const  vrfObject 
)
DtScriptVrfObject::DtScriptVrfObject ( const DtUUID name,
DtSimManager simManager,
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 std::string DtScriptVrfObject::getUUID ( ) const
virtual

Returns the UUID of this object.

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 void DtScriptVrfObject::changeAttachment ( const std::string &  parentUUID) const
virtual

This allows the object to change its attachment without using the embarkation controller which is some circumstances is not desired.

Simple change attachment will not make any assumptions about placement of the object unlike embarkation which calculates where it thinks this object should be. If the parentName is null then the object will be detached if it is currenly attached.

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::independentlyTasked ( ) const
virtual

Returns true if item is independently tasked.

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 bool DtScriptVrfObject::isPseudoAggregate ( ) const
virtual

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

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 (integer)

virtual void DtScriptVrfObject::setNavigationEnabled ( bool  )
virtual

Accessor for navigation by gameware enabled/disabled

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

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

virtual unsigned DtScriptVrfObject::getLifeformPosture ( ) const
virtual

Returns the DIS enumerated value for the current lifeform posture.

virtual unsigned DtScriptVrfObject::getAppearance ( ) const
virtual

Returns the current appearance bits of the entity.

virtual bool DtScriptVrfObject::isDestroyed ( ) const
virtual

Returns whether or not this entity is destroyed.

virtual bool DtScriptVrfObject::isInvisible ( ) const
virtual

Returns whether or not this entity is invisible.

virtual bool DtScriptVrfObject::isEmbarked ( ) const
virtual

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

virtual void DtScriptVrfObject::attachToParent ( DtScriptVrfObject ) const
virtual

Given an object which is a parent, attach to it (immedate embark)

virtual bool DtScriptVrfObject::isOnTopOf ( DtScriptVrfObject ) const
virtual

Will return true if this entity is near the top of the specified entity given the specified distance (in meters).

Default distance is the entities lattice offset in Z + .5 meters

virtual bool DtScriptVrfObject::isOnTopOfWithDistance ( DtScriptVrfObject ,
double   
) const
virtual
virtual DtScriptVrfObject DtScriptVrfObject::getEmbarkedOn ( ) const
virtual

Parent this object is embarked on.

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

Returns a list of the immediate subordinates of this aggregate.

virtual std::list<DtScriptVrfObject> DtScriptVrfObject::getVrfSubordinates ( bool  isVrf) const
virtual

Returns a list of the vrf simulated immediate subordinates of this aggregate.

virtual double DtScriptVrfObject::recalculatePhysicalFootprintFromSubordinates ( const std::list< DtScriptVrfObject > &  ) const
virtual

Given the list of subordinates, return a DtRwReal that will contain the physical footprint (radius) of aggregate.

virtual DtVectorOffset3D DtScriptVrfObject::getPartParentPosition ( int  ) const
virtual

These routines will return part information as applied to this entity. Flags will indicate if the parent information is to be used as well

virtual DtLocation3D DtScriptVrfObject::getPartWorldPosition ( int  ) const
virtual
virtual double DtScriptVrfObject::getPartPitch ( int  ) const
virtual
virtual double DtScriptVrfObject::getPartPitchIncludingParent ( int  ,
bool  includeParent = false 
) const
virtual
virtual double DtScriptVrfObject::getPartHeading ( int  ) const
virtual
virtual double DtScriptVrfObject::getPartHeadingIncludingParent ( int  ,
bool  includeParent = false 
) const
virtual
virtual std::list<DtScriptVrfObject> DtScriptVrfObject::getAllSubordinates ( void  ) const
virtual

Returns a list of all leaf (lowest level) nodes (subordinates) of this aggregate.

Will recurse over all subordinate aggregates getting their subordinates until only items that have no children are part of this list

virtual std::list<DtScriptVrfObject> DtScriptVrfObject::getAllVrfSubordinates ( bool  isVrf) const
virtual
virtual std::list<DtScriptVrfObject> DtScriptVrfObject::getCapableSubordinates ( void  ) const
virtual
virtual std::list<DtScriptVrfObject> DtScriptVrfObject::getCapableVrfSubordinates ( bool  isVrf) const
virtual
virtual bool DtScriptVrfObject::isVrfSimulated ( ) const
virtual

Returns true if this object is simulated by VR-Forces.

virtual std::list<DtLocation3D> DtScriptVrfObject::getLocations3D ( void  ) const
virtual
virtual std::string DtScriptVrfObject::getName ( ) const
virtual
virtual std::string DtScriptVrfObject::getLabel ( ) const
virtual
virtual void DtScriptVrfObject::setLabel ( const std::string &  )
virtual
virtual std::string DtScriptVrfObject::getExtendedLabel ( int  ) const
virtual
virtual void DtScriptVrfObject::setExtendedLabel ( int  ,
const std::string &   
)
virtual
virtual std::string DtScriptVrfObject::getGlobalId ( ) const
virtual
virtual std::string DtScriptVrfObject::getObjectId ( ) const
virtual
virtual double DtScriptVrfObject::getHeading ( ) const
virtual
virtual double DtScriptVrfObject::getPitch ( ) const
virtual
virtual double DtScriptVrfObject::getRoll ( ) const
virtual
virtual double DtScriptVrfObject::getDraft ( ) const
virtual
void DtScriptVrfObject::terrainSurfaceDebug ( )

For debugging the terrain surface(s) at the entity's location.

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 DtVectorOffset3D DtScriptVrfObject::getBoundingVolume ( DtVectorOffset3D offset) const
virtual

Returns the bounding volume and the bounding volume offset.

virtual std::string DtScriptVrfObject::getNbcDamage ( int dmgPerSec,
int moppLvl 
) const
virtual

Returns the damage type, damage per second, and the MOPP level required to protect against the NBC contaminated area.

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

Returns the agent type of the NBC area.

virtual bool DtScriptVrfObject::isBreached ( ) const
virtual

Returns true if this is an engineering object which has been breached.

virtual std::string DtScriptVrfObject::getExtendedData ( const std::string &  key) const
virtual

Returns the extended data with the given key, or an empty string if not found.

virtual DtLocation3D DtScriptVrfObject::getClosestPointToLocation2D ( const DtLocation3D location,
double distance 
) const
virtual

Finds the closest point on the object's geometry to the given location.

Also returns the distance to that point.

virtual DtLocation3D DtScriptVrfObject::getIntersectionPointWithLine2D ( const DtLocation3D point1,
const DtLocation3D point2,
bool hasIntersection 
) const
virtual

Calculates the point where the line defined by the two points intersects with the object.

Sets hasIntersection to false if there is no intersection point.

virtual bool DtScriptVrfObject::isActive ( ) const
virtual

Returns true if this is an environmental and it is active. All others will be considered active.

bool DtScriptVrfObject::hasStateProperty ( const std::string &  propertyName)

Checks to see if the property exists.

It is OK to call the get... Lua API functions when the property doesn't exist; a warning is printed and a nil object is returned. Using this test is appropriate though when it is known ahead of time that the property might not exist for some entity.

bool DtScriptVrfObject::hasParameterProperty ( const std::string &  propertyName)
virtual std::string DtScriptVrfObject::getDiGuyHandItem ( ) const
virtual

If object is lifeform with Diguy representation will return handitem if has one.

virtual bool DtScriptVrfObject::isAnimationAvailable ( const std::string &  animationName) const
virtual
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.

Call testValid() to try and fill in object pointer (if does not exist) or throw an exception if it really doesn't

void DtScriptVrfObject::testValid ( ) const

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

static DtScriptVrfObject DtScriptVrfObject::nullObject ( )
inlinestatic

Returns a null object.

References DtUUID::nullUUID().

Member Data Documentation

DtRwUUID DtScriptVrfObject::myUUID
protected
DtSimManager* DtScriptVrfObject::mySimManager
protected
DtVrfObjectDeletionHandle DtScriptVrfObject::myObjectDeletionHandle
mutableprotected

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

Document ID: Generated on Wed Jul 25 16:57:45 EDT 2018 from SVN revision 190790
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)