VR-Forces 4.0.4 Class Documentation
Public Member Functions | Protected Member Functions
DtRwSpawnData Class Reference

Base library for data that is used to control how spawn points generate entities. More...

Inheritance diagram for DtRwSpawnData:
Inheritance graph
[legend]

List of all members.

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 DtRwSpawnDataoperator= (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 DtStringtemplateDescription () const
 Description of the template.
virtual void setTemplateDescription (const DtString &desc)
virtual const DtStringtemplateName () 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 DtRwObjectTypeInfoListspawnObjectTypes ()
 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 DtRwStringListsinkNodeNames () const
 The points (names) to use as sinks (move destinations).
virtual DtRwStringListsinkNodeNames ()
 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 DtPlanentityPlan () const
 The plan that the entity will follow.
virtual void setEntityPlan (const DtPlan &plan)
 The plan that the entity will follow.

Protected Member Functions

 DtRwSpawnData ()
 Constructors etc.

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.

Detailed Description

Base library for data that is used to control how spawn points generate entities.

This data structure has three uses:

  1. Defines the parameters of a spawn point, for a spawn controller to use.
  2. Defines the data in a spawn template, which spawn points initially take their data from.
  3. Defines the data in messages to create and update spawn templates and spawn points. For purposes 1 and 2, this class needs to be a DtReaderWriter so it can be read from and saved to [mtl] scenario files. For reading and writing scenario files, there is also a rw-spawn-template-list class defined in vrfmsgs. For purpose 3, it needs to support encode and decode methods so it can be written to a network message.

Constructor & Destructor Documentation

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 DtRwSpawnData::~DtRwSpawnData ( ) [virtual]

Destructor.


Member Function Documentation

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

assignment operator

virtual const char* DtRwSpawnData::readerWriterType ( ) const [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 DtString DtRwSpawnData::stringRep ( ) const [virtual]

Produces a print representation of the template data in str.

virtual const DtString& DtRwSpawnData::templateName ( ) const [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 void DtRwSpawnData::setTemplateName ( const DtString name) [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 const DtString& DtRwSpawnData::templateDescription ( ) const [virtual]

Description of the template.

A user can note something about the types of entities this templates spawns, or whatever.

virtual void DtRwSpawnData::setTemplateDescription ( const DtString desc) [virtual]
virtual bool DtRwSpawnData::isTimeBased ( ) const [virtual]

Indicates whether spawning activity is restricted to certain times.

virtual void DtRwSpawnData::setIsTimeBased ( bool  isTimeBased) [virtual]

Indicates whether spawning activity is restricted to certain times.

virtual bool DtRwSpawnData::usesClockTime ( ) const [virtual]

Indicates whether the start and stop times should be interpreted as clock time (vs.

sim time).

virtual void DtRwSpawnData::setUsesClockTime ( bool  isClockTime) [virtual]

Indicates whether the start and stop times should be interpreted as clock time (vs.

sim time).

virtual void DtRwSpawnData::setSpawnStartTime ( DtReal  t) [virtual]

The simulation time when spawning starts; in seconds since start time of simulation.

virtual DtReal DtRwSpawnData::spawnStartTime ( ) const [virtual]

The simulation time when spawning starts; in seconds since start time of simulation.

virtual void DtRwSpawnData::setSpawnEndTime ( DtReal  t) [virtual]

The simulation time when spawning ends; in seconds since start time of simulation.

virtual DtReal DtRwSpawnData::spawnEndTime ( ) const [virtual]

The simulation time when spawning ends; in seconds since start time of simulation.

virtual void DtRwSpawnData::setSpawnPeriod ( DtReal  t) [virtual]

The spawn period, in seconds; how much time between spawn events.

virtual DtReal DtRwSpawnData::spawnPeriod ( ) const [virtual]

The spawn period, in seconds; how much time between spawn events.

virtual void DtRwSpawnData::setSpawnVariance ( DtReal  t) [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 DtReal DtRwSpawnData::spawnVariance ( ) const [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 bool DtRwSpawnData::isCyclical ( ) const [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 void DtRwSpawnData::setIsCyclical ( bool  isCyclical) [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 DtReal DtRwSpawnData::cyclePeriod ( ) const [virtual]

The period of the cyclical spawning, in seconds.

virtual void DtRwSpawnData::setCyclePeriod ( DtReal  t) [virtual]

The period of the cyclical spawning, in seconds.

virtual DtReal DtRwSpawnData::burstPeriodVariance ( ) const [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 void DtRwSpawnData::setBurstPeriodVariance ( DtReal  t) [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 DtReal DtRwSpawnData::dutyCycle ( ) const [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 void DtRwSpawnData::setDutyCycle ( DtReal  pct) [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 DtReal DtRwSpawnData::startOffset ( ) const [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 void DtRwSpawnData::setStartOffset ( DtReal  t) [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 void DtRwSpawnData::setSpawnMaxCount ( unsigned  t) [virtual]

Stop spawning if we have this many entities already.

virtual unsigned DtRwSpawnData::spawnMaxCount ( ) const [virtual]

Stop spawning if we have this many entities already.

virtual void DtRwSpawnData::setSpecifySpeed ( bool  ) [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 bool DtRwSpawnData::specifySpeed ( ) const [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 void DtRwSpawnData::setSpawnMinSpeed ( DtReal  t) [virtual]

Minimum Speed of Spawn Entity In meters/sec.

virtual DtReal DtRwSpawnData::spawnMinSpeed ( ) const [virtual]

Minimum Speed of Spawn Entity In meters/sec.

virtual void DtRwSpawnData::setSpawnMaxSpeed ( DtReal  t) [virtual]

Maximum Speed of Spawn Entity In meters/sec.

virtual DtReal DtRwSpawnData::spawnMaxSpeed ( ) const [virtual]

Maximum Speed of Spawn Entity In meters/sec.

virtual void DtRwSpawnData::setSpawnObjectTypes ( const DtRwObjectTypeInfoList t) [virtual]

Types of objects to spawn.

virtual const DtRwObjectTypeInfoList& DtRwSpawnData::spawnObjectTypes ( ) const [virtual]

Types of objects to spawn.

Types of objects to spawn.

virtual void DtRwSpawnData::addSpawnObjectType ( const DtRwObjectTypeInfo newType) [virtual]

Types of objects to spawn.

virtual void DtRwSpawnData::removeSpawnObjectType ( const DtRwObjectType remType) [virtual]

Types of objects to spawn.

virtual void DtRwSpawnData::removeSpawnObjectType ( const DtString name) [virtual]

Types of objects to spawn.

virtual void DtRwSpawnData::setCreateOnVectorNetwork ( bool  t) [virtual]

Use Roads?

virtual bool DtRwSpawnData::createOnVectorNetwork ( ) const [virtual]

Use Roads?

virtual void DtRwSpawnData::setSinkNodeNames ( const DtRwStringList t) [virtual]

The points (names) to use as sinks (move destinations).

virtual const DtRwStringList& DtRwSpawnData::sinkNodeNames ( ) const [virtual]

The points (names) to use as sinks (move destinations).

The points (names) to use as sinks (move destinations).

virtual bool DtRwSpawnData::isInList ( const DtString testName) const [virtual]

Indicates whether this name is in the list.

virtual void DtRwSpawnData::addSinkNode ( const DtString name) [virtual]

Adds the sink node to the list.

Makes a copy of the argument before adding.

virtual void DtRwSpawnData::removeSinkNode ( const DtString name) [virtual]

Removes the sink node identified by name.

virtual const DtPlan& DtRwSpawnData::entityPlan ( ) const [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 void DtRwSpawnData::setEntityPlan ( const DtPlan plan) [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).


Member Data Documentation

These members are saved and loaded in scenario files.

These members are saved and loaded in scenario files.

These members are saved and loaded in scenario files.

These members are saved and loaded in scenario files.

These members are saved and loaded in scenario files.

These members are saved and loaded in scenario files.

These members are saved and loaded in scenario files.

These members are saved and loaded in scenario files.

These members are saved and loaded in scenario files.

These members are saved and loaded in scenario files.

These members are saved and loaded in scenario files.

These members are saved and loaded in scenario files.

These members are saved and loaded in scenario files.

These members are saved and loaded in scenario files.

These members are saved and loaded in scenario files.

These members are saved and loaded in scenario files.

These members are saved and loaded in scenario files.

These members are saved and loaded in scenario files.

These members are saved and loaded in scenario files.

These members are saved and loaded in scenario files.

These members are saved and loaded in scenario files.


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)