VR-Forces 5.0.3 Developer's Guide
 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
DtFollowEntityTask Class Reference

DtFollowEntityTask represents a follow entity task for an entity to perform. It inherits read/writableness from SimTask, and includes the entity to follow, and the offset from the entity. This offset is expressed in body coordinates (x out the front, y to the right, z down). z is ignored for ground vehicles. Therefore, to have a ground vehicle follow another entity 20m behind and 5m to the right, the offset vector would be (-20., 5., 0.)

If the entity to follow does not exist, the following entity stops. If at some later point during the simulation, the entity-to-follow comes into existence, then the entity starts following it. If the entity being followed gets destroyed, the following entity stops and sends a taskComplete(), indicating that it is finished executing the task and is ready for a new task.

An entity executing a DtFollowEntityTask will not advance to another task unless one of the following things happens:

task-type: DtFollowEntityType

parameters: entity to follow - Echelon ID string (object name) of the entity to be followed.

offset vector - Following offset expressed in body coordinates, rela- tive to the entity to be followed. In body coordinates, the X-axis points out the front of the entity, the Y-axis points to the right, and Z- axis points down. Units are in meters. For example, if the entity was tasked to follow 25 m behind the entity, and 5 m to the right, then the offset vector would be <-25.0, 5.0, 0.0>.

Inheritance diagram for DtFollowEntityTask:
Inheritance graph
[legend]

Public Member Functions

 DtFollowEntityTask ()
 
 DtFollowEntityTask (const DtString &writeName, DtReaderWriterRegistry *parentRegistry=0)
 
 DtFollowEntityTask (const DtString &writeName, const DtFollowEntityTask &orig, DtReaderWriterRegistry *parentRegistry=0)
 
const DtFollowEntityTaskoperator= (const DtFollowEntityTask &orig)
 
virtual ~DtFollowEntityTask ()
 
virtual const
DtSimTaskMessageType
type () const
 
virtual DtSimTaskclone (const DtString &name, DtReaderWriterRegistry *parentRegistry=0) const
 
virtual DtString stringRep () const
 
virtual const DtUUIDentityToFollow () const
 
virtual void setEntityToFollow (const DtUUID &entity)
 
virtual const DtVectoroffsetVector () const
 
virtual void setOffsetVector (const DtVector &offsets)
 
virtual int netRepSize () const
 
virtual bool setFromNet (const char *contentBuffer, unsigned contentSize)
 
virtual bool setToNet ()
 
- Public Member Functions inherited from DtSimTask
virtual ~DtSimTask ()
 
virtual bool init ()
 
virtual bool isTypeRegistered (const DtSimTaskMessageType &taskName)
 
virtual void setSubtask (bool flag)
 
virtual bool subtask () const
 
virtual void setAllowTaskVisualizations (bool flag)
 
virtual bool allowTaskVisualizations () const
 
virtual void putData (std::string &fp, int indentLevel=0)
 
virtual DtlObjPtr getData (DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths, const DtVariableBindingsList &variableBindings)
 
virtual charnetRep ()
 
- Public Member Functions inherited from DtReaderWriter
 DtReaderWriter ()
 
 DtReaderWriter (const DtString &name, DtReaderWriterRegistry *parentRegistry=NULL, bool readonly=false)
 
 DtReaderWriter (const DtSymbolString &name, DtReaderWriterRegistry *parentRegistry=NULL, bool readonly=false)
 
 DtReaderWriter (const DtString &name, const DtReaderWriter &orig, DtReaderWriterRegistry *parentRegistry=NULL)
 
 DtReaderWriter (const DtSymbolString &name, const DtReaderWriter &orig, DtReaderWriterRegistry *parentRegistry=NULL)
 
 DtReaderWriter (const DtReaderWriter &, DtReaderWriterRegistry *parentRegistry=NULL)
 
const DtReaderWriteroperator= (const DtReaderWriter &orig)
 
bool operator== (const DtReaderWriter &) const
 
bool operator!= (const DtReaderWriter &rhs)
 
virtual ~DtReaderWriter ()
 
virtual void putSelf (std::string &fp, int indentLevel=0, bool writeUnspecified=false, const DtFilename &path=DtFilename::nullFilename())
 
virtual void postPutSelf ()
 
virtual void prePutSelf ()
 
virtual void getSelf (DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &variableBindings=nullVariableReference())
 
virtual void postGetSelf ()
 
virtual void preGetSelf ()
 
virtual void writeSelf (std::string &fp, int indentLevel=0, bool writeUnspecified=false, const DtFilename &path=DtFilename::nullFilename())
 
virtual DtSymbolString name () const
 
virtual void addAlias (const DtSymbolString &alias)
 
virtual void addAlias (const DtString &alias)
 
virtual bool hasAlias (const DtSymbolString &alias)
 
virtual const aliasContaineraliases () const
 
virtual void setReadonly (bool flag)
 
bool isReadonly () const
 
virtual void reset ()
 
virtual int alignment () const
 
virtual bool variableIsBound () const
 
virtual void unbindVariable ()
 
virtual void setName (const DtString &)
 
virtual const charreaderWriterType () const
 
virtual const charxmlType () const
 
virtual DtString prettyPrint () const
 
std::string debugText () const
 
virtual void bindVariables (DtVariableBindingsList variableBindings)
 
virtual std::list
< DtVariableNameType
unboundVariables () const
 
bool invalid () const
 
virtual bool hasChild (const DtReaderWriter *p) const
 
virtual bool hasVariableReference () const
 
virtual void bindLocalVariables (const DtVariableBindingsList &variableBindings)
 
virtual void recordUpdateTime () const
 
virtual bool wasUpdatedSince (DtTime t) const
 
virtual bool changedSinceLastChecked ()
 
virtual bool peekChangedSinceLastChecked () const
 
virtual void setValueSpecified (bool specified, bool recurse=false)
 
virtual bool valueSpecified () const
 
virtual bool isVariableReference () const
 
virtual void setIsVariableReference (bool value)
 
virtual void clearAllVariableReferenceFlags ()
 
virtual DtSymbolString variableName () const
 
virtual void setVariableName (const DtSymbolString variableName)
 
virtual const DtReaderWriterdefaultRWValue () const
 
virtual DtReaderWriterdefaultRWValue ()
 
virtual void setDefaultRWValue (DtReaderWriter *)
 
virtual bool checkAndSetDefaultRWValue (DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &variableBindings=nullVariableReference())
 
const DtReaderWriterRegistryregistry () const
 
DtReaderWriterRegistryregistry ()
 
virtual DtPropertyInterfaceproperty ()
 
virtual const DtPropertyInterfaceproperty () const
 
virtual DtString toXml () const
 
virtual DtRwVariableBindingsgenerateVariableBindings () const
 
virtual bool toXml (const DtFilename &) const
 
virtual bool fromXml (const DtString &)
 
virtual bool fromXmlFile (const DtFilename &)
 
virtual void putSelf (DtEnvironmentSP, DtEnvValueSP parent) const
 
virtual void putData (DtEnvironmentSP, DtEnvValueSP value) const
 
virtual void putVariableReference (DtEnvironmentSP, DtEnvValueSP value) const
 
virtual void getSelf (const DtEnvironmentSP, const DtEnvValueSP root, const SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &bindings=DtVariableBindingsList())
 
virtual void getData (const DtEnvironmentSP, const DtEnvValueSP, const SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &bindings=DtVariableBindingsList())
 
virtual void unrecognizedItem (const DtEnvironmentSP env, const DtEnvValueSP root, const SearchPaths &searchPaths, const DtVariableBindingsList &varBindings)
 
virtual void getVariableReference (DtEnvironmentSP, DtEnvValueSP value)
 

Static Public Member Functions

static DtSimTaskcreator ()
 
- Static Public Member Functions inherited from DtSimTask
static DtSimTaskcreateTask (DtlObjPtr mtlStream)
 
static DtSimTaskcreateTask (const DtSimTaskMessageType &taskType)
 
static void addTaskCreatorFcn (const DtSimTaskMessageType &taskName, DtSimTaskCreatorFcn fcn)
 
static void setFactory (DtSimTaskFactory *factory)
 
static DtSimTaskFactoryfactory ()
 
- Static Public Member Functions inherited from DtReaderWriter
static void putIndent (std::string &fp, int indentLevel)
 
static const
DtVariableBindingsList
nullVariableReference ()
 
static void setPostGetSelfCallback (DtGetSelfCallbackFcn fcn, void *usrData)
 
static void setPrePutSelfCallback (DtPutSelfCallbackFcn fcn, void *usrData)
 
static void setPutIndent (bool)
 
static bool putIndent ()
 
static const chartheXmlType ()
 
static const DtFilename & appPath ()
 
static void setFactoryCreatorFunction (DtReaderWriterFactoryCreatorFcn fcn)
 
static void createReaderWriterFactory ()
 
static void cleanupFactory ()
 
static DtReaderWriterFactoryfactory ()
 
static void setOutputStream (DtOutputStream *stream)
 
static DtOutputStream & outputStream ()
 
static DtReaderWritercreateFromXmlFile (const DtFilename &, bool createAsProperty=false)
 
static DtReaderWritercreateFromXml (const DtString &, bool createAsProperty=false)
 
static DtReaderWritercreateFromEnvironment (DtEnvironmentSP, bool createAsProperty=false)
 
static DtString getAttribute (DtEnvironmentSP env, const DtString &name, DtEnvValueSP root)
 

Protected Attributes

DtRwUUID myEntityToFollow
 
DtRwOffsetVector myOffsetVector
 
- Protected Attributes inherited from DtSimTask
DtRwBoolean mySubtask
 
DtRwBoolean myAllowTaskVisualizations
 
charmyNetRep
 
- Protected Attributes inherited from DtReaderWriter
const DtSymbolString myName
 
DtReaderWriterRegistry myRegistry
 
DtReaderWriterRegistrymyParentRegistry
 
bool myValueSpecified
 
bool myReadOnlyFlag
 
bool myIsVariableReference
 
DtSymbolString myVariableName
 
bool myVariableIsBound
 
DtReaderWritermyDefaultValue
 
aliasContainer myAliases
 
bool myInvalid
 
bool myChangedFlag
 

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::vector< DtFilename > SearchPaths
 
typedef std::pair
< DtSymbolString, DtString
DtVariableNameType
 
typedef DtReaderWriterFactory *(* DtReaderWriterFactoryCreatorFcn )()
 
- Protected Member Functions inherited from DtSimTask
 DtSimTask ()
 
 DtSimTask (const DtString &writeName, DtReaderWriterRegistry *parentRegistry=0)
 
 DtSimTask (const DtString &writeName, const DtSimTask &orig, DtReaderWriterRegistry *parentRegistry=0)
 
const DtSimTaskoperator= (const DtSimTask &orig)
 
virtual charcreateNetworkBuffer ()
 
- Protected Member Functions inherited from DtReaderWriter
virtual void bindToRwAsVariable (const DtReaderWriter *rw)
 
- Static Protected Attributes inherited from DtSimTask
static DtSimTaskFactorymyFactory
 
- Static Protected Attributes inherited from DtReaderWriter
static DtString theUnspecifiedValue
 
static DtGetSelfCallbackInfo thePostGetSelfCallback
 
static DtPutSelfCallbackInfo thePrePutSelfCallback
 
static const DtVariableBindingsList theEmptyVariableBindingsList
 
static bool theCreatorFcnSet
 
static DtReaderWriterFactorytheFactory
 
static
DtReaderWriterFactoryCreatorFcn 
theFactoryCreatorFcn
 
static bool thePutIndent
 
static DtOutputStream * theOutputStream
 

Constructor & Destructor Documentation

DtFollowEntityTask::DtFollowEntityTask ( )

default constructor

DtFollowEntityTask::DtFollowEntityTask ( const DtString writeName,
DtReaderWriterRegistry parentRegistry = 0 
)

constructor If you have a task 'put' itself, the writeName will preface the task.

DtFollowEntityTask::DtFollowEntityTask ( const DtString writeName,
const DtFollowEntityTask orig,
DtReaderWriterRegistry parentRegistry = 0 
)

Copy constructor; nothing to be copied. Here to thwart over-ambitious compilers that create one when it shouldn't.

virtual DtFollowEntityTask::~DtFollowEntityTask ( )
virtual

Member Function Documentation

const DtFollowEntityTask& DtFollowEntityTask::operator= ( const DtFollowEntityTask orig)

assignment operator

virtual const DtSimTaskMessageType& DtFollowEntityTask::type ( ) const
virtual

Returns DtFollowEntityType.

Implements DtSimTask.

virtual DtSimTask* DtFollowEntityTask::clone ( const DtString name,
DtReaderWriterRegistry parentRegistry = 0 
) const
virtual

Creates a copy of this follow entity task.

Implements DtSimTask.

virtual DtString DtFollowEntityTask::stringRep ( ) const
virtual

Get a readable string representation of this task.

Implements DtSimTask.

virtual const DtUUID& DtFollowEntityTask::entityToFollow ( ) const
virtual

Object name of the entity to follow.

virtual void DtFollowEntityTask::setEntityToFollow ( const DtUUID entity)
virtual
virtual const DtVector& DtFollowEntityTask::offsetVector ( ) const
virtual

Set/get the offset of the entity from the entity it is following.

virtual void DtFollowEntityTask::setOffsetVector ( const DtVector offsets)
virtual
virtual int DtFollowEntityTask::netRepSize ( ) const
virtual

Returns the size of the full network representation padded to an 8-byte boundary.

Reimplemented from DtSimTask.

virtual bool DtFollowEntityTask::setFromNet ( const char contentBuffer,
unsigned  contentSize 
)
virtual

Fills in the task from the network buffer.

Reimplemented from DtSimTask.

virtual bool DtFollowEntityTask::setToNet ( )
virtual

Fills in the network buffer (created by base class simTask) with the task contents.

Reimplemented from DtSimTask.

static DtSimTask* DtFollowEntityTask::creator ( )
static

Member Data Documentation

DtRwUUID DtFollowEntityTask::myEntityToFollow
protected
DtRwOffsetVector DtFollowEntityTask::myOffsetVector
protected

Specialized vector that knows it is an offset, not a world location.


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

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)