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

Class Description: DtSimIndividualLocalEntityNetInterface. More...

Inheritance diagram for DtSimIndividualLocalEntityNetInterface:
Inheritance graph
[legend]

List of all members.

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 DtVrfEntityPublisherentityPublisher () 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 DtSimObjectNetInterfacecreator (const DtString &name, DtVrfObject *vrfObject, DtReaderWriterRegistry *parentRegistry, bool publishObject)

Protected Member Functions

 DtSimIndividualLocalEntityNetInterface ()
 default constructor
virtual bool updateVrfDataAsSeenByRemote ()
virtual DtVector calculateWorldVelocityFromPosition (const DtVector &currentWorldPos, const DtVector &currentLocalPos, 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

DtVrfEntityPublishermyEntityPublisher
DtTime myTimeLastCharacterAppearanceSent
DtTime myTimeLastCharacterTypeSent
DtTime myTimeLastAnimationSent
bool myFirstTick
bool myPublishDIGuy

Static Protected Attributes

static DtTime theDiGuyCustomPduThreshold

Detailed Description

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

Examples

Constructor & Destructor Documentation

default constructor

DtSimIndividualLocalEntityNetInterface::DtSimIndividualLocalEntityNetInterface ( const DtString name,
DtVrfObject vrfObject,
DtReaderWriterRegistry parentRegistry = 0,
bool  publishObject = true 
)

read/writable contructor

copy constructor

destructor


Member Function Documentation

const DtSimIndividualLocalEntityNetInterface& DtSimIndividualLocalEntityNetInterface::operator= ( const DtSimIndividualLocalEntityNetInterface orig)

assignment operator

Ticks the publisher, then calls base class version.

Reimplemented from DtSimLocalEntityNetInterface.

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.

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.

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.

Override of base class setupNetworkRepository().

Initializes the DtExtEntityStateRepository created by the DtVrfEntityPublisher (which this class creates).

Implements DtSimLocalEntityNetInterface.

Returns a pointer to the DtVrfEntityPublisher created.

Returns a pointer to the DtExtEntityStateRepository created by the DtVrfEntityPublisher.

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]

Returns the type of net interface object.

Strings are defined in netIfTypes.h.

Implements DtSimObjectNetInterface.

Reimplemented in MyIndividualLocalEntityNetInterface.

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

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]

Member Data Documentation


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)