![]() |
VR-Forces 4.0.4 Class Documentation
|
This repository holds all information that is common to all the forms of local rotary wing entities within the system. More...

Public Member Functions | |
| DtRotaryWingEntityStateRepository (DtVrfObject *vrfObject, const DtObjectType &objectType, DtVrfObjectParameters *parameters, const DtString &rwName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0) | |
| Constructor with parameters to set up read/writability correctly. | |
| DtRotaryWingEntityStateRepository (const DtRotaryWingEntityStateRepository &orig, const DtString &rwName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0) | |
| copy constructor | |
| const DtRotaryWingEntityStateRepository & | operator= (const DtRotaryWingEntityStateRepository &orig) |
| assignment operator | |
| virtual | ~DtRotaryWingEntityStateRepository () |
| destructor | |
| virtual DtSimObjectStateRepository * | clone (const DtString &rwName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0) const |
| Clone. | |
| virtual bool | init () |
| Our 'virtual' constructor. Calls all the create<>() methods. | |
| virtual DtString | type () const |
| Returns the string type of the repository, as defined in vrfSRTypes.h. | |
| virtual const int | vrfMovingObjectStateRepositorySubType () const |
| Returns DtVrfMovingObjectStateRepositorySubTypeRotaryWing. | |
| virtual const int | rotaryWingEntityStateRepositorySubType () const |
| Returns DtRotaryWingEntityStateRepositorySubTypeBase. | |
| virtual bool | createParameters () |
| virtual void | initializeFromParameters () |
| virtual const DtRotaryWingEntityParameters * | rotaryWingEntityParameters () const |
| virtual void | getSelf (DtlObjPtr args, const DtFilename &searchPath, const DtVariableBindingsList &variableBindings) |
| getSelf() sets the desired position to the current position upon reading the state. | |
| virtual void | setJoystickControl (const bool val) |
| Get/set joystick control. | |
| virtual bool | joystickControl () const |
| virtual void | land (const DtVector &location, const DtReal heading) |
| Land (ground clamp) the rotary wing entity. | |
| virtual void | place (const DtVector &location, const DtReal heading, bool clampToGroundFlag=true, bool *dataAvailable=0, bool requireAllData=false) |
| "Places" the entity at the specified location and heading. | |
| virtual void | placeAtAltitude (const DtVector &desiredLocalPosition, const DtReal newHeading, bool *dataAvailable=0) |
| Finds the closest terrain intersection to the desiredLocalPosition. | |
| virtual const DtReal | terrainHeightBuffer () const |
| Adds a buffer to the entity's height since RWs support points aren't necessarily even. | |
| virtual void | setTerrainHeightBuffer (const DtReal buff) |
| virtual const DtGroundInteractionPt * | noseSupport () const |
| These are used to alias the base class otherSupport member - to help remind modelers that the 3rd support point for an air vehicle is supposed to represent the nose wheel. | |
| virtual DtGroundInteractionPt * | noseSupport () |
| virtual void | setNoseSupport (const DtVector &noseSupport) |
| virtual void | clampToGround (const DtVector &location, const DtReal heading, bool *dataAvailable=0, bool requireAllData=false) |
| Place entity on ground at location and heading. | |
| virtual void | restoreEntity () |
| Override to set default altitude when restored. | |
| virtual DtReal | altitude () const |
| Altitude above terrain. | |
| virtual void | setAltitude (const DtReal val) |
| Altitude above terrain. | |
| virtual bool | isCheckingTerrainDistance () const |
| Get/set pilot-related parameters. | |
| virtual void | setIsCheckingTerrainDistance (const bool val) |
| Get/set pilot-related parameters. | |
| virtual DtReal | maxAltitude () const |
| Get/set pilot-related parameters. | |
| virtual void | setMaxAltitude (const DtReal val) |
| Get/set pilot-related parameters. | |
| virtual const DtVector & | desiredInertialPos () const |
| Guidance parameters. | |
| virtual void | setDesiredInertialPos (const DtVector &pos) |
| Guidance parameters. | |
| virtual const DtVector & | desiredInertialVel () const |
| Guidance parameters. | |
| virtual void | setDesiredInertialVel (const DtVector &vel) |
| Guidance parameters. | |
| virtual const DtVector & | desiredInertialAcc () const |
| Guidance parameters. | |
| virtual void | setDesiredInertialAcc (const DtVector &acc) |
| Guidance parameters. | |
| virtual DtReal | desiredInertialHead () const |
| Guidance parameters. | |
| virtual void | setDesiredInertialHead (DtReal head) |
| Guidance parameters. | |
| virtual DtReal | positionSelector () const |
| Guidance parameters. | |
| virtual void | setPositionSelector (DtReal val) |
| Guidance parameters. | |
| virtual DtReal | velocitySelector () const |
| Guidance parameters. | |
| virtual void | setVelocitySelector (DtReal val) |
| Guidance parameters. | |
| virtual DtReal | accelerationSelector () const |
| Guidance parameters. | |
| virtual void | setAccelerationSelector (DtReal val) |
| Guidance parameters. | |
| virtual DtReal | headingSelector () const |
| Guidance parameters. | |
| virtual void | setHeadingSelector (DtReal val) |
| Guidance parameters. | |
| virtual DtReal | aggressiveness () const |
| Guidance parameters. | |
| virtual void | setAggressiveness (DtReal val) |
| Guidance parameters. | |
| virtual bool | landed () const |
| Access/Mutator for myLanded. | |
| virtual void | setLanded (bool value) |
| Access/Mutator for myLanded. | |
| virtual double | maxClimbRate () const |
| virtual double | maxYawRate () const |
| virtual double | maxPitchRate () const |
| virtual double | maxRollRate () const |
| virtual double | maxYawAcceleration () const |
| virtual double | maxPitchAcceleration () const |
| virtual double | maxRollAcceleration () const |
| virtual double | zeroCollectiveLiftAcceleration () const |
| virtual double | fullCollectiveLiftAcceleration () const |
Static Public Member Functions | |
| static DtVrfObjectStateRepository * | creator (const DtString &name, DtVrfObject *vrfObject, const DtObjectType &objectType, DtVrfObjectParameters *parameters, DtReaderWriterRegistry *parentRegistry) |
| static DtRotaryWingEntityStateRepository * | isRotaryWingEntityStateRepository (DtSimObjectStateRepository *repository) |
| Returns a the pointer the repository, if the repository passed in is of type DtRotaryWingEntityStateRepository, 0 if not. | |
| static const DtRotaryWingEntityStateRepository * | isRotaryWingEntityStateRepository (const DtSimObjectStateRepository *repository) |
Protected Attributes | |
| DtVector | myDesiredInertialPos |
| DtVector | myDesiredInertialVel |
| DtVector | myDesiredInertialAcc |
| DtReal | myDesiredInertialHead |
| DtReal | myPositionSelector |
| DtReal | myVelocitySelector |
| DtReal | myAccelerationSelector |
| DtReal | myHeadingSelector |
| DtReal | myAggressiveness |
| bool | myJoystickControl |
| Joystick control. | |
| DtReal | myAltitude |
| bool | myIsCheckingTerrainDistance |
| DtReal | myMaxAltitude |
| Initialization. | |
| DtRwBoolean | myLanded |
| Indicates whether or not this entity is on the ground. | |
| DtReal | myTerrainHeightBuffer |
| We need to add this to the altitude of the entity so that it isn't sitting half in the ground when crashed into the ground. | |
Private Member Functions | |
| DtRotaryWingEntityStateRepository () | |
| default constructor cannot be used | |
This repository holds all information that is common to all the forms of local rotary wing entities within the system.
It contains a pointer to the rotary wing entity parameters, and provides accessors and mutators for all parameter values.
| DtRotaryWingEntityStateRepository::DtRotaryWingEntityStateRepository | ( | DtVrfObject * | vrfObject, |
| const DtObjectType & | objectType, | ||
| DtVrfObjectParameters * | parameters, | ||
| const DtString & | rwName = DtString::nullString(), |
||
| DtReaderWriterRegistry * | parentRegistry = 0 |
||
| ) |
Constructor with parameters to set up read/writability correctly.
| DtRotaryWingEntityStateRepository::DtRotaryWingEntityStateRepository | ( | const DtRotaryWingEntityStateRepository & | orig, |
| const DtString & | rwName = DtString::nullString(), |
||
| DtReaderWriterRegistry * | parentRegistry = 0 |
||
| ) |
copy constructor
| virtual DtRotaryWingEntityStateRepository::~DtRotaryWingEntityStateRepository | ( | ) | [virtual] |
destructor
default constructor cannot be used
| const DtRotaryWingEntityStateRepository& DtRotaryWingEntityStateRepository::operator= | ( | const DtRotaryWingEntityStateRepository & | orig | ) |
assignment operator
| virtual DtSimObjectStateRepository* DtRotaryWingEntityStateRepository::clone | ( | const DtString & | rwName = DtString::nullString(), |
| DtReaderWriterRegistry * | parentRegistry = 0 |
||
| ) | const [virtual] |
Clone.
Reimplemented from DtVrfMovingObjectStateRepository.
| virtual bool DtRotaryWingEntityStateRepository::init | ( | ) | [virtual] |
Our 'virtual' constructor. Calls all the create<>() methods.
Reimplemented from DtVrfObjectStateRepository.
| virtual DtString DtRotaryWingEntityStateRepository::type | ( | ) | const [virtual] |
Returns the string type of the repository, as defined in vrfSRTypes.h.
Reimplemented from DtVrfMovingObjectStateRepository.
| virtual const int DtRotaryWingEntityStateRepository::vrfMovingObjectStateRepositorySubType | ( | ) | const [virtual] |
Returns DtVrfMovingObjectStateRepositorySubTypeRotaryWing.
Reimplemented from DtVrfMovingObjectStateRepository.
| virtual const int DtRotaryWingEntityStateRepository::rotaryWingEntityStateRepositorySubType | ( | ) | const [virtual] |
Returns DtRotaryWingEntityStateRepositorySubTypeBase.
| static DtVrfObjectStateRepository* DtRotaryWingEntityStateRepository::creator | ( | const DtString & | name, |
| DtVrfObject * | vrfObject, | ||
| const DtObjectType & | objectType, | ||
| DtVrfObjectParameters * | parameters, | ||
| DtReaderWriterRegistry * | parentRegistry | ||
| ) | [static] |
Reimplemented from DtVrfMovingObjectStateRepository.
| static DtRotaryWingEntityStateRepository* DtRotaryWingEntityStateRepository::isRotaryWingEntityStateRepository | ( | DtSimObjectStateRepository * | repository | ) | [static] |
Returns a the pointer the repository, if the repository passed in is of type DtRotaryWingEntityStateRepository, 0 if not.
| static const DtRotaryWingEntityStateRepository* DtRotaryWingEntityStateRepository::isRotaryWingEntityStateRepository | ( | const DtSimObjectStateRepository * | repository | ) | [static] |
| virtual bool DtRotaryWingEntityStateRepository::createParameters | ( | ) | [virtual] |
Reimplemented from DtVrfMovingObjectStateRepository.
| virtual void DtRotaryWingEntityStateRepository::initializeFromParameters | ( | ) | [virtual] |
Reimplemented from DtVrfMovingObjectStateRepository.
| virtual const DtRotaryWingEntityParameters* DtRotaryWingEntityStateRepository::rotaryWingEntityParameters | ( | ) | const [virtual] |
| virtual DtReal DtRotaryWingEntityStateRepository::altitude | ( | ) | const [virtual] |
Altitude above terrain.
| virtual void DtRotaryWingEntityStateRepository::setAltitude | ( | const DtReal | val | ) | [virtual] |
Altitude above terrain.
| virtual bool DtRotaryWingEntityStateRepository::isCheckingTerrainDistance | ( | ) | const [virtual] |
Get/set pilot-related parameters.
| virtual void DtRotaryWingEntityStateRepository::setIsCheckingTerrainDistance | ( | const bool | val | ) | [virtual] |
Get/set pilot-related parameters.
| virtual DtReal DtRotaryWingEntityStateRepository::maxAltitude | ( | ) | const [virtual] |
Get/set pilot-related parameters.
| virtual void DtRotaryWingEntityStateRepository::setMaxAltitude | ( | const DtReal | val | ) | [virtual] |
Get/set pilot-related parameters.
| virtual const DtVector& DtRotaryWingEntityStateRepository::desiredInertialPos | ( | ) | const [virtual] |
Guidance parameters.
| virtual void DtRotaryWingEntityStateRepository::setDesiredInertialPos | ( | const DtVector & | pos | ) | [virtual] |
Guidance parameters.
| virtual const DtVector& DtRotaryWingEntityStateRepository::desiredInertialVel | ( | ) | const [virtual] |
Guidance parameters.
| virtual void DtRotaryWingEntityStateRepository::setDesiredInertialVel | ( | const DtVector & | vel | ) | [virtual] |
Guidance parameters.
| virtual const DtVector& DtRotaryWingEntityStateRepository::desiredInertialAcc | ( | ) | const [virtual] |
Guidance parameters.
| virtual void DtRotaryWingEntityStateRepository::setDesiredInertialAcc | ( | const DtVector & | acc | ) | [virtual] |
Guidance parameters.
| virtual DtReal DtRotaryWingEntityStateRepository::desiredInertialHead | ( | ) | const [virtual] |
Guidance parameters.
| virtual void DtRotaryWingEntityStateRepository::setDesiredInertialHead | ( | DtReal | head | ) | [virtual] |
Guidance parameters.
| virtual DtReal DtRotaryWingEntityStateRepository::positionSelector | ( | ) | const [virtual] |
Guidance parameters.
| virtual void DtRotaryWingEntityStateRepository::setPositionSelector | ( | DtReal | val | ) | [virtual] |
Guidance parameters.
| virtual DtReal DtRotaryWingEntityStateRepository::velocitySelector | ( | ) | const [virtual] |
Guidance parameters.
| virtual void DtRotaryWingEntityStateRepository::setVelocitySelector | ( | DtReal | val | ) | [virtual] |
Guidance parameters.
| virtual DtReal DtRotaryWingEntityStateRepository::accelerationSelector | ( | ) | const [virtual] |
Guidance parameters.
| virtual void DtRotaryWingEntityStateRepository::setAccelerationSelector | ( | DtReal | val | ) | [virtual] |
Guidance parameters.
| virtual DtReal DtRotaryWingEntityStateRepository::headingSelector | ( | ) | const [virtual] |
Guidance parameters.
| virtual void DtRotaryWingEntityStateRepository::setHeadingSelector | ( | DtReal | val | ) | [virtual] |
Guidance parameters.
| virtual DtReal DtRotaryWingEntityStateRepository::aggressiveness | ( | ) | const [virtual] |
Guidance parameters.
| virtual void DtRotaryWingEntityStateRepository::setAggressiveness | ( | DtReal | val | ) | [virtual] |
Guidance parameters.
| virtual bool DtRotaryWingEntityStateRepository::landed | ( | ) | const [virtual] |
Access/Mutator for myLanded.
| virtual void DtRotaryWingEntityStateRepository::setLanded | ( | bool | value | ) | [virtual] |
Access/Mutator for myLanded.
| virtual void DtRotaryWingEntityStateRepository::getSelf | ( | DtlObjPtr | args, |
| const DtFilename & | searchPath, | ||
| const DtVariableBindingsList & | variableBindings | ||
| ) | [virtual] |
getSelf() sets the desired position to the current position upon reading the state.
Reimplemented from DtVrfObjectStateRepository.
| virtual void DtRotaryWingEntityStateRepository::setJoystickControl | ( | const bool | val | ) | [virtual] |
Get/set joystick control.
| virtual bool DtRotaryWingEntityStateRepository::joystickControl | ( | ) | const [virtual] |
| virtual void DtRotaryWingEntityStateRepository::land | ( | const DtVector & | location, |
| const DtReal | heading | ||
| ) | [virtual] |
Land (ground clamp) the rotary wing entity.
| virtual void DtRotaryWingEntityStateRepository::place | ( | const DtVector & | location, |
| const DtReal | heading, | ||
| bool | clampToGroundFlag = true, |
||
| bool * | dataAvailable = 0, |
||
| bool | requireAllData = false |
||
| ) | [virtual] |
"Places" the entity at the specified location and heading.
Ensures that the entity is not below the terrain height + starting height in altitude, where the "terrain" is determined by the type of entity.
The following behaviors depending on the specified cases: 1 - Non-submarine entity If clampToGround is false, the entity is placed at the specified location and heading by calling placeAtAltitude and dataAvailable is always set to true (as there are not terrain intersections performed which might block the call). If clampToGround is true, clamped to the nearest polygon by calling clampToGround. 2 - Submarine entity. The submarine entity is placed at the specified location and altitude as above. However, unlike non-submarines, submarines ignore all polygons with water surfaces when determining terrain height. Thus if the terrain contains a body of water with a surface of water polygons and terrain polygons underneath, the submarine will be placed relative to the polygons underneath (the sea floor) or clamp to the sea floor is clampToGround is true.
| Output | |
| dataAvailable | prevents the call from blocking due to terrain paging and will get a true value if the terrain intersections are successful. See DtVrfMovingObjectStateRepository::clampToGround for more information. |
| requireAllData | if dataAvailable is set and requireAllData is true, when the result of any terrain intersection causes dataAvailable to be set to false no changes will be made to the object. |
Reimplemented from DtVrfMovingObjectStateRepository.
| virtual void DtRotaryWingEntityStateRepository::placeAtAltitude | ( | const DtVector & | desiredLocalPosition, |
| const DtReal | newHeading, | ||
| bool * | dataAvailable = 0 |
||
| ) | [virtual] |
Finds the closest terrain intersection to the desiredLocalPosition.
If the entity is a subsurface entity, water polygons will be ignored so the entity can be placed under water. If the entity is a rotary wing entity, the altitude will be constrained between the ground and the maximum altitude of the entity. The new position, desired inertial position and orientation are then saved in the state repository.
| Input | |
| desiredLocalPosition | new position for the entity |
| newHeading | new heading for the entity |
| output | |
| dataAvailable | prevents the call from blocking due to terrain paging and will get a true value if the terrain intersections are successful. |
| virtual const DtReal DtRotaryWingEntityStateRepository::terrainHeightBuffer | ( | ) | const [virtual] |
Adds a buffer to the entity's height since RWs support points aren't necessarily even.
| virtual void DtRotaryWingEntityStateRepository::setTerrainHeightBuffer | ( | const DtReal | buff | ) | [virtual] |
| virtual const DtGroundInteractionPt* DtRotaryWingEntityStateRepository::noseSupport | ( | ) | const [virtual] |
These are used to alias the base class otherSupport member - to help remind modelers that the 3rd support point for an air vehicle is supposed to represent the nose wheel.
| virtual DtGroundInteractionPt* DtRotaryWingEntityStateRepository::noseSupport | ( | ) | [virtual] |
| virtual void DtRotaryWingEntityStateRepository::setNoseSupport | ( | const DtVector & | noseSupport | ) | [virtual] |
| virtual void DtRotaryWingEntityStateRepository::clampToGround | ( | const DtVector & | location, |
| const DtReal | heading, | ||
| bool * | dataAvailable = 0, |
||
| bool | requireAllData = false |
||
| ) | [virtual] |
Place entity on ground at location and heading.
Calls down to base class clampToGround(), and then calls setDesiredInertialPos().
| Output | |
| dataAvailable | prevents the call from blocking due to terrain paging and will get a true value if the terrain intersections are successful. See DtVrfMovingObjectStateRepository::clampToGround for more information. |
| requireAllData | if dataAvailable is set and requireAllData is true, when the result of any terrain intersection causes dataAvailable to be set to false no changes will be made to the object. |
Reimplemented from DtVrfMovingObjectStateRepository.
| virtual void DtRotaryWingEntityStateRepository::restoreEntity | ( | ) | [virtual] |
Override to set default altitude when restored.
Reimplemented from DtVrfObjectStateRepository.
| virtual double DtRotaryWingEntityStateRepository::maxClimbRate | ( | ) | const [virtual] |
| virtual double DtRotaryWingEntityStateRepository::maxYawRate | ( | ) | const [virtual] |
| virtual double DtRotaryWingEntityStateRepository::maxPitchRate | ( | ) | const [virtual] |
| virtual double DtRotaryWingEntityStateRepository::maxRollRate | ( | ) | const [virtual] |
| virtual double DtRotaryWingEntityStateRepository::maxYawAcceleration | ( | ) | const [virtual] |
| virtual double DtRotaryWingEntityStateRepository::maxPitchAcceleration | ( | ) | const [virtual] |
| virtual double DtRotaryWingEntityStateRepository::maxRollAcceleration | ( | ) | const [virtual] |
| virtual double DtRotaryWingEntityStateRepository::zeroCollectiveLiftAcceleration | ( | ) | const [virtual] |
| virtual double DtRotaryWingEntityStateRepository::fullCollectiveLiftAcceleration | ( | ) | const [virtual] |
DtReal DtRotaryWingEntityStateRepository::myDesiredInertialHead [protected] |
DtReal DtRotaryWingEntityStateRepository::myPositionSelector [protected] |
DtReal DtRotaryWingEntityStateRepository::myVelocitySelector [protected] |
DtReal DtRotaryWingEntityStateRepository::myAccelerationSelector [protected] |
DtReal DtRotaryWingEntityStateRepository::myHeadingSelector [protected] |
DtReal DtRotaryWingEntityStateRepository::myAggressiveness [protected] |
Joystick control.
DtReal DtRotaryWingEntityStateRepository::myAltitude [protected] |
DtReal DtRotaryWingEntityStateRepository::myMaxAltitude [protected] |
Initialization.
Indicates whether or not this entity is on the ground.
DtReal DtRotaryWingEntityStateRepository::myTerrainHeightBuffer [protected] |
We need to add this to the altitude of the entity so that it isn't sitting half in the ground when crashed into the ground.
The default is 1.0. This is a fix for bug