![]() |
VR-Forces 4.1 Class Documentation
|
class DtSimKinematicState: This class encapsulates the kinematic state of an object wrt to the local (database) and network (geocentric) coordinate systems, as well as wrt it's own parent for attached objects such as launchers. More...

Public Member Functions | |
| DtSimKinematicState (DtSimObjectStateRepository *stateRep, const DtString &name=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=NULL) | |
| Constructor. | |
| DtSimKinematicState (DtSimObjectStateRepository *stateRep, const DtSymbolString &name, DtReaderWriterRegistry *parentRegistry=NULL) | |
| DtSimKinematicState (const DtSimKinematicState &orig, const DtString &name=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0) | |
| Copy Constructor. | |
| DtSimKinematicState (const DtSimKinematicState &orig, const DtSymbolString &name, DtReaderWriterRegistry *parentRegistry=0) | |
| const DtSimKinematicState & | operator= (const DtSimKinematicState &orig) |
| Assignment Operator. | |
| virtual | ~DtSimKinematicState () |
| Destructor. | |
| virtual DtSimKinematicState * | clone (const DtString &name=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=NULL) const |
| Clone. | |
| virtual DtSimKinematicState * | clone (const DtSymbolString &name, DtReaderWriterRegistry *parentRegistry=NULL) const |
| virtual const DtVector & | parentPosition () const |
| virtual void | setParentPosition (const DtVector &position) |
| virtual const DtVector & | parentVelocity () const |
| virtual void | setParentVelocity (const DtVector &velocity, bool recomputeSpeed=true) |
| virtual DtReal | parentSpeed () const |
| virtual const DtVector & | parentAcceleration () const |
| virtual void | setParentAcceleration (const DtVector &acceleration) |
| virtual const DtTaitBryan & | parentOrientation () const |
| virtual void | setParentOrientation (const DtTaitBryan &orientation, DtKinematicStateCS::DtRotationConstraint recomputeMatrix=DtKinematicStateCS::RotateAboutX) |
| virtual const DtDcm & | parentOrientationMatrix () const |
| virtual void | setParentOrientationMatrix (const DtDcm &orientationMatrix, bool recomputeEulers=true) |
| virtual const DtVector & | worldPosition () const |
| virtual void | setWorldPosition (const DtVector &position) |
| virtual const DtVector & | worldVelocity () const |
| virtual void | setWorldVelocity (const DtVector &velocity, bool recomputeSpeed=true) |
| virtual DtReal | worldSpeed () const |
| virtual const DtVector & | worldAcceleration () const |
| virtual void | setWorldAcceleration (const DtVector &acceleration) |
| virtual const DtTaitBryan & | worldOrientation () const |
| virtual void | setWorldOrientation (const DtTaitBryan &orientation, DtKinematicStateCS::DtRotationConstraint recomputeMatrix=DtKinematicStateCS::RotateAboutX) |
| virtual const DtDcm & | worldOrientationMatrix () const |
| virtual void | setWorldOrientationMatrix (const DtDcm &orientationMatrix, bool recomputeEulers=true) |
| virtual DtVector | bodyVelocity () const |
| virtual DtTaitBryan | topoEuler () const |
| virtual double | heading () const |
| virtual double | pitch () const |
| virtual double | roll () const |
| virtual const DtVector & | rotationalVelocity () const |
| virtual void | setRotationalVelocity (const DtVector &rotationalVelocity) |
| virtual DtKinematicStateCS::DtRotationConstraint | rotationConstraint () const |
| virtual void | setRotationConstraint (DtKinematicStateCS::DtRotationConstraint constraint) |
| virtual DtKinematicStateCS::DtSimOrientationType | orientationType () const |
| Wrapper for DtKinematicStateCS functions. | |
| virtual void | setOrientationType (DtKinematicStateCS::DtSimOrientationType orientationType) |
| virtual DtSimObjectStateRepository * | stateRepository () const |
| virtual void | parentKinematicsChanged () |
| DtCoordSysValidationVector & | parentVV () |
| DtCoordSysValidationVector & | worldVV () |
| virtual void | putSelf (FILE *fp, int indentLevel=0, bool writeUnspecified=false, const DtFilename &path=DtReaderWriter::appPath()) |
| Override to check for invalid parent and world state date before writing self to file. | |
| virtual void | validateParentState () |
| Validates all values (if they are invalid) including world and parent. | |
| virtual void | validateWorldState () |
| virtual void | validateState () |
| virtual void | clearWorldVertices () |
| Clears out vertex list. | |
| virtual void | copyWorldVertices (const DtList &) |
| virtual void | addWorldVertex (const DtVector &vertex, DtVector &newGeometricCenter) |
| Object geometry methods – these methods reference some information in the world kinematic state. | |
| virtual void | setWorldVertices (const DtVertexList &vertices, DtVector &newGeometricCenter) |
| Sets world vertices and translates them to body coordinates. | |
| virtual void | setWorldVertices (const DtList &vertices, DtVector &newGeometricCenter) |
| virtual const DtVertexList & | worldVertices () const |
| Returns world vertices and iterator of world vertices. | |
| virtual const DtRwVectorIterator & | worldVertexIterator () const |
| virtual void | removeVertex (int) |
| Removes vertex at the specified position. | |
| virtual void | setGeometryNeedsUpdate (bool) |
| Sets flags to update vertices. | |
| virtual void | invalidateWorldGeometry () |
| Sets the myObjectGeometryInvalid flag to true. | |
Public Member Functions inherited from DtReaderWriter | |
| DtReaderWriter () | |
| default constructor | |
| DtReaderWriter (const DtString &name, DtReaderWriterRegistry *parentRegistry=NULL, bool readonly=false) | |
| real constructor Setting the readonly flag prevents object from writing itself to the stream. | |
| DtReaderWriter (const DtSymbolString &name, DtReaderWriterRegistry *parentRegistry=NULL, bool readonly=false) | |
| DtReaderWriter (const DtString &name, const DtReaderWriter &orig, DtReaderWriterRegistry *parentRegistry=NULL) | |
| copy constructor | |
| DtReaderWriter (const DtSymbolString &name, const DtReaderWriter &orig, DtReaderWriterRegistry *parentRegistry=NULL) | |
| const DtReaderWriter & | operator= (const DtReaderWriter &orig) |
| assignment operator | |
| virtual | ~DtReaderWriter () |
| destructor | |
| virtual void | getSelf (DtlObjPtr args, const DtFilename &searchPath=DtFilename::nullFilename(), const DtVariableBindingsList &variableBindings=nullVariableReference()) |
| Top level to read itself from an input stream. | |
| virtual void | writeSelf (FILE *fp, int indentLevel=0, bool writeUnspecified=false, const DtFilename &path=DtFilename::nullFilename()) |
| Called from putSelf, calls myRegistry.putSelf which in turn calls putSelf on each reader/writer in the registry. | |
| virtual DtSymbolString | name () const |
| Accessor for name of this readable/writable object. | |
| virtual void | addAlias (const DtSymbolString &alias) |
| Add an alias as an alternative name for this object. | |
| virtual bool | hasAlias (const DtSymbolString &alias) |
| virtual const aliasContainer & | aliases () const |
| virtual void | setReadonly (bool flag) |
| Set read-only flag. | |
| virtual bool | isReadonly () const |
| virtual bool | variableIsBound () const |
| virtual void | unbindVariable () |
| Sets the myVariableIsBound flag to false. | |
| virtual void | setName (const DtString &) |
| Set the name of the object. | |
| virtual const char * | readerWriterType () const |
| Used to supply a string type that this reader writer type is. | |
| virtual DtString | prettyPrint () const |
| Routine to return a human readable form of the reader/writer variable. | |
| virtual void | bindVariables (DtVariableBindingsList variableBindings) |
| Runs a variable binding pass on this reader writer and any of its children. | |
| virtual std::list < DtVariableNameType > | unboundVariables () const |
| bool | invalid () const |
| virtual bool | hasChild (const DtReaderWriter *p) const |
| Returns true if this variable has a child p in it's chain. | |
| virtual void | setValueSpecified (bool specified, bool recurse=false) |
| The specified flags are used for optional values. | |
| virtual bool | valueSpecified () const |
| The specified flags are used for optional values. | |
| virtual bool | isVariableReference () const |
| Specifies whether or not this reader writer is really a variable that is specified elsewhere. | |
| virtual void | setIsVariableReference (bool value) |
| virtual DtSymbolString | variableName () const |
| The variable name, if this object is a variable reference. | |
| virtual void | setVariableName (const DtSymbolString variableName) |
| The variable name, if this object is a variable reference. | |
| const DtReaderWriterRegistry & | registry () const |
| Collection of child DtReaderWriter nodes owned by this object. | |
| DtReaderWriterRegistry & | registry () |
| Collection of child DtReaderWriter nodes owned by this object. | |
Protected Member Functions | |
| virtual const DtKinematicStateCS & | parentKinematicState () const |
| Get / set kinematic state in parent coords. | |
| virtual DtKinematicStateCS & | parentKinematicState () |
| virtual void | setParentKinematicState (const DtKinematicStateCS &parentKinematicState) |
| virtual const DtKinematicStateCS & | worldKinematicState () const |
| Get / set kinematic state in world coords. | |
| virtual DtKinematicStateCS & | worldKinematicState () |
| virtual void | setWorldKinematicState (const DtKinematicStateCS &worldKinematicState) |
| virtual void | setWorldPositionFromParent () |
| Update the world position from the parent's position. | |
| virtual void | setWorldOrientationFromParent () |
| Update the world orientation from the parent's orientation. | |
| virtual bool | calculateGeometricCenter (const DtList &vertices, DtVector &geometricCenter) const |
| Given the list, finds the geometric center of the points in the list. | |
| virtual void | calculateBodyCoordinates (const DtList &worldVertices) |
| Given the current world position and world orientation, calculate body coordinates. | |
Protected Member Functions inherited from DtReaderWriter | |
| virtual void | bindToRwAsVariable (const DtReaderWriter *rw) |
| Copies values from the specified DtReaderWriter. | |
| virtual void | bindLocalVariables (const DtVariableBindingsList &variableBindings) |
| Checks to see if this RW object is a variable reference that can be bound using the provided bindings. | |
| virtual void | putData (FILE *fp, int indentLevel=0) |
| Deriving class overrides these to get/put class specific data. | |
| virtual DtlObjPtr | getData (DtlObjPtr args, const DtFilename &searchPath, const DtVariableBindingsList &variableBindings) |
| Deriving class overrides these to get/put class specific data. | |
Protected Attributes | |
| DtKinematicStateCS | myParentKinematicState |
| position, velocity, acceleration, orientation (Euler and DCM), and rotational velocity in parent's coordinate system | |
| DtKinematicStateCS | myWorldKinematicState |
| position, velocity, acceleration, orientation (Euler and DCM), and rotational velocity in database coordinate system (same as parent for base object) | |
| DtVertexList | myWorldVertices |
| DtCoordSysValidationVector | myParentVV |
| XXX This will not be here... | |
| DtCoordSysValidationVector | myWorldVV |
| DtRwVector | myRotationalVelocity |
| this is the rate at which the object is rolling, pitching and yawing | |
| DtSimObjectStateRepository * | myStateRepository |
| DtTaitBryan | myTopoEuler |
| bool | myTopoInvalid |
| bool | myObjectGeometryInvalid |
| If true, and if this item is attached to a parent, redo object geometry. | |
Protected Attributes inherited from DtReaderWriter | |
| const DtSymbolString | myName |
| DtReaderWriterRegistry | myRegistry |
| bool | myValueSpecified |
| bool | myReadOnlyFlag |
| bool | myIsVariableReference |
| DtSymbolString | myVariableName |
| bool | myVariableIsBound |
| aliasContainer | myAliases |
| Container for the aliases which represent alternative names for the object. | |
| bool | myInvalid |
| Set to true if there is a problem reading this item. | |
Private Member Functions | |
| DtSimKinematicState () | |
| Default Constructor. Do not use. | |
Additional Inherited Members | |
Public Types inherited from DtReaderWriter | |
| typedef std::vector < DtSymbolString > | aliasContainer |
| typedef std::vector < DtSymbolString >::iterator | aliasIter |
| typedef std::vector < DtSymbolString > ::const_iterator | aliasConstIter |
| typedef std::pair < DtSymbolString, DtString > | DtVariableNameType |
Static Public Member Functions inherited from DtReaderWriter | |
| static void | putIndent (FILE *fp, int indentLevel) |
| static const DtVariableBindingsList & | nullVariableReference () |
| static void | setPostGetSelfCallback (DtGetSelfCallbackFcn fcn, void *usrData) |
| static void | setPrePutSelfCallback (DtPutSelfCallbackFcn fcn, void *usrData) |
| static const DtFilename & | appPath () |
| Gets the current working directory. | |
| static DtReaderWriterFactory * | factory () |
Static Protected Attributes inherited from DtReaderWriter | |
| static DtString | theUnspecifiedValue |
| static DtGetSelfCallbackInfo | thePostGetSelfCallback |
| static DtPutSelfCallbackInfo | thePrePutSelfCallback |
| static const DtVariableBindingsList | theEmptyVariableBindingsList |
| static DtReaderWriterFactory | theFactory |
class DtSimKinematicState: This class encapsulates the kinematic state of an object wrt to the local (database) and network (geocentric) coordinate systems, as well as wrt it's own parent for attached objects such as launchers.
| DtSimKinematicState::DtSimKinematicState | ( | DtSimObjectStateRepository * | stateRep, |
| const DtString & | name = DtString::nullString(), |
||
| DtReaderWriterRegistry * | parentRegistry = NULL |
||
| ) |
Constructor.
| DtSimKinematicState::DtSimKinematicState | ( | DtSimObjectStateRepository * | stateRep, |
| const DtSymbolString & | name, | ||
| DtReaderWriterRegistry * | parentRegistry = NULL |
||
| ) |
| DtSimKinematicState::DtSimKinematicState | ( | const DtSimKinematicState & | orig, |
| const DtString & | name = DtString::nullString(), |
||
| DtReaderWriterRegistry * | parentRegistry = 0 |
||
| ) |
Copy Constructor.
| DtSimKinematicState::DtSimKinematicState | ( | const DtSimKinematicState & | orig, |
| const DtSymbolString & | name, | ||
| DtReaderWriterRegistry * | parentRegistry = 0 |
||
| ) |
|
virtual |
Destructor.
|
private |
Default Constructor. Do not use.
| const DtSimKinematicState& DtSimKinematicState::operator= | ( | const DtSimKinematicState & | orig | ) |
Assignment Operator.
|
virtual |
Clone.
Reimplemented in DtVrfKinematicState.
|
virtual |
|
virtual |
|
virtual |
Reimplemented in DtVrfKinematicState.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Reimplemented in DtVrfKinematicState.
|
virtual |
|
virtual |
|
virtual |
Reimplemented in DtVrfKinematicState.
|
virtual |
Reimplemented in DtVrfKinematicState.
|
virtual |
Reimplemented in DtVrfKinematicState.
|
virtual |
Reimplemented in DtVrfKinematicState.
|
virtual |
|
virtual |
Reimplemented in DtVrfKinematicState.
|
virtual |
Reimplemented in DtVrfKinematicState.
|
virtual |
Reimplemented in DtVrfKinematicState.
|
virtual |
Reimplemented in DtVrfKinematicState.
|
virtual |
|
virtual |
Reimplemented in DtVrfKinematicState.
|
virtual |
Reimplemented in DtVrfKinematicState.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Reimplemented in DtVrfKinematicState.
|
virtual |
Wrapper for DtKinematicStateCS functions.
|
virtual |
|
virtual |
|
virtual |
Reimplemented in DtVrfKinematicState.
| DtCoordSysValidationVector& DtSimKinematicState::parentVV | ( | ) |
| DtCoordSysValidationVector& DtSimKinematicState::worldVV | ( | ) |
|
virtual |
Override to check for invalid parent and world state date before writing self to file.
Updates position and orientation as needed and then call base class putSelf().
Reimplemented from DtReaderWriter.
|
virtual |
Validates all values (if they are invalid) including world and parent.
|
virtual |
|
virtual |
Reimplemented in DtVrfKinematicState.
|
virtual |
Clears out vertex list.
|
virtual |
|
virtual |
Object geometry methods – these methods reference some information in the world kinematic state.
Adds a new vertex to the world geometry (translating to body)
|
virtual |
Sets world vertices and translates them to body coordinates.
|
virtual |
Reimplemented in DtVrfKinematicState.
|
virtual |
Returns world vertices and iterator of world vertices.
|
virtual |
|
virtual |
Removes vertex at the specified position.
Reimplemented in DtVrfKinematicState.
|
inlinevirtual |
Sets flags to update vertices.
Reimplemented in DtVrfKinematicState.
References myObjectGeometryInvalid.
|
virtual |
Sets the myObjectGeometryInvalid flag to true.
Should be called by anyone who sets the object geometry without going though this class.
|
protectedvirtual |
Get / set kinematic state in parent coords.
I don't expect the set version to be used, but it's included for completeness.
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
Get / set kinematic state in world coords.
I don't expect the set version to be used, but it's included for completeness.
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
Update the world position from the parent's position.
|
protectedvirtual |
Update the world orientation from the parent's orientation.
|
protectedvirtual |
Given the list, finds the geometric center of the points in the list.
|
protectedvirtual |
Given the current world position and world orientation, calculate body coordinates.
Note that the resultant coordinates will be placed in the object geometry of the DtVrfObjectGeometry of the state repository class
|
protected |
position, velocity, acceleration, orientation (Euler and DCM), and rotational velocity in parent's coordinate system
|
protected |
position, velocity, acceleration, orientation (Euler and DCM), and rotational velocity in database coordinate system (same as parent for base object)
DtKinematicStateCS myLocalKinematicState; position, velocity, acceleration, orientation (Euler and DCM), and rotational velocity in geocentric coordinate system
|
mutableprotected |
|
protected |
XXX This will not be here...
This belongs in the network interface. just have to figure out how it gets set. –> DtDeadReckonTypes myDeadReckoningAlgorithm;
|
protected |
|
protected |
this is the rate at which the object is rolling, pitching and yawing
|
protected |
|
protected |
|
protected |
|
mutableprotected |
If true, and if this item is attached to a parent, redo object geometry.
Referenced by setGeometryNeedsUpdate().