![]() |
VR-Forces 4.0.4 Class Documentation
|
Class Description: DtSimIndividualLocalEntityNetInterface. More...

Public Member Functions | |
| DtSimIndividualLocalEntityNetInterface (const DtString &name, DtVrfObject *vrfObject, DtReaderWriterRegistry *parentRegistry=0, bool publishObject=true) | |
| read/writable contructor | |
| DtSimIndividualLocalEntityNetInterface (const DtSimIndividualLocalEntityNetInterface &orig, DtReaderWriterRegistry *parentRegistry=0) | |
| copy constructor | |
| const DtSimIndividualLocalEntityNetInterface & | operator= (const DtSimIndividualLocalEntityNetInterface &orig) |
| assignment operator | |
| virtual | ~DtSimIndividualLocalEntityNetInterface () |
| destructor | |
| virtual void | updateNet () |
| Ticks the publisher, then calls base class version. | |
| virtual void | updatePublisher () |
| Override of base class updatePublisher(). | |
| virtual bool | createPublisher () |
| Override of base class createPublisher(). | |
| void | destroyPublisher () |
| Deletes a DtVrfEntityPublisher. | |
| virtual bool | setEntityPublisher (DtVrfEntityPublisher *publisher) |
| If the user needs to supply a publisher other than the one created by the network interface, this call call be used. | |
| virtual void | setupNetworkRepository () |
| Override of base class setupNetworkRepository(). | |
| virtual DtVrfEntityPublisher * | entityPublisher () const |
| Returns a pointer to the DtVrfEntityPublisher created. | |
| virtual DtExtEntityStateRepository * | individualNetworkState () const |
| Returns a pointer to the DtExtEntityStateRepository created by the DtVrfEntityPublisher. | |
| virtual DtVrfObjectStateRepository * | individualLocalState () const |
| Returns a pointer to the local state repository from which the network state is updated. | |
| virtual bool | isAggregate () const |
| virtual DtString | type () const |
| Returns the type of net interface object. | |
Static Public Member Functions | |
| static DtSimIndividualLocalEntityNetInterface * | isIndividualLocalEntityNetInterface (const DtSimObjectNetInterface *objNetInterface) |
| This function will return the objNetInterface passed in, cast to a DtSimIndividualLocalEntityNetInterface*, provided the objNetInterface is indeed an individual local entity network interface. | |
| static DtSimObjectNetInterface * | creator (const DtString &name, DtVrfObject *vrfObject, DtReaderWriterRegistry *parentRegistry, bool publishObject) |
Protected Member Functions | |
| DtSimIndividualLocalEntityNetInterface () | |
| default constructor | |
| virtual bool | updateVrfDataAsSeenByRemote () |
| virtual DtVector | calculateWorldVelocityFromPosition (const DtVector ¤tWorldPos, const DtVector ¤tLocalPos, const DtVector &localVelocityworldVelocity) |
| If the database is in a projected system, error is introduced in the velocity when converting it to geocentric. | |
| virtual void | updateArtPartsNetState () |
| Updates VR-Link art parts list with values from the entity's VR-Forces state repository (specifically, the tree of DtArticulatedPartStateRepositories contained within its state repository). | |
| virtual void | updateDIGuyState () |
| virtual void | updateCharacterType (const DtString &appear) |
| virtual void | updateCharacterAppearance (const DtString &appear) |
| virtual void | updateCharacterAnimation (const DtString &animation, bool paused) |
Protected Attributes | |
| DtVrfEntityPublisher * | myEntityPublisher |
| DtTime | myTimeLastCharacterAppearanceSent |
| DtTime | myTimeLastCharacterTypeSent |
| DtTime | myTimeLastAnimationSent |
| bool | myFirstTick |
| bool | myPublishDIGuy |
Static Protected Attributes | |
| static DtTime | theDiGuyCustomPduThreshold |
Class Description: DtSimIndividualLocalEntityNetInterface.
Derived from DtSimLocalEntityNetInterface, this class provides an interface between an individual local entity (such as a single truck, tank, soldier, etc.) and its network (VR-Link) representation (A DtVrfEntityPublisher).
default constructor
| DtSimIndividualLocalEntityNetInterface::DtSimIndividualLocalEntityNetInterface | ( | const DtString & | name, |
| DtVrfObject * | vrfObject, | ||
| DtReaderWriterRegistry * | parentRegistry = 0, |
||
| bool | publishObject = true |
||
| ) |
read/writable contructor
| DtSimIndividualLocalEntityNetInterface::DtSimIndividualLocalEntityNetInterface | ( | const DtSimIndividualLocalEntityNetInterface & | orig, |
| DtReaderWriterRegistry * | parentRegistry = 0 |
||
| ) |
copy constructor
| virtual DtSimIndividualLocalEntityNetInterface::~DtSimIndividualLocalEntityNetInterface | ( | ) | [virtual] |
destructor
| const DtSimIndividualLocalEntityNetInterface& DtSimIndividualLocalEntityNetInterface::operator= | ( | const DtSimIndividualLocalEntityNetInterface & | orig | ) |
assignment operator
| virtual void DtSimIndividualLocalEntityNetInterface::updateNet | ( | ) | [virtual] |
Ticks the publisher, then calls base class version.
Reimplemented from DtSimLocalEntityNetInterface.
| virtual void DtSimIndividualLocalEntityNetInterface::updatePublisher | ( | ) | [virtual] |
Override of base class updatePublisher().
Fills in the DtVrfEntityPublisher with values from the local entity state repository. Called by tick().
Implements DtSimLocalEntityNetInterface.
Reimplemented in MyIndividualLocalEntityNetInterface.
| virtual bool DtSimIndividualLocalEntityNetInterface::createPublisher | ( | ) | [virtual] |
Override of base class createPublisher().
Creates a DtVrfEntityPublisher. Sets the DtVrfEntityIdentifier to the next available identifier from the exerciseConnection. Sets the myNetworkState member to the state repository of the publisher. Sets the vrfObject's global ID to the entity publisher's global ID. Sets the myPublisherUserSupplied member to false.
Implements DtSimLocalEntityNetInterface.
| void DtSimIndividualLocalEntityNetInterface::destroyPublisher | ( | ) | [virtual] |
Deletes a DtVrfEntityPublisher.
Implements DtSimLocalEntityNetInterface.
| virtual bool DtSimIndividualLocalEntityNetInterface::setEntityPublisher | ( | DtVrfEntityPublisher * | publisher | ) | [virtual] |
If the user needs to supply a publisher other than the one created by the network interface, this call call be used.
If the myPublisher pointer is not null and it myPublisherUserSupplied flag is false then the interface will first destroy the current publisher; otherwise a warning is generated and false is returned. The interface's destructor will not destroy a user-supplied publisher - that is the responsibility of the publisher's creator. If you need to change a user-supplied publisher to a different one, first call setPublisher with a value of 0 (Null). This will set the myPublisherUserSupplied flag to false.
| virtual void DtSimIndividualLocalEntityNetInterface::setupNetworkRepository | ( | ) | [virtual] |
Override of base class setupNetworkRepository().
Initializes the DtExtEntityStateRepository created by the DtVrfEntityPublisher (which this class creates).
Implements DtSimLocalEntityNetInterface.
| virtual DtVrfEntityPublisher* DtSimIndividualLocalEntityNetInterface::entityPublisher | ( | ) | const [virtual] |
Returns a pointer to the DtVrfEntityPublisher created.
| virtual DtExtEntityStateRepository* DtSimIndividualLocalEntityNetInterface::individualNetworkState | ( | ) | const [virtual] |
Returns a pointer to the DtExtEntityStateRepository created by the DtVrfEntityPublisher.
| virtual DtVrfObjectStateRepository* DtSimIndividualLocalEntityNetInterface::individualLocalState | ( | ) | const [virtual] |
Returns a pointer to the local state repository from which the network state is updated.
This method checks to make sure the local state repository is indeed a DtSimIndividualLocalStateRepository, and returns 0 if it isn't.
| virtual bool DtSimIndividualLocalEntityNetInterface::isAggregate | ( | ) | const [inline, virtual] |
Implements DtSimLocalEntityNetInterface.
| virtual DtString DtSimIndividualLocalEntityNetInterface::type | ( | ) | const [virtual] |
Returns the type of net interface object.
Strings are defined in netIfTypes.h.
Implements DtSimObjectNetInterface.
Reimplemented in MyIndividualLocalEntityNetInterface.
| static DtSimIndividualLocalEntityNetInterface* DtSimIndividualLocalEntityNetInterface::isIndividualLocalEntityNetInterface | ( | const DtSimObjectNetInterface * | objNetInterface | ) | [static] |
This function will return the objNetInterface passed in, cast to a DtSimIndividualLocalEntityNetInterface*, provided the objNetInterface is indeed an individual local entity network interface.
| static DtSimObjectNetInterface* DtSimIndividualLocalEntityNetInterface::creator | ( | const DtString & | name, |
| DtVrfObject * | vrfObject, | ||
| DtReaderWriterRegistry * | parentRegistry, | ||
| bool | publishObject | ||
| ) | [static] |
Reimplemented in MyIndividualLocalEntityNetInterface.
| virtual bool DtSimIndividualLocalEntityNetInterface::updateVrfDataAsSeenByRemote | ( | ) | [protected, virtual] |
| virtual DtVector DtSimIndividualLocalEntityNetInterface::calculateWorldVelocityFromPosition | ( | const DtVector & | currentWorldPos, |
| const DtVector & | currentLocalPos, | ||
| const DtVector & | localVelocityworldVelocity | ||
| ) | [protected, virtual] |
If the database is in a projected system, error is introduced in the velocity when converting it to geocentric.
To avoid this problem, use the current geocentric position and then using local velocity create a projected point 1 sec in the future. Convert it to geocentric and subract the 2 to get the geocentric velocity.
| virtual void DtSimIndividualLocalEntityNetInterface::updateArtPartsNetState | ( | ) | [protected, virtual] |
Updates VR-Link art parts list with values from the entity's VR-Forces state repository (specifically, the tree of DtArticulatedPartStateRepositories contained within its state repository).
Called by updatePublisher().
| virtual void DtSimIndividualLocalEntityNetInterface::updateDIGuyState | ( | ) | [protected, virtual] |
| virtual void DtSimIndividualLocalEntityNetInterface::updateCharacterType | ( | const DtString & | appear | ) | [protected, virtual] |
| virtual void DtSimIndividualLocalEntityNetInterface::updateCharacterAppearance | ( | const DtString & | appear | ) | [protected, virtual] |
| virtual void DtSimIndividualLocalEntityNetInterface::updateCharacterAnimation | ( | const DtString & | animation, |
| bool | paused | ||
| ) | [protected, virtual] |
DtTime DtSimIndividualLocalEntityNetInterface::myTimeLastCharacterAppearanceSent [protected] |
DtTime DtSimIndividualLocalEntityNetInterface::myTimeLastCharacterTypeSent [protected] |
DtTime DtSimIndividualLocalEntityNetInterface::myTimeLastAnimationSent [protected] |
DtTime DtSimIndividualLocalEntityNetInterface::theDiGuyCustomPduThreshold [static, protected] |