![]() |
VR-Forces 4.0.4 Class Documentation
|
Instances of DtRailMovementControllerPSR are used to hold the shared/checkpointable data for a rail movement system. More...

Public Member Functions | |
| DtRailMovementControllerPSR (DtVrfObject *vrfObject, const DtString &rwName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0) | |
| constructor | |
| DtRailMovementControllerPSR (const DtRailMovementControllerPSR &orig, const DtString &rwName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0) | |
| copy constructor | |
| virtual | ~DtRailMovementControllerPSR () |
| destructor | |
| DtRailMovementControllerPSR & | operator= (const DtRailMovementControllerPSR &orig) |
| assignment operator | |
| virtual DtVrfProcessStateRepository * | clone (const DtString &rwName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0) const |
| returns a newly created copy of this object | |
| virtual DtString | type () const |
| Returns the string type of the repository, as defined in procSRTypes.h. | |
| virtual void | setCurrentMovementState (DtRailMovementState state) |
| virtual DtRailMovementState | currentMovementState () |
| void | setConvoyUseCatchUpSpeed (const bool useCatchUpSpeed) |
| const bool | convoyUseCatchUpSpeed () const |
| virtual void | setUseHighFidelityGroundClamping (bool yesOrNo) |
| When clamping the entity to the ground, using high fidelity ground clamping will cause the entity to use all four support points when determining the plane on which the entity is positioned. | |
| virtual bool | useHighFidelityGroundClamping () const |
| When clamping the entity to the ground, using high fidelity ground clamping will cause the entity to use all four support points when determining the plane on which the entity is positioned. | |
| virtual void | setSegmentIndex () |
| virtual const int | segmentIndex () const |
| virtual void | setCurrentLanePosition (const int lane) |
| This is the lane we are currently traveling in. | |
| virtual const int | currentLanePosition () const |
| This is the lane we are currently traveling in. | |
| virtual void | setPassingLanePosition (const int lane) |
| This is the lane to pass into. | |
| virtual const int | passingLanePosition () const |
| This is the lane to pass into. | |
| virtual void | setTurning (bool turn) |
| virtual bool | turning () const |
| virtual void | setAllowPassing (bool canPass) |
| virtual bool | allowPassing () const |
| virtual void | setPassing (bool pass) |
| virtual bool | passing () const |
| virtual void | setAvoidingCollision (bool avoid) |
| virtual bool | avoidingCollisiong () const |
| virtual void | setNeedSwitchLanes (bool switchLane) |
| virtual bool | needSwitchLanes () const |
| virtual void | setConvoyTargetSpecified (bool following) |
| virtual bool | convoyTargetSpecified () const |
| virtual void | setConvoyFollowTargetName (const DtString &name) |
| virtual const DtString & | convoyFollowTargetName () const |
| virtual void | setConvoyFollowDistance (const double dist) |
| virtual const double | convoyFollowDistance () const |
| virtual const double | maxFollowThreshold () const |
| virtual void | setMaxFollowThreshold (const double threshold) |
Static Public Member Functions | |
| static DtVrfProcessStateRepository * | creator (const DtString &rwName, DtVrfObject *vrfObject, DtReaderWriterRegistry *parentRegistry) |
| Returns a newly created instance of this class. | |
Protected Attributes | |
| DtRwInt | myCurrentMovementState |
| DtRwBoolean | myUseHighFidelityGroundClamping |
| Used by the rail updater when determining the orientation of the entity on the terrain. | |
| DtRwInt | mySegmentIndex |
| DtRwInt | myCurrentLanePosition |
| DtRwInt | myPassingLanePosition |
| DtRwBoolean | myTurning |
| DtRwBoolean | myAllowPassing |
| DtRwBoolean | myPassing |
| DtRwBoolean | myAvoidingCollision |
| DtRwBoolean | myNeedToSwitchLanes |
| DtRwBoolean | myConvoyTargetSpecified |
| DtRwString | myConvoyFollowTargetName |
| DtRwReal | myConvoyFollowDistance |
| DtRwBoolean | myConvoyUseCatchUpSpeed |
| DtRwReal | myMaxFollowThreshold |
Instances of DtRailMovementControllerPSR are used to hold the shared/checkpointable data for a rail movement system.
| DtRailMovementControllerPSR::DtRailMovementControllerPSR | ( | DtVrfObject * | vrfObject, |
| const DtString & | rwName = DtString::nullString(), |
||
| DtReaderWriterRegistry * | parentRegistry = 0 |
||
| ) |
constructor
| DtRailMovementControllerPSR::DtRailMovementControllerPSR | ( | const DtRailMovementControllerPSR & | orig, |
| const DtString & | rwName = DtString::nullString(), |
||
| DtReaderWriterRegistry * | parentRegistry = 0 |
||
| ) |
copy constructor
| virtual DtRailMovementControllerPSR::~DtRailMovementControllerPSR | ( | ) | [virtual] |
destructor
| DtRailMovementControllerPSR& DtRailMovementControllerPSR::operator= | ( | const DtRailMovementControllerPSR & | orig | ) |
assignment operator
| virtual DtVrfProcessStateRepository* DtRailMovementControllerPSR::clone | ( | const DtString & | rwName = DtString::nullString(), |
| DtReaderWriterRegistry * | parentRegistry = 0 |
||
| ) | const [virtual] |
returns a newly created copy of this object
Implements DtVrfProcessStateRepository.
| virtual DtString DtRailMovementControllerPSR::type | ( | ) | const [virtual] |
Returns the string type of the repository, as defined in procSRTypes.h.
(DtVrfAutomotiveProcessStateRepositoryType).
Implements DtVrfProcessStateRepository.
| virtual void DtRailMovementControllerPSR::setCurrentMovementState | ( | DtRailMovementState | state | ) | [virtual] |
| virtual DtRailMovementState DtRailMovementControllerPSR::currentMovementState | ( | ) | [virtual] |
| virtual void DtRailMovementControllerPSR::setUseHighFidelityGroundClamping | ( | bool | yesOrNo | ) | [virtual] |
When clamping the entity to the ground, using high fidelity ground clamping will cause the entity to use all four support points when determining the plane on which the entity is positioned.
When not using high fidelity, the entity will only use a single support point, the center, to determine the normal. Defaults to true, as that is the safer initial value.
| virtual bool DtRailMovementControllerPSR::useHighFidelityGroundClamping | ( | ) | const [virtual] |
When clamping the entity to the ground, using high fidelity ground clamping will cause the entity to use all four support points when determining the plane on which the entity is positioned.
When not using high fidelity, the entity will only use a single support point, the center, to determine the normal. Defaults to true, as that is the safer initial value.
| virtual void DtRailMovementControllerPSR::setSegmentIndex | ( | ) | [virtual] |
| virtual const int DtRailMovementControllerPSR::segmentIndex | ( | ) | const [virtual] |
| virtual void DtRailMovementControllerPSR::setCurrentLanePosition | ( | const int | lane | ) | [virtual] |
This is the lane we are currently traveling in.
| virtual const int DtRailMovementControllerPSR::currentLanePosition | ( | ) | const [virtual] |
This is the lane we are currently traveling in.
| virtual void DtRailMovementControllerPSR::setPassingLanePosition | ( | const int | lane | ) | [virtual] |
This is the lane to pass into.
Used when trying to pass someone..
| virtual const int DtRailMovementControllerPSR::passingLanePosition | ( | ) | const [virtual] |
This is the lane to pass into.
Used when trying to pass someone..
| virtual void DtRailMovementControllerPSR::setTurning | ( | bool | turn | ) | [virtual] |
| virtual bool DtRailMovementControllerPSR::turning | ( | ) | const [virtual] |
| virtual void DtRailMovementControllerPSR::setAllowPassing | ( | bool | canPass | ) | [virtual] |
| virtual bool DtRailMovementControllerPSR::allowPassing | ( | ) | const [virtual] |
| virtual void DtRailMovementControllerPSR::setPassing | ( | bool | pass | ) | [virtual] |
| virtual bool DtRailMovementControllerPSR::passing | ( | ) | const [virtual] |
| virtual void DtRailMovementControllerPSR::setAvoidingCollision | ( | bool | avoid | ) | [virtual] |
| virtual bool DtRailMovementControllerPSR::avoidingCollisiong | ( | ) | const [virtual] |
| virtual void DtRailMovementControllerPSR::setNeedSwitchLanes | ( | bool | switchLane | ) | [virtual] |
| virtual bool DtRailMovementControllerPSR::needSwitchLanes | ( | ) | const [virtual] |
| virtual void DtRailMovementControllerPSR::setConvoyTargetSpecified | ( | bool | following | ) | [virtual] |
| virtual bool DtRailMovementControllerPSR::convoyTargetSpecified | ( | ) | const [virtual] |
| virtual void DtRailMovementControllerPSR::setConvoyFollowTargetName | ( | const DtString & | name | ) | [virtual] |
| virtual const DtString& DtRailMovementControllerPSR::convoyFollowTargetName | ( | ) | const [virtual] |
| virtual void DtRailMovementControllerPSR::setConvoyFollowDistance | ( | const double | dist | ) | [virtual] |
| virtual const double DtRailMovementControllerPSR::convoyFollowDistance | ( | ) | const [virtual] |
| void DtRailMovementControllerPSR::setConvoyUseCatchUpSpeed | ( | const bool | useCatchUpSpeed | ) |
| const bool DtRailMovementControllerPSR::convoyUseCatchUpSpeed | ( | ) | const |
| virtual const double DtRailMovementControllerPSR::maxFollowThreshold | ( | ) | const [virtual] |
| virtual void DtRailMovementControllerPSR::setMaxFollowThreshold | ( | const double | threshold | ) | [virtual] |
| static DtVrfProcessStateRepository* DtRailMovementControllerPSR::creator | ( | const DtString & | rwName, |
| DtVrfObject * | vrfObject, | ||
| DtReaderWriterRegistry * | parentRegistry | ||
| ) | [static] |
Returns a newly created instance of this class.
Used by the rail updater when determining the orientation of the entity on the terrain.
DtRwInt DtRailMovementControllerPSR::mySegmentIndex [protected] |
Keep track of which segment we're on
Keep track of which lane we're in
Keep track of which lane we are moving into
DtRwBoolean DtRailMovementControllerPSR::myTurning [protected] |
Keep track of whether we were in a turn or not
Were we passing
DtRwBoolean DtRailMovementControllerPSR::myPassing [protected] |
Were we passing
Keep track of which segment we're on
Keep track if we need to switch lanes. This could be due to an upcoming turn, need to pass someone, user told us to switch
Quick check to know if we have target to follow
Keep track of who we're following if anybody. Used for convoys.
Keep track of how far behind convoy target we should follow.
Keep track of how far behind convoy target we should follow.
If entity is following another entity while moving along a rail route, this is the maximum delta they can have off of the follow distance before the rail controller will change the speed. This will help prevent jerky following if the target entity's speed is changing only briefly say at a curve if using acceleration.