VR-Forces 4.0.4 Class Documentation
Public Member Functions | Static Public Member Functions | Protected Attributes
DtRailMovementControllerPSR Class Reference

Instances of DtRailMovementControllerPSR are used to hold the shared/checkpointable data for a rail movement system. More...

Inheritance diagram for DtRailMovementControllerPSR:
Inheritance graph
[legend]

List of all members.

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
DtRailMovementControllerPSRoperator= (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 DtStringconvoyFollowTargetName () 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

Detailed Description

Instances of DtRailMovementControllerPSR are used to hold the shared/checkpointable data for a rail movement system.


Constructor & Destructor Documentation

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

destructor


Member Function Documentation

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.

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.

Note:
This can lead to errors if the support points lie on different polygons, as the entity will appear to be clamped to the polygon on which the center lies.

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.

Note:
This can lead to errors if the support points lie on different polygons, as the entity will appear to be clamped to the polygon on which the center lies.
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 void DtRailMovementControllerPSR::setNeedSwitchLanes ( bool  switchLane) [virtual]
virtual void DtRailMovementControllerPSR::setConvoyTargetSpecified ( bool  following) [virtual]
virtual void DtRailMovementControllerPSR::setConvoyFollowTargetName ( const DtString name) [virtual]
virtual void DtRailMovementControllerPSR::setConvoyFollowDistance ( const double  dist) [virtual]
virtual const double DtRailMovementControllerPSR::convoyFollowDistance ( ) const [virtual]
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.


Member Data Documentation

Used by the rail updater when determining the orientation of the entity on the terrain.

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

Keep track of whether we were in a turn or not

Were we passing

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.


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

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)