VR-Forces 4.0.4 Class Documentation
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
DtSimObjectStateRepository Class Reference

The DtSimObjectStateRepository is an abstract base class (ABC) for all state repositories. More...

Inheritance diagram for DtSimObjectStateRepository:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 DtSimObjectStateRepository (DtVrfObject *simObject, const DtObjectType &objectType, const DtString &rwName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0)
const DtSimObjectStateRepository & operator= (const DtSimObjectStateRepository &orig)
virtual ~DtSimObjectStateRepository ()
virtual
DtSimObjectStateRepository * 
clone (const DtString &rwName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0) const
virtual DtString type () const
 returns DtSimObjectStateRepositoryType
virtual const int objectStateRepositorySubType () const
virtual bool init ()
 Our 'virtual' constructor. Calls all the create<>() methods.
virtual void updatePositionFromModelVertices ()
virtual void updateBVolFromModelVertices ()
virtual const DtObjectType & objectType () const
virtual void setObjectType (const DtObjectType &objectType)
virtual bool createKinematicState ()
 Creates a DtVrfKinematicState.
virtual DtVrfKinematicState * vrfKinematicState ()
virtual const DtVrfKinematicState * vrfKinematicState () const
virtual bool createObjectGeometry ()
virtual DtVrfObjectGeometry * vrfObjectGeometry ()
virtual const DtVrfObjectGeometry * vrfObjectGeometry () const
virtual bool createAttachments ()
virtual DtAttachmentManager * attachments ()
virtual const DtAttachmentManager * attachments () const
virtual
DtSimObjectStateRepository * 
parent ()
virtual const
DtSimObjectStateRepository * 
parent () const
virtual bool isEmbarkedOn (const DtString &parent) const
virtual void attachToParent (DtString parent)
 Looks up the parent state repository using the given echelon ID and puts it in a call to attachToParent.
virtual void attachToParent (DtSimObjectStateRepository *parent)
 Adds this state repository to the given parent's list of attached state repositories and updates myAttachedToRepository and myRootSimStateRepository.
virtual void detachFromParent ()
virtual const DtString & attachedToRepositoryName ()
virtual
DtSimObjectStateRepository * 
findRootSimStateRepository ()
virtual const
DtSimObjectStateRepository * 
findRootSimStateRepository () const
virtual void ancestorObjectChanged ()
virtual void putData (FILE *fp, int indentLevel=0)
 overridden to update myAttachedToRepositoryName before it gets written out
virtual void getSelf (DtlObjPtr args, const DtFilename &searchPath, const DtVariableBindingsList &variableBindings)
 Sets myAttachedToRepository after myAttachedToRepositoryName is read in.
virtual void preGetSelf ()
 Hook function called immediately prior to getSelf().
virtual void postGetSelf ()
 Hook function called immediately following getSelf().
virtual void processObjectAddedCallback (DtVrfObject *simObject)
virtual void processObjectAboutToBeRemovedCallback (DtVrfObject *simObject)
virtual class
DtVrfObjectStateRepository * 
toVrfObjectStateRepository ()
virtual class
DtVrfObjectStateRepository * 
toVrfObjectStateRepository () const
virtual void setCoordinateSystem (const Coordinate_System *coordinateSystem)
 Sets the coordinate system in myObjectGeometry and myKinematicState.
virtual DtVrfObject * vrfObject ()
virtual const DtVrfObject * vrfObject () const
virtual void setVrfObject (DtVrfObject *vrfObject)
virtual DtSimKinematicState * kinematicState ()
virtual const DtSimKinematicState * kinematicState () const
virtual DtVrfObjectGeometry * objectGeometry ()
virtual const DtVrfObjectGeometry * objectGeometry () const
virtual const DtVector & bodyPosition () const
 Now superseded by kinematic state parentCS functions.
virtual void setBodyPosition (const DtVector &pos)
 Formerly setMeInParent.
virtual void setBodyPosition (DtFloat64 x, DtFloat64 y, DtFloat64 z)
const DtDcm & bodyOrientationMatrix () const
 Formerly meToParent().
virtual void embarkOnParent (const DtString &parent)
 Embarks this entity on the specified parent.
virtual bool leftOf (const DtVector &localVector) const
virtual bool inside (const DtVector &point) const
virtual void removeVertex (int iIndex)
 These routines simply call down to the kinematic state to get/set the results.
virtual void addLocalVertex (const DtVector &vertex)
 These routines simply call down to the kinematic state to get/set the results.
virtual void addLocalVertex (const DtVector &vertex, DtVector &newGeometricCenter)
 These routines simply call down to the kinematic state to get/set the results.
virtual void setLocalVertices (const DtLocalVertexList &vertices, DtVector &newGeometricCenter)
 These routines simply call down to the kinematic state to get/set the results.
virtual void setLocalVertices (const DtList &vertices, DtVector &newGeometricCenter)
 These routines simply call down to the kinematic state to get/set the results.
virtual const DtLocalVertexList & localVertices () const
 These routines simply call down to the kinematic state to get/set the results.
virtual const
DtLocalVectorIterator & 
localVertexIterator () const
 These routines simply call down to the kinematic state to get/set the results.
virtual void addWorldVertex (const DtVector &vertex, DtVector &newGeometricCenter)
 These routines simply call down to the kinematic state to get/set the results.
virtual void setWorldVertices (const DtVertexList &vertices, DtVector &newGeometricCenter)
 These routines simply call down to the kinematic state to get/set the results.
virtual void setWorldVertices (const DtList &vertices, DtVector &newGeometricCenter)
 These routines simply call down to the kinematic state to get/set the results.
virtual const DtVertexList & worldVertices () const
 These routines simply call down to the kinematic state to get/set the results.
virtual const DtRwVectorIterator & worldVertexIterator () const
 These routines simply call down to the kinematic state to get/set the results.
virtual void setRelativeVertices (const DtLocalVertexList &vertices)
 Access/modify vertices relative to to the parent to which this object is attached.
virtual void setRelativeVertices (const DtList &vertices)
 Access/modify vertices relative to to the parent to which this object is attached.
virtual const DtLocalVertexList & relativeVertices () const
 Access/modify vertices relative to to the parent to which this object is attached.
virtual const
DtLocalVectorIterator & 
relativeVertexIterator () const
 Access/modify vertices relative to to the parent to which this object is attached.
const DtVector & localPosition () const
 Convenience methods for accessing corresponding methods in DtVrfKinematicState.
void setLocalPosition (const DtVector &pos)
 Convenience methods for accessing corresponding methods in DtVrfKinematicState.
const DtVector & localVelocity () const
 Convenience methods for accessing corresponding methods in DtVrfKinematicState.
void setLocalVelocity (const DtVector &vel)
 Convenience methods for accessing corresponding methods in DtVrfKinematicState.
const DtVector & localAcceleration () const
 Convenience methods for accessing corresponding methods in DtVrfKinematicState.
void setLocalAcceleration (const DtVector &acc)
 Convenience methods for accessing corresponding methods in DtVrfKinematicState.
const DtVector & relativeVelocity () const
 Convenience methods for accessing corresponding methods in DtVrfKinematicState.
void setRelativeVelocity (const DtVector &vel)
 Convenience methods for accessing corresponding methods in DtVrfKinematicState.
const DtVector & relativeAcceleration () const
 Convenience methods for accessing corresponding methods in DtVrfKinematicState.
void setRelativeAcceleration (const DtVector &acc)
 Convenience methods for accessing corresponding methods in DtVrfKinematicState.
const DtTaitBryan & localOrientation () const
 Convenience methods for accessing corresponding methods in DtVrfKinematicState.
void setLocalOrientation (const DtTaitBryan &angles)
 Convenience methods for accessing corresponding methods in DtVrfKinematicState.
const DtVector & worldPosition () const
 Convenience methods for accessing corresponding methods in DtVrfKinematicState.
void setWorldPosition (const DtVector &pos)
 Convenience methods for accessing corresponding methods in DtVrfKinematicState.
const DtVector & worldVelocity () const
 Convenience methods for accessing corresponding methods in DtVrfKinematicState.
void setWorldVelocity (const DtVector &vel)
 Convenience methods for accessing corresponding methods in DtVrfKinematicState.
const DtVector & worldAcceleration () const
 Convenience methods for accessing corresponding methods in DtVrfKinematicState.
void setWorldAcceleration (const DtVector &acc)
 Convenience methods for accessing corresponding methods in DtVrfKinematicState.
const DtTaitBryan & worldOrientation () const
 Convenience methods for accessing corresponding methods in DtVrfKinematicState.
void setWorldOrientation (const DtTaitBryan &angles)
 Convenience methods for accessing corresponding methods in DtVrfKinematicState.
const DtVector & rotationalVelocity () const
 Convenience methods for accessing corresponding methods in DtVrfKinematicState.
void setRotationalVelocity (const DtVector &rotationalVelocity)
 Convenience methods for accessing corresponding methods in DtVrfKinematicState.
const DtDcm & localOrientationMatrix () const
 Convenience methods for accessing corresponding methods in DtVrfKinematicState.
void setLocalOrientationMatrix (const DtDcm &orient)
 Convenience methods for accessing corresponding methods in DtVrfKinematicState.

Static Public Member Functions

static void objectAddedCallback (DtVrfObject *simObject, void *usr)
 These callbacks are used to set myAttachedToStateRepository when this ent gets attached/detached to/from its parent.
static void objectAboutToBeRemovedCallback (DtVrfObject *simObject, void *usr)
static DtSimObjectStateRepository * isSimObjectStateRepository (DtSimObjectStateRepository *repository)
static const
DtSimObjectStateRepository * 
isSimObjectStateRepository (const DtSimObjectStateRepository *repository)

Protected Member Functions

 DtSimObjectStateRepository (const DtSimObjectStateRepository &orig, const DtString &rwName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0)
 DtSimObjectStateRepository ()
 Default Constructor; not implemented.
const Coordinate_System * coordinateSystem () const
virtual void setOrientationRelativeToParent ()
 If attached to a parent, and a terrain database is present, set orientation relative to parent.

Protected Attributes

DtVrfObject * mySimObject
DtRwObjectType myObjectType
DtVrfObjectGeometry * myObjectGeometry
DtVrfKinematicState * myKinematicState
DtAttachmentManager * myAttachments
DtSimObjectStateRepository * myAttachedToRepository
DtRwString myAttachedToRepositoryName
 used for reading & writing the name of myAttachedToRepository
DtSimObjectStateRepository * myRootSimStateRepository
const Coordinate_System * myCoordinateSystemPtr
 Caches pointer to coordinate system so it can set it after myKinematic state is created.

Detailed Description

The DtSimObjectStateRepository is an abstract base class (ABC) for all state repositories.

State repositories represent all information about an object that can arrive from or be transmitted over the DIS or HLA/RPR virtual network.


Constructor & Destructor Documentation

DtSimObjectStateRepository::DtSimObjectStateRepository ( DtVrfObject *  simObject,
const DtObjectType &  objectType,
const DtString &  rwName = DtString::nullString(),
DtReaderWriterRegistry *  parentRegistry = 0 
)
DtSimObjectStateRepository::DtSimObjectStateRepository ( const DtSimObjectStateRepository &  orig,
const DtString &  rwName = DtString::nullString(),
DtReaderWriterRegistry *  parentRegistry = 0 
) [protected]

Default Constructor; not implemented.


Member Function Documentation

const DtSimObjectStateRepository& DtSimObjectStateRepository::operator= ( const DtSimObjectStateRepository &  orig)
virtual DtSimObjectStateRepository* DtSimObjectStateRepository::clone ( const DtString &  rwName = DtString::nullString(),
DtReaderWriterRegistry *  parentRegistry = 0 
) const [virtual]
virtual DtString DtSimObjectStateRepository::type ( ) const [virtual]
virtual const int DtSimObjectStateRepository::objectStateRepositorySubType ( ) const [virtual]
Returns:
DtSimObjectStateRepositorySubTypeBase

Reimplemented in DtVrfObjectStateRepository.

virtual bool DtSimObjectStateRepository::init ( ) [virtual]

Reimplemented in DtVrfObjectStateRepository.

Reimplemented in DtVrfObjectStateRepository.

virtual const DtObjectType& DtSimObjectStateRepository::objectType ( ) const [virtual]
virtual void DtSimObjectStateRepository::setObjectType ( const DtObjectType &  objectType) [virtual]

Creates a DtVrfKinematicState.

Reimplemented in DtVrfObjectStateRepository.

virtual bool DtSimObjectStateRepository::isEmbarkedOn ( const DtString &  parent) const [virtual]
virtual void DtSimObjectStateRepository::attachToParent ( DtString  parent) [virtual]

Looks up the parent state repository using the given echelon ID and puts it in a call to attachToParent.

Reimplemented in DtVrfObjectStateRepository.

Adds this state repository to the given parent's list of attached state repositories and updates myAttachedToRepository and myRootSimStateRepository.

The parent coordinate system is zeroed out, making this object relative to the parent instead of relative to the world.

Reimplemented in DtVrfObjectStateRepository.

Reimplemented in DtVrfObjectStateRepository.

virtual void DtSimObjectStateRepository::putData ( FILE *  fp,
int  indentLevel = 0 
) [virtual]

overridden to update myAttachedToRepositoryName before it gets written out

Reimplemented from DtReaderWriter.

Reimplemented in DtVrfObjectStateRepository.

virtual void DtSimObjectStateRepository::getSelf ( DtlObjPtr  args,
const DtFilename &  searchPath,
const DtVariableBindingsList &  variableBindings 
) [virtual]

Sets myAttachedToRepository after myAttachedToRepositoryName is read in.

Reimplemented in DtVrfObjectStateRepository, DtMissileStateRepository, DtRotaryWingEntityStateRepository, and DtVrfAggregateStateRepository.

virtual void DtSimObjectStateRepository::preGetSelf ( ) [inline, virtual]

Hook function called immediately prior to getSelf().

Reimplemented in DtVrfAggregateStateRepository, and DtHumanStateRepository.

virtual void DtSimObjectStateRepository::postGetSelf ( ) [inline, virtual]

Hook function called immediately following getSelf().

Reimplemented in DtHumanStateRepository, and DtVrfAggregateStateRepository.

static void DtSimObjectStateRepository::objectAddedCallback ( DtVrfObject *  simObject,
void *  usr 
) [static]

These callbacks are used to set myAttachedToStateRepository when this ent gets attached/detached to/from its parent.

Reimplemented in DtVrfObjectStateRepository.

Reimplemented in DtVrfObjectStateRepository.

static void DtSimObjectStateRepository::objectAboutToBeRemovedCallback ( DtVrfObject *  simObject,
void *  usr 
) [static]

Reimplemented in DtVrfObjectStateRepository.

Reimplemented in DtVrfObjectStateRepository.

Reimplemented in DtVrfObjectStateRepository.

Reimplemented in DtVrfObjectStateRepository.

virtual void DtSimObjectStateRepository::setCoordinateSystem ( const Coordinate_System *  coordinateSystem) [virtual]

Sets the coordinate system in myObjectGeometry and myKinematicState.

virtual const DtVrfObject* DtSimObjectStateRepository::vrfObject ( ) const [virtual]
virtual void DtSimObjectStateRepository::setVrfObject ( DtVrfObject *  vrfObject) [virtual]
virtual const DtVector& DtSimObjectStateRepository::bodyPosition ( ) const [virtual]

Now superseded by kinematic state parentCS functions.

Formerly meInParent.

virtual void DtSimObjectStateRepository::setBodyPosition ( const DtVector &  pos) [virtual]

Formerly setMeInParent.

virtual void DtSimObjectStateRepository::setBodyPosition ( DtFloat64  x,
DtFloat64  y,
DtFloat64  z 
) [virtual]

Formerly meToParent().

virtual void DtSimObjectStateRepository::embarkOnParent ( const DtString &  parent) [virtual]

Embarks this entity on the specified parent.

Ultimately calls attachToParent()

virtual void DtSimObjectStateRepository::removeVertex ( int  iIndex) [virtual]

These routines simply call down to the kinematic state to get/set the results.

See the kinematic state class for information on these routines

virtual void DtSimObjectStateRepository::addLocalVertex ( const DtVector &  vertex) [virtual]

These routines simply call down to the kinematic state to get/set the results.

See the kinematic state class for information on these routines

virtual void DtSimObjectStateRepository::addLocalVertex ( const DtVector &  vertex,
DtVector &  newGeometricCenter 
) [virtual]

These routines simply call down to the kinematic state to get/set the results.

See the kinematic state class for information on these routines

virtual void DtSimObjectStateRepository::setLocalVertices ( const DtLocalVertexList &  vertices,
DtVector &  newGeometricCenter 
) [virtual]

These routines simply call down to the kinematic state to get/set the results.

See the kinematic state class for information on these routines

virtual void DtSimObjectStateRepository::setLocalVertices ( const DtList &  vertices,
DtVector &  newGeometricCenter 
) [virtual]

These routines simply call down to the kinematic state to get/set the results.

See the kinematic state class for information on these routines

These routines simply call down to the kinematic state to get/set the results.

See the kinematic state class for information on these routines

These routines simply call down to the kinematic state to get/set the results.

See the kinematic state class for information on these routines

virtual void DtSimObjectStateRepository::addWorldVertex ( const DtVector &  vertex,
DtVector &  newGeometricCenter 
) [virtual]

These routines simply call down to the kinematic state to get/set the results.

See the kinematic state class for information on these routines

virtual void DtSimObjectStateRepository::setWorldVertices ( const DtVertexList &  vertices,
DtVector &  newGeometricCenter 
) [virtual]

These routines simply call down to the kinematic state to get/set the results.

See the kinematic state class for information on these routines

virtual void DtSimObjectStateRepository::setWorldVertices ( const DtList &  vertices,
DtVector &  newGeometricCenter 
) [virtual]

These routines simply call down to the kinematic state to get/set the results.

See the kinematic state class for information on these routines

virtual const DtVertexList& DtSimObjectStateRepository::worldVertices ( ) const [virtual]

These routines simply call down to the kinematic state to get/set the results.

See the kinematic state class for information on these routines

These routines simply call down to the kinematic state to get/set the results.

See the kinematic state class for information on these routines

virtual void DtSimObjectStateRepository::setRelativeVertices ( const DtLocalVertexList &  vertices) [virtual]

Access/modify vertices relative to to the parent to which this object is attached.

virtual void DtSimObjectStateRepository::setRelativeVertices ( const DtList &  vertices) [virtual]

Access/modify vertices relative to to the parent to which this object is attached.

Access/modify vertices relative to to the parent to which this object is attached.

Access/modify vertices relative to to the parent to which this object is attached.

virtual bool DtSimObjectStateRepository::leftOf ( const DtVector &  localVector) const [virtual]
virtual bool DtSimObjectStateRepository::inside ( const DtVector &  point) const [virtual]

Convenience methods for accessing corresponding methods in DtVrfKinematicState.

Convenience methods for accessing corresponding methods in DtVrfKinematicState.

Convenience methods for accessing corresponding methods in DtVrfKinematicState.

Convenience methods for accessing corresponding methods in DtVrfKinematicState.

Convenience methods for accessing corresponding methods in DtVrfKinematicState.

Convenience methods for accessing corresponding methods in DtVrfKinematicState.

Convenience methods for accessing corresponding methods in DtVrfKinematicState.

Convenience methods for accessing corresponding methods in DtVrfKinematicState.

Convenience methods for accessing corresponding methods in DtVrfKinematicState.

Convenience methods for accessing corresponding methods in DtVrfKinematicState.

const DtTaitBryan& DtSimObjectStateRepository::localOrientation ( ) const

Convenience methods for accessing corresponding methods in DtVrfKinematicState.

void DtSimObjectStateRepository::setLocalOrientation ( const DtTaitBryan &  angles)

Convenience methods for accessing corresponding methods in DtVrfKinematicState.

Convenience methods for accessing corresponding methods in DtVrfKinematicState.

Convenience methods for accessing corresponding methods in DtVrfKinematicState.

Convenience methods for accessing corresponding methods in DtVrfKinematicState.

Convenience methods for accessing corresponding methods in DtVrfKinematicState.

Convenience methods for accessing corresponding methods in DtVrfKinematicState.

Convenience methods for accessing corresponding methods in DtVrfKinematicState.

const DtTaitBryan& DtSimObjectStateRepository::worldOrientation ( ) const

Convenience methods for accessing corresponding methods in DtVrfKinematicState.

void DtSimObjectStateRepository::setWorldOrientation ( const DtTaitBryan &  angles)

Convenience methods for accessing corresponding methods in DtVrfKinematicState.

Convenience methods for accessing corresponding methods in DtVrfKinematicState.

void DtSimObjectStateRepository::setRotationalVelocity ( const DtVector &  rotationalVelocity)

Convenience methods for accessing corresponding methods in DtVrfKinematicState.

Convenience methods for accessing corresponding methods in DtVrfKinematicState.

Convenience methods for accessing corresponding methods in DtVrfKinematicState.

virtual void DtSimObjectStateRepository::setOrientationRelativeToParent ( ) [protected, virtual]

If attached to a parent, and a terrain database is present, set orientation relative to parent.

Reimplemented in DtVrfObjectStateRepository.


Member Data Documentation

used for reading & writing the name of myAttachedToRepository

Caches pointer to coordinate system so it can set it after myKinematic state is created.


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)