![]() |
VR-Forces 4.2 Class Documentation
|
Base library for data that is used to control how spawn points generate entities. More...

Public Member Functions | |
| DtRwSpawnData (const DtString &name, DtReaderWriterRegistry *parentRegistry=NULL) | |
| constructor | |
| DtRwSpawnData (const DtSymbolString &name, DtReaderWriterRegistry *parentRegistry=NULL) | |
| DtRwSpawnData (const DtRwSpawnData &orig, const DtString &name="temp-spawn-data", DtReaderWriterRegistry *parentRegistry=NULL) | |
| copy constructor | |
| const DtRwSpawnData & | operator= (const DtRwSpawnData &orig) |
| assignment operator | |
| virtual | ~DtRwSpawnData () |
| Destructor. | |
| virtual const char * | readerWriterType () const |
| Used to supply a string type that this reader writer type is. | |
| virtual DtString | stringRep () const |
| Produces a print representation of the template data in str. | |
| virtual const DtString & | templateDescription () const |
| Description of the template. | |
| virtual void | setTemplateDescription (const DtString &desc) |
| virtual const DtString & | templateName () const |
| Accessors and mutators for the spawn parameter data. | |
| virtual void | setTemplateName (const DtString &name) |
| Accessors and mutators for the spawn parameter data. | |
| virtual bool | isTimeBased () const |
| Indicates whether spawning activity is restricted to certain times. | |
| virtual void | setIsTimeBased (bool isTimeBased) |
| Indicates whether spawning activity is restricted to certain times. | |
| virtual bool | usesClockTime () const |
| Indicates whether the start and stop times should be interpreted as clock time (vs. | |
| virtual void | setUsesClockTime (bool isClockTime) |
| Indicates whether the start and stop times should be interpreted as clock time (vs. | |
| virtual void | setSpawnStartTime (DtReal t) |
| The simulation time when spawning starts; in seconds since start time of simulation. | |
| virtual DtReal | spawnStartTime () const |
| The simulation time when spawning starts; in seconds since start time of simulation. | |
| virtual void | setSpawnEndTime (DtReal t) |
| The simulation time when spawning ends; in seconds since start time of simulation. | |
| virtual DtReal | spawnEndTime () const |
| The simulation time when spawning ends; in seconds since start time of simulation. | |
| virtual void | setSpawnPeriod (DtReal t) |
| The spawn period, in seconds; how much time between spawn events. | |
| virtual DtReal | spawnPeriod () const |
| The spawn period, in seconds; how much time between spawn events. | |
| virtual void | setSpawnVariance (DtReal t) |
| The random variation in spawn time, as a percentage of the spawn period. | |
| virtual DtReal | spawnVariance () const |
| The random variation in spawn time, as a percentage of the spawn period. | |
| virtual bool | isCyclical () const |
| The flag indicates whether the spawning activity is cyclical, i.e. | |
| virtual void | setIsCyclical (bool isCyclical) |
| The flag indicates whether the spawning activity is cyclical, i.e. | |
| virtual DtReal | cyclePeriod () const |
| The period of the cyclical spawning, in seconds. | |
| virtual void | setCyclePeriod (DtReal t) |
| The period of the cyclical spawning, in seconds. | |
| virtual DtReal | burstPeriodVariance () const |
| The variance of the burst cycle period, in percent of the period. | |
| virtual void | setBurstPeriodVariance (DtReal t) |
| The variance of the burst cycle period, in percent of the period. | |
| virtual DtReal | dutyCycle () const |
| The duty cycle of the spawning cycle, as %. | |
| virtual void | setDutyCycle (DtReal pct) |
| The duty cycle of the spawning cycle, as %. | |
| virtual DtReal | startOffset () const |
| The offset from the start of the cycle to the first active time, in seconds. | |
| virtual void | setStartOffset (DtReal t) |
| The offset from the start of the cycle to the first active time, in seconds. | |
| virtual void | setSpawnMaxCount (unsigned t) |
| Stop spawning if we have this many entities already. | |
| virtual unsigned | spawnMaxCount () const |
| Stop spawning if we have this many entities already. | |
| virtual void | setSpecifySpeed (bool) |
| Sets whether or not to use the default speed, or the specified min/max speed If default speed is used all entities will be spawned at their default minimum speed. | |
| virtual bool | specifySpeed () const |
| Sets whether or not to use the default speed, or the specified min/max speed If default speed is used all entities will be spawned at their default minimum speed. | |
| virtual void | setSpawnMinSpeed (DtReal t) |
| Minimum Speed of Spawn Entity In meters/sec. | |
| virtual DtReal | spawnMinSpeed () const |
| Minimum Speed of Spawn Entity In meters/sec. | |
| virtual void | setSpawnMaxSpeed (DtReal t) |
| Maximum Speed of Spawn Entity In meters/sec. | |
| virtual DtReal | spawnMaxSpeed () const |
| Maximum Speed of Spawn Entity In meters/sec. | |
| virtual void | setSpawnObjectTypes (const DtRwObjectTypeInfoList &t) |
| Types of objects to spawn. | |
| virtual const DtRwObjectTypeInfoList & | spawnObjectTypes () const |
| Types of objects to spawn. | |
| virtual DtRwObjectTypeInfoList & | spawnObjectTypes () |
| Types of objects to spawn. | |
| virtual void | addSpawnObjectType (const DtRwObjectTypeInfo &newType) |
| Types of objects to spawn. | |
| virtual void | removeSpawnObjectType (const DtRwObjectType &remType) |
| Types of objects to spawn. | |
| virtual void | removeSpawnObjectType (const DtString &name) |
| Types of objects to spawn. | |
| virtual void | setCreateOnVectorNetwork (bool t) |
| Use Roads? | |
| virtual bool | createOnVectorNetwork () const |
| Use Roads? | |
| virtual void | setSinkNodeNames (const DtRwStringList &t) |
| The points (names) to use as sinks (move destinations). | |
| virtual const DtRwStringList & | sinkNodeNames () const |
| The points (names) to use as sinks (move destinations). | |
| virtual DtRwStringList & | sinkNodeNames () |
| The points (names) to use as sinks (move destinations). | |
| virtual bool | isInList (const DtString &testName) const |
| Indicates whether this name is in the list. | |
| virtual void | addSinkNode (const DtString &name) |
| Adds the sink node to the list. | |
| virtual void | removeSinkNode (const DtString &name) |
| Removes the sink node identified by name. | |
| virtual const DtPlan & | entityPlan () const |
| The plan that the entity will follow. | |
| virtual void | setEntityPlan (const DtPlan &plan) |
| The plan that the entity will follow. | |
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 DtReaderWriter & | operator= (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 aliasContainer & | aliases () 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 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 DtReaderWriterRegistry & | registry () const |
| Collection of child DtReaderWriter nodes owned by this object. | |
| DtReaderWriterRegistry & | registry () |
| Collection of child DtReaderWriter nodes owned by this object. | |
Protected Member Functions | |
| DtRwSpawnData () | |
| Constructors etc. | |
Protected Member Functions inherited from DtReaderWriter | |
| virtual void | bindToRwAsVariable (const DtReaderWriter *rw) |
| Copies values from the specified DtReaderWriter. | |
| virtual void | bindLocalVariables (const DtVariableBindingsList &variableBindings) |
| Checks to see if this RW object is a variable reference that can be bound using the provided bindings. | |
| virtual void | putData (FILE *fp, int indentLevel=0) |
| Deriving class overrides these to get/put class specific data. | |
| virtual DtlObjPtr | getData (DtlObjPtr args, const DtFilename &searchPath, const DtVariableBindingsList &variableBindings) |
| Deriving class overrides these to get/put class specific data. | |
Protected Attributes | |
| DtRwString | mySpawnTemplateName |
| These members are saved and loaded in scenario files. | |
| DtRwString | myDescription |
| These members are saved and loaded in scenario files. | |
| DtRwBoolean | myIsTimeBased |
| These members are saved and loaded in scenario files. | |
| DtRwBoolean | myUsesClockTime |
| These members are saved and loaded in scenario files. | |
| DtRwReal | mySpawnStartTime |
| These members are saved and loaded in scenario files. | |
| DtRwReal | mySpawnEndTime |
| These members are saved and loaded in scenario files. | |
| DtRwReal | mySpawnPeriod |
| These members are saved and loaded in scenario files. | |
| DtRwReal | mySpawnVariance |
| These members are saved and loaded in scenario files. | |
| DtRwBoolean | myIsCyclical |
| These members are saved and loaded in scenario files. | |
| DtRwReal | myCyclePeriod |
| These members are saved and loaded in scenario files. | |
| DtRwReal | myCyclePeriodVariance |
| These members are saved and loaded in scenario files. | |
| DtRwReal | myDutyCycle |
| These members are saved and loaded in scenario files. | |
| DtRwReal | myStartOffset |
| These members are saved and loaded in scenario files. | |
| DtRwUnsigned | mySpawnMaxCount |
| These members are saved and loaded in scenario files. | |
| DtRwReal | mySpawnMinSpeed |
| These members are saved and loaded in scenario files. | |
| DtRwReal | mySpawnMaxSpeed |
| These members are saved and loaded in scenario files. | |
| DtRwObjectTypeInfoList | mySpawnObjectTypes |
| These members are saved and loaded in scenario files. | |
| DtRwBoolean | myCreateOnVectorNetwork |
| These members are saved and loaded in scenario files. | |
| DtRwStringList | mySinkNodeNames |
| These members are saved and loaded in scenario files. | |
| DtPlan | myPlan |
| These members are saved and loaded in scenario files. | |
| DtRwBoolean | mySpecifySpeed |
| These members are saved and loaded in scenario files. | |
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 )() |
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 () |
| static DtReaderWriterFactory * | factory () |
Static Protected Attributes inherited from DtReaderWriter | |
| static DtString | theUnspecifiedValue |
| static DtGetSelfCallbackInfo | thePostGetSelfCallback |
| static DtPutSelfCallbackInfo | thePrePutSelfCallback |
| static const DtVariableBindingsList | theEmptyVariableBindingsList |
| static bool | theCreatorFcnSet |
| static DtReaderWriterFactory * | theFactory |
| static DtReaderWriterFactoryCreatorFcn | theFactoryCreatorFcn |
Base library for data that is used to control how spawn points generate entities.
This data structure has three uses:
|
protected |
Constructors etc.
Default constructor; not implemented.
| DtRwSpawnData::DtRwSpawnData | ( | const DtString & | name, |
| DtReaderWriterRegistry * | parentRegistry = NULL |
||
| ) |
constructor
| DtRwSpawnData::DtRwSpawnData | ( | const DtSymbolString & | name, |
| DtReaderWriterRegistry * | parentRegistry = NULL |
||
| ) |
| DtRwSpawnData::DtRwSpawnData | ( | const DtRwSpawnData & | orig, |
| const DtString & | name = "temp-spawn-data", |
||
| DtReaderWriterRegistry * | parentRegistry = NULL |
||
| ) |
copy constructor
|
virtual |
Destructor.
| const DtRwSpawnData& DtRwSpawnData::operator= | ( | const DtRwSpawnData & | orig | ) |
assignment operator
|
virtual |
Used to supply a string type that this reader writer type is.
This can be used in place of dynamic-casting. Also used by the opd editor to determine which type of control to create
Reimplemented from DtReaderWriter.
|
virtual |
Produces a print representation of the template data in str.
|
virtual |
Accessors and mutators for the spawn parameter data.
The [short] name of the template. For a point, this is the template that this spawn object should take its parameter values from. If the template name is null, then the parameter values come from the remaining fields in the class.
|
virtual |
Accessors and mutators for the spawn parameter data.
The [short] name of the template. For a point, this is the template that this spawn object should take its parameter values from. If the template name is null, then the parameter values come from the remaining fields in the class.
|
virtual |
Description of the template.
A user can note something about the types of entities this templates spawns, or whatever.
|
virtual |
|
virtual |
Indicates whether spawning activity is restricted to certain times.
|
virtual |
Indicates whether spawning activity is restricted to certain times.
|
virtual |
Indicates whether the start and stop times should be interpreted as clock time (vs.
sim time).
|
virtual |
Indicates whether the start and stop times should be interpreted as clock time (vs.
sim time).
|
virtual |
The simulation time when spawning starts; in seconds since start time of simulation.
|
virtual |
The simulation time when spawning starts; in seconds since start time of simulation.
|
virtual |
The simulation time when spawning ends; in seconds since start time of simulation.
|
virtual |
The simulation time when spawning ends; in seconds since start time of simulation.
|
virtual |
The spawn period, in seconds; how much time between spawn events.
|
virtual |
The spawn period, in seconds; how much time between spawn events.
|
virtual |
The random variation in spawn time, as a percentage of the spawn period.
I.e., for a spawn period of 6 seconds: a variance of 100 means that the time between spawns varies uniformly between 0 and 12 seconds; a variance of 50 means that the time between spawns varies uniformly between 3 and 9 seconds.
|
virtual |
The random variation in spawn time, as a percentage of the spawn period.
I.e., for a spawn period of 6 seconds: a variance of 100 means that the time between spawns varies uniformly between 0 and 12 seconds; a variance of 50 means that the time between spawns varies uniformly between 3 and 9 seconds.
|
virtual |
The flag indicates whether the spawning activity is cyclical, i.e.
has bursts with periods of inactivity between bursts. If not, activity is continuous.Indicates that spawn activity is cyclical.
|
virtual |
The flag indicates whether the spawning activity is cyclical, i.e.
has bursts with periods of inactivity between bursts. If not, activity is continuous.Indicates that spawn activity is cyclical.
|
virtual |
The period of the cyclical spawning, in seconds.
|
virtual |
The period of the cyclical spawning, in seconds.
|
virtual |
The variance of the burst cycle period, in percent of the period.
I.e., for a cycle period of 6 minutes: a variance of 100 means that the time between bursts varies uniformly between 0 and 12 minutes; a variance of 50 means that the time between bursts varies uniformly between 3 and 9 minutes.
|
virtual |
The variance of the burst cycle period, in percent of the period.
I.e., for a cycle period of 6 minutes: a variance of 100 means that the time between bursts varies uniformly between 0 and 12 minutes; a variance of 50 means that the time between bursts varies uniformly between 3 and 9 minutes.
|
virtual |
The duty cycle of the spawning cycle, as %.
I.e. period of 60 seconds, duty cycle of 20 means that spawning happens for 12 seconds and then no spawning occurs for 48 seconds, and then the cycle is repeated.
|
virtual |
The duty cycle of the spawning cycle, as %.
I.e. period of 60 seconds, duty cycle of 20 means that spawning happens for 12 seconds and then no spawning occurs for 48 seconds, and then the cycle is repeated.
|
virtual |
The offset from the start of the cycle to the first active time, in seconds.
In the example above, an offset of 15 means from the start time, there is no spawning for 15 seconds, then spawning occurs for 12 seconds, then none for 48 seconds, etc.
|
virtual |
The offset from the start of the cycle to the first active time, in seconds.
In the example above, an offset of 15 means from the start time, there is no spawning for 15 seconds, then spawning occurs for 12 seconds, then none for 48 seconds, etc.
|
virtual |
Stop spawning if we have this many entities already.
|
virtual |
Stop spawning if we have this many entities already.
|
virtual |
Sets whether or not to use the default speed, or the specified min/max speed If default speed is used all entities will be spawned at their default minimum speed.
Default is false
|
virtual |
Sets whether or not to use the default speed, or the specified min/max speed If default speed is used all entities will be spawned at their default minimum speed.
Default is false
|
virtual |
Minimum Speed of Spawn Entity In meters/sec.
|
virtual |
Minimum Speed of Spawn Entity In meters/sec.
|
virtual |
Maximum Speed of Spawn Entity In meters/sec.
|
virtual |
Maximum Speed of Spawn Entity In meters/sec.
|
virtual |
Types of objects to spawn.
|
virtual |
Types of objects to spawn.
|
virtual |
Types of objects to spawn.
|
virtual |
Types of objects to spawn.
|
virtual |
Types of objects to spawn.
|
virtual |
Types of objects to spawn.
|
virtual |
Use Roads?
|
virtual |
Use Roads?
|
virtual |
The points (names) to use as sinks (move destinations).
|
virtual |
The points (names) to use as sinks (move destinations).
|
virtual |
The points (names) to use as sinks (move destinations).
Indicates whether this name is in the list.
|
virtual |
Adds the sink node to the list.
Makes a copy of the argument before adding.
|
virtual |
Removes the sink node identified by name.
|
virtual |
The plan that the entity will follow.
If this plan is empty, a hard-coded default plan will be used instead (which is to move to a sink point and delete self).
|
virtual |
The plan that the entity will follow.
If this plan is empty, a hard-coded default plan will be used instead (which is to move to a sink point and delete self).
|
protected |
These members are saved and loaded in scenario files.
|
protected |
These members are saved and loaded in scenario files.
|
protected |
These members are saved and loaded in scenario files.
|
protected |
These members are saved and loaded in scenario files.
|
protected |
These members are saved and loaded in scenario files.
|
protected |
These members are saved and loaded in scenario files.
|
protected |
These members are saved and loaded in scenario files.
|
protected |
These members are saved and loaded in scenario files.
|
protected |
These members are saved and loaded in scenario files.
|
protected |
These members are saved and loaded in scenario files.
|
protected |
These members are saved and loaded in scenario files.
|
protected |
These members are saved and loaded in scenario files.
|
protected |
These members are saved and loaded in scenario files.
|
protected |
These members are saved and loaded in scenario files.
|
protected |
These members are saved and loaded in scenario files.
|
protected |
These members are saved and loaded in scenario files.
|
protected |
These members are saved and loaded in scenario files.
|
protected |
These members are saved and loaded in scenario files.
|
protected |
These members are saved and loaded in scenario files.
|
protected |
These members are saved and loaded in scenario files.
|
protected |
These members are saved and loaded in scenario files.