![]() |
VR-Link API Documentation for HLA Evolved
|
Instances of DtEnvironmentProcessRepository are used to store state information for environmental process objects in both DIS and HLA environments. More...
Inheritance diagram for DtEnvironmentProcessRepository:
Collaboration diagram for DtEnvironmentProcessRepository:Public Member Functions | |
| DtEnvironmentProcessRepository () | |
| default constructor | |
| virtual | ~DtEnvironmentProcessRepository () |
| destructor | |
| DtEnvironmentProcessRepository (const DtEnvironmentProcessRepository &orig) | |
| copy constructor | |
| DtEnvironmentProcessRepository & | operator= (const DtEnvironmentProcessRepository &orig) |
| assignment operator | |
| virtual DtStateRepository * | clone (bool copy=false) const |
| Return a copy/empty object of the same type as this. | |
| virtual void | printData () const |
| Print data contained within the repository. | |
| virtual void | printDataToStream (std::ostream &stream) const |
| Print data contained within the repository. | |
| virtual void | setEnvironmentalProcessID (const DtEntityIdentifier &entity) |
| Set the originating process id. | |
| virtual const DtEntityIdentifier & | environmentalProcessID () const |
| Get the originating process id. | |
| virtual void | setEnvironmentType (const DtEnvironmentTypeRecord &type) |
| Set The type of environmental condition. | |
| virtual const DtEnvironmentTypeRecord & | environmentType () const |
| Get The type of environmental condition. | |
| virtual void | setModelType (DtEnvironmentalModelType value) |
| Set The Environmental Model which is used by this process. | |
| virtual DtEnvironmentalModelType | modelType () const |
| Get The Environmental Model which is used by this process. | |
| virtual void | setEnvironmentalStatus (bool value) |
| Set whether the environment process is active. | |
| virtual bool | environmentalStatus () const |
| Get whether the environment process is active. | |
| virtual void | setSequenceNumber (DtU16 value) |
| Set/Get the sequence number. | |
| virtual DtU16 | sequenceNumber () const |
| virtual bool | setNumberOfEnvironmentalRecords (DtU16 newNumberOfRecords) |
| Set/Get number of environment records. | |
| virtual DtU16 | numberOfEnvironmentalRecords () const |
| virtual DtNetEnvironmentalRecord * | recordPointer (int recordIndex) |
| Get a pointer to an environmental record. | |
| virtual bool | setRecordBitSize (int recordIndex, int newRecordBitSize) |
| Set size of an environment record. | |
| virtual const DtVector & | location () const |
| The standard says the first environmental record will either be a bounding sphere or the only geometry record. | |
| double | radius () const |
| if the first environmental record is a bounding sphere record, this will return the radius. | |
| virtual int | numberOfGeometryRecords () const |
| The enumeration document establishes the convention that geometry types use the high order 2 bytes of the type field, while state types use the lower two. | |
| virtual DtEnvironmentalRecordType | geometryRecordType (int index) const |
| This returns the type of the geometry record with the index specified. | |
| virtual DtEnvironmentalRecordType | stateRecordType (int index) const |
| This returns the type of the state record associated with the geometry record with the index specified. | |
| virtual bool | getGeometryRecord (int index, DtEnvironmentalGeometryRecord &geometryRecord) const |
| This returns a reference to the nth geometry record. | |
| virtual bool | getStateRecord (int index, DtEnvironmentalRecord &stateRecord) const |
| This returns a reference to the state record associated with the nth geometry record. | |
| virtual void | setEnvironmentalRecord (int index, const DtEnvironmentalRecord &envRecord) |
| This sets the index'th record to the values in the envRecord supplied. | |
Static Public Member Functions | |
| static DtEnvironmentProcessRepository * | create () |
Protected Attributes | |
| DtEnvironmentalProcessPdu | myPdu |
| DtVector | myLocation |
Instances of DtEnvironmentProcessRepository are used to store state information for environmental process objects in both DIS and HLA environments.
An Environmental Process is an object which represents something in the environment, including things like clouds, chaff, smoke, contrails or other chemical processes.
Examples: Environmental Process Example
default constructor
| virtual DtEnvironmentProcessRepository::~DtEnvironmentProcessRepository | ( | ) | [virtual] |
destructor
| DtEnvironmentProcessRepository::DtEnvironmentProcessRepository | ( | const DtEnvironmentProcessRepository & | orig | ) |
copy constructor
| virtual DtStateRepository* DtEnvironmentProcessRepository::clone | ( | bool | copy = false | ) | const [virtual] |
Return a copy/empty object of the same type as this.
Implements DtStateRepository.
| static DtEnvironmentProcessRepository* DtEnvironmentProcessRepository::create | ( | ) | [static] |
| virtual const DtEntityIdentifier& DtEnvironmentProcessRepository::environmentalProcessID | ( | ) | const [virtual] |
Get the originating process id.
| virtual bool DtEnvironmentProcessRepository::environmentalStatus | ( | ) | const [virtual] |
Get whether the environment process is active.
| virtual const DtEnvironmentTypeRecord& DtEnvironmentProcessRepository::environmentType | ( | ) | const [virtual] |
Get The type of environmental condition.
| virtual DtEnvironmentalRecordType DtEnvironmentProcessRepository::geometryRecordType | ( | int | index | ) | const [virtual] |
This returns the type of the geometry record with the index specified.
| virtual bool DtEnvironmentProcessRepository::getGeometryRecord | ( | int | index, |
| DtEnvironmentalGeometryRecord & | geometryRecord | ||
| ) | const [virtual] |
This returns a reference to the nth geometry record.
The user must supply a DtEnvironmentalRecord of the correct type (use geometryRecordType() first(!)) because it is that class that knows how to convert the network representation in the PDU into the DtEnvironmentalRecord (host) representation,
| virtual bool DtEnvironmentProcessRepository::getStateRecord | ( | int | index, |
| DtEnvironmentalRecord & | stateRecord | ||
| ) | const [virtual] |
This returns a reference to the state record associated with the nth geometry record.
The user must supply a DtEnvironmentalRecord of the correct type (use stateRecordType() first(!)) because it is that class that knows how to convert the network representation in the PDU into the DtEnvironmentalRecord (host) representation,
| virtual const DtVector& DtEnvironmentProcessRepository::location | ( | ) | const [virtual] |
The standard says the first environmental record will either be a bounding sphere or the only geometry record.
In fact, the standard should have required a bounding sphere even when there is a single geometry record that is anything other than Point Record 1 or Sphere Record 1, since the other geometry records imply multiple geometry. This accessor looks at the first env record and returns the location if the record is a point1, sphere1, or bounding sphere record. To have this work the way it was intended, always use one of these record types as the first geometry record. If the first geometry record is not one of these three types, this accessor will return <0., 0., 0.>.
| virtual DtEnvironmentalModelType DtEnvironmentProcessRepository::modelType | ( | ) | const [virtual] |
Get The Environmental Model which is used by this process.
| virtual DtU16 DtEnvironmentProcessRepository::numberOfEnvironmentalRecords | ( | ) | const [virtual] |
| virtual int DtEnvironmentProcessRepository::numberOfGeometryRecords | ( | ) | const [virtual] |
The enumeration document establishes the convention that geometry types use the high order 2 bytes of the type field, while state types use the lower two.
Assuming that convention is followed, this returns the number of geometry records in the PDU. Since the standard ties each state record to a corresponding geometry record, this is a useful way to access the environmental records.
| DtEnvironmentProcessRepository& DtEnvironmentProcessRepository::operator= | ( | const DtEnvironmentProcessRepository & | orig | ) |
assignment operator
| virtual void DtEnvironmentProcessRepository::printData | ( | ) | const [virtual] |
Print data contained within the repository.
Implements DtStateRepository.
| virtual void DtEnvironmentProcessRepository::printDataToStream | ( | std::ostream & | stream | ) | const [virtual] |
Print data contained within the repository.
Reimplemented from DtStateRepository.
| double DtEnvironmentProcessRepository::radius | ( | ) | const |
if the first environmental record is a bounding sphere record, this will return the radius.
Otherwise, 0. is returned.
| virtual DtNetEnvironmentalRecord* DtEnvironmentProcessRepository::recordPointer | ( | int | recordIndex | ) | [virtual] |
Get a pointer to an environmental record.
| recordIndex | starts at zero. |
| virtual DtU16 DtEnvironmentProcessRepository::sequenceNumber | ( | ) | const [virtual] |
| virtual void DtEnvironmentProcessRepository::setEnvironmentalProcessID | ( | const DtEntityIdentifier & | entity | ) | [virtual] |
Set the originating process id.
| virtual void DtEnvironmentProcessRepository::setEnvironmentalRecord | ( | int | index, |
| const DtEnvironmentalRecord & | envRecord | ||
| ) | [virtual] |
This sets the index'th record to the values in the envRecord supplied.
| virtual void DtEnvironmentProcessRepository::setEnvironmentalStatus | ( | bool | value | ) | [virtual] |
Set whether the environment process is active.
| virtual void DtEnvironmentProcessRepository::setEnvironmentType | ( | const DtEnvironmentTypeRecord & | type | ) | [virtual] |
Set The type of environmental condition.
| virtual void DtEnvironmentProcessRepository::setModelType | ( | DtEnvironmentalModelType | value | ) | [virtual] |
Set The Environmental Model which is used by this process.
| virtual bool DtEnvironmentProcessRepository::setNumberOfEnvironmentalRecords | ( | DtU16 | newNumberOfRecords | ) | [virtual] |
Set/Get number of environment records.
| virtual bool DtEnvironmentProcessRepository::setRecordBitSize | ( | int | recordIndex, |
| int | newRecordBitSize | ||
| ) | [virtual] |
Set size of an environment record.
To get the size of a record in a reflected state repository, you need to read the record and then look in the DtNetEnvironmentalRecord type for myLength, which is noted in bits. Return false if size is invalid.
| virtual void DtEnvironmentProcessRepository::setSequenceNumber | ( | DtU16 | value | ) | [virtual] |
Set/Get the sequence number.
| virtual DtEnvironmentalRecordType DtEnvironmentProcessRepository::stateRecordType | ( | int | index | ) | const [virtual] |
This returns the type of the state record associated with the geometry record with the index specified.
0 is returned if there is no state record associated with the index'th geometry record.
DtVector DtEnvironmentProcessRepository::myLocation [protected] |