VR-Link API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Protected Attributes
DtEnvironmentProcessRepository Class Reference

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
DtEnvironmentProcessRepositoryoperator= (const DtEnvironmentProcessRepository &orig)
 assignment operator
virtual DtStateRepositoryclone (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 DtEntityIdentifierenvironmentalProcessID () 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 DtNetEnvironmentalRecordrecordPointer (int recordIndex)
 Get a pointer to an environmental record.
virtual bool setRecordBitSize (int recordIndex, int newRecordBitSize)
 Set size of an environment record.
virtual const DtVectorlocation () 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.
- Public Member Functions inherited from DtStateRepository
 DtStateRepository ()
 default constructor
 DtStateRepository (const DtStateRepository &orig)
 copy constructor
virtual ~DtStateRepository ()
 destructor
DtStateRepositoryoperator= (const DtStateRepository &orig)
 assignment operator
virtual void setGlobalId (const DtGlobalObjectDesignator &id)
 Get/Set global identifier, or name.
virtual const
DtGlobalObjectDesignator
globalId () const
virtual void setAttributeRecords (const std::vector< DtStandardVariableRecord * > &records)
 The following functions are related to the extendability part of DIS 7.
virtual const std::vector
< DtStandardVariableRecord * > 
attributeRecords (unsigned int recordType=0) const
virtual void getAttributeRecords (std::vector< DtStandardVariableRecord * > &vec, unsigned int recordType=0) const
virtual void addAttributeRecord (DtStandardVariableRecord *record)
virtual void clearAttributeRecords ()
virtual void setAttributeRecords (const std::vector< DtStandardVariableRecord * > &records, const DtSimulationAddress &address)
virtual void setSimAddr (const DtSimulationAddress &id)
 Get/Set default simulation address. Set by VR-Link for publishers (based on exercise connection)
virtual const DtSimulationAddresssimAddr () const
virtual unsigned int numberOfAttributeRecords () const

Static Public Member Functions

static
DtEnvironmentProcessRepository
create ()

Protected Attributes

DtEnvironmentalProcessPdu myPdu
DtVector myLocation

Additional Inherited Members

- Public Attributes inherited from DtStateRepository
DtGlobalObjectDesignator myGlobalId
DtSimulationAddress myDefaultSimulationAddress
std::map< DtSimulationAddress,
std::vector
< DtStandardVariableRecord * > > 
myRecordsMap

Detailed Description

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

Constructor & Destructor Documentation

DtEnvironmentProcessRepository::DtEnvironmentProcessRepository ( )

default constructor

virtual DtEnvironmentProcessRepository::~DtEnvironmentProcessRepository ( )
virtual

destructor

DtEnvironmentProcessRepository::DtEnvironmentProcessRepository ( const DtEnvironmentProcessRepository orig)

copy constructor

Member Function Documentation

virtual DtStateRepository* DtEnvironmentProcessRepository::clone ( bool  copy = false) const
virtual

Return a copy/empty object of the same type as this.

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

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

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

Member Data Documentation

DtVector DtEnvironmentProcessRepository::myLocation
protected
DtEnvironmentalProcessPdu DtEnvironmentProcessRepository::myPdu
protected

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

Document ID: Generated on Fri May 15 06:36:13 EDT 2015 from SVN revision 153263
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)