VR-Forces 4.2 Class Documentation
List of all members | 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]

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)
- Public Member Functions inherited from DtVrfProcessStateRepository
 DtVrfProcessStateRepository (DtVrfObject *vrfObject, const DtString &rwName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0)
 DtVrfProcessStateRepository (const DtVrfProcessStateRepository &orig, const DtString &rwName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0)
const DtVrfProcessStateRepositoryoperator= (const DtVrfProcessStateRepository &orig)
virtual ~DtVrfProcessStateRepository ()
virtual bool init ()
 Used for virtual construction. This base method simply returns true.
virtual bool loadedFromMTL () const
virtual void getSelf (DtlObjPtr args, const DtFilename &searchPath, const DtVariableBindingsList &variableBindings)
- Public Member Functions inherited from DtReaderWriter
 DtReaderWriter ()
 default constructor
 DtReaderWriter (const DtString &name, DtReaderWriterRegistry *parentRegistry=NULL, bool readonly=false)
 real constructor Setting the readonly flag prevents object from writing itself to the stream.
 DtReaderWriter (const DtSymbolString &name, DtReaderWriterRegistry *parentRegistry=NULL, bool readonly=false)
 DtReaderWriter (const DtString &name, const DtReaderWriter &orig, DtReaderWriterRegistry *parentRegistry=NULL)
 copy constructor
 DtReaderWriter (const DtSymbolString &name, const DtReaderWriter &orig, DtReaderWriterRegistry *parentRegistry=NULL)
const DtReaderWriteroperator= (const DtReaderWriter &orig)
 assignment operator
bool operator== (const DtReaderWriter &) const
 Equivalence operator.
bool operator!= (const DtReaderWriter &rhs)
virtual ~DtReaderWriter ()
 destructor
virtual void putSelf (FILE *fp, int indentLevel=0, bool writeUnspecified=false, const DtFilename &path=DtFilename::nullFilename())
 Top level call to write itself to file.
virtual void getSelf (DtlObjPtr args, const DtFilename &searchPath=DtFilename::nullFilename(), const DtVariableBindingsList &variableBindings=nullVariableReference())
 Top level to read itself from an input stream.
virtual void writeSelf (FILE *fp, int indentLevel=0, bool writeUnspecified=false, const DtFilename &path=DtFilename::nullFilename())
 Called from putSelf, calls myRegistry.putSelf which in turn calls putSelf on each reader/writer in the registry.
virtual DtSymbolString name () const
 Accessor for name of this readable/writable object.
virtual void addAlias (const DtSymbolString &alias)
 Add an alias as an alternative name for this object.
virtual bool hasAlias (const DtSymbolString &alias)
virtual const aliasContaineraliases () const
virtual void setReadonly (bool flag)
 Set read-only flag.
virtual bool isReadonly () const
virtual bool variableIsBound () const
virtual void unbindVariable ()
 Sets the myVariableIsBound flag to false.
virtual void setName (const DtString &)
 Set the name of the object.
virtual const char * readerWriterType () const
 Used to supply a string type that this reader writer type is.
virtual DtString prettyPrint () const
 Routine to return a human readable form of the reader/writer variable.
virtual void bindVariables (DtVariableBindingsList variableBindings)
 Runs a variable binding pass on this reader writer and any of its children.
virtual std::list
< DtVariableNameType
unboundVariables () const
bool invalid () const
virtual bool hasChild (const DtReaderWriter *p) const
 Returns true if this variable has a child p in it's chain.
virtual void setValueSpecified (bool specified, bool recurse=false)
 The specified flags are used for optional values.
virtual bool valueSpecified () const
 The specified flags are used for optional values.
virtual bool isVariableReference () const
 Specifies whether or not this reader writer is really a variable that is specified elsewhere.
virtual void setIsVariableReference (bool value)
virtual void clearAllVariableReferenceFlags ()
 Clears out all variable reference flags from all readerwriter items in registry recursively.
virtual DtSymbolString variableName () const
 The variable name, if this object is a variable reference.
virtual void setVariableName (const DtSymbolString variableName)
 The variable name, if this object is a variable reference.
const DtReaderWriterRegistryregistry () const
 Collection of child DtReaderWriter nodes owned by this object.
DtReaderWriterRegistryregistry ()
 Collection of child DtReaderWriter nodes owned by this object.

Static Public Member Functions

static
DtVrfProcessStateRepository
creator (const DtString &rwName, DtVrfObject *vrfObject, DtReaderWriterRegistry *parentRegistry)
 Returns a newly created instance of this class.
- Static Public Member Functions inherited from DtVrfProcessStateRepository
static
DtVrfProcessStateRepositoryFactory
factory ()
 a DtVrfProcessStateRepositoryFactory is allocated by the DtSimCreator, and this pointer is set.
static void setFactory (DtVrfProcessStateRepositoryFactory *factory)
static void addVrfProcessStateRepositoryCreatorFcn (const DtString &type, DtVrfProcessStateRepositoryCreatorFcn fcn)
static
DtVrfProcessStateRepository
createRepository (const DtString &name, const DtString &type, DtVrfObject *vrfObject, DtReaderWriterRegistry *parentRegistry=0)
 Creates a new state repository object, using the factory.
- Static Public Member Functions inherited from DtReaderWriter
static void putIndent (FILE *fp, int indentLevel)
static const
DtVariableBindingsList
nullVariableReference ()
static void setPostGetSelfCallback (DtGetSelfCallbackFcn fcn, void *usrData)
static void setPrePutSelfCallback (DtPutSelfCallbackFcn fcn, void *usrData)
static const DtFilename & appPath ()
 Gets the current working directory.
static void setFactoryCreatorFunction (DtReaderWriterFactoryCreatorFcn fcn)
 Sets the function to create the DtReaderWriterFactory.
static void createReaderWriterFactory ()

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
- Protected Attributes inherited from DtVrfProcessStateRepository
DtVrfObjectmyVrfObject
bool myLoadedFromMTL
- Protected Attributes inherited from DtReaderWriter
const DtSymbolString myName
DtReaderWriterRegistry myRegistry
bool myValueSpecified
bool myReadOnlyFlag
bool myIsVariableReference
DtSymbolString myVariableName
bool myVariableIsBound
aliasContainer myAliases
 Container for the aliases which represent alternative names for the object.
bool myInvalid
 Set to true if there is a problem reading this item.

Additional Inherited Members

- Public Types inherited from DtReaderWriter
typedef std::vector
< DtSymbolString > 
aliasContainer
typedef std::vector
< DtSymbolString >::iterator 
aliasIter
typedef std::vector
< DtSymbolString >
::const_iterator 
aliasConstIter
typedef std::pair
< DtSymbolString, DtString
DtVariableNameType
typedef DtReaderWriterFactory *(* DtReaderWriterFactoryCreatorFcn )()
- Protected Member Functions inherited from DtVrfProcessStateRepository
 DtVrfProcessStateRepository ()
- Static Protected Attributes inherited from DtVrfProcessStateRepository
static
DtVrfProcessStateRepositoryFactory
theFactory

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

virtual DtRailMovementControllerPSR::~DtRailMovementControllerPSR ( )
virtual

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.

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.

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 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.

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 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.

Member Data Documentation

DtRwInt DtRailMovementControllerPSR::myCurrentMovementState
protected
DtRwBoolean DtRailMovementControllerPSR::myUseHighFidelityGroundClamping
protected

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

DtRwInt DtRailMovementControllerPSR::myCurrentLanePosition
protected

Keep track of which lane we're in

DtRwInt DtRailMovementControllerPSR::myPassingLanePosition
protected

Keep track of which lane we are moving into

DtRwBoolean DtRailMovementControllerPSR::myTurning
protected

Keep track of whether we were in a turn or not

DtRwBoolean DtRailMovementControllerPSR::myAllowPassing
protected

Were we passing

DtRwBoolean DtRailMovementControllerPSR::myPassing
protected

Were we passing

DtRwBoolean DtRailMovementControllerPSR::myAvoidingCollision
protected

Keep track of which segment we're on

DtRwBoolean DtRailMovementControllerPSR::myNeedToSwitchLanes
protected

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

DtRwBoolean DtRailMovementControllerPSR::myConvoyTargetSpecified
protected

Quick check to know if we have target to follow

DtRwString DtRailMovementControllerPSR::myConvoyFollowTargetName
protected

Keep track of who we're following if anybody. Used for convoys.

DtRwReal DtRailMovementControllerPSR::myConvoyFollowDistance
protected

Keep track of how far behind convoy target we should follow.

DtRwBoolean DtRailMovementControllerPSR::myConvoyUseCatchUpSpeed
protected

Keep track of how far behind convoy target we should follow.

DtRwReal DtRailMovementControllerPSR::myMaxFollowThreshold
protected

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 Sun Nov 24 19:49:21 EST 2013 from SVN revision 133924
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)