VR-Link API Documentation for HLA Evolved
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:

List of all members.

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.

Static Public Member Functions

static
DtEnvironmentProcessRepository
create ()

Protected Attributes

DtEnvironmentalProcessPdu myPdu
DtVector myLocation

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

default constructor

destructor

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.

Implements DtStateRepository.

Get the originating process id.

virtual bool DtEnvironmentProcessRepository::environmentalStatus ( ) const [virtual]

Get whether the environment process is active.

Get The type of environmental condition.

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

Get The Environmental Model which is used by this process.

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.

if the first environmental record is a bounding sphere record, this will return the radius.

Otherwise, 0. is returned.

Get a pointer to an environmental record.

Parameters:
recordIndexstarts at zero.

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.

Set The type of environmental condition.

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.

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


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

Document ID: Generated on Mon May 14 08:06:18 EDT 2012 from SVN revision 114750
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)