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

End User Description: DtActuator is the base class for all actuator model components. More...

Inheritance diagram for DtActuatorComponent:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual ~DtActuatorComponent ()
 destructor
virtual bool init ()
 Overridden to cache a pointer to the entity's radio in this class.
virtual DtSimBaseRadioradio ()
virtual bool tickWhileDestroyed () const
 By default, all actuators tick when the entity is destroyed.

Protected Member Functions

 DtActuatorComponent (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 (const DtString& name,
 DtActuatorComponent (const DtActuatorComponent &orig)
 copy constructor
const DtActuatorComponentoperator= (const DtActuatorComponent &orig)
 assignment operator
virtual void setRadio (DtSimBaseRadio *radio)
 DtActuatorComponent ()
 Default constructor; should not be called.

Protected Attributes

DtSimBaseRadiomyRadio
 Actuators can send messages.

Detailed Description

End User Description: DtActuator is the base class for all actuator model components.


Developer Description: The DtActuator base class caches a pointer to the entity's radio for convenience. Derived classes may have articulated parts that are configured from the DtActuatorComponentDescriptor's DtSimArtPartDescriptorList. For each articulated part in the list a DtArticulatedPartStateRepository will be created to store the data for the part such as it's location, rotation and so forth. These are created in the entity's DtVrfObjectStateRepository createParts() function. This call creates all the attached parts for all the actuators. These articulated state repositories are managed by the DtAttachmentManager. They are cached by their partType which is the DIS Enumeration describing the part from the disEnums.h file and was specified in the actuator's DtActuatorComponentDescriptor as descriped above. The partType is used as the category of the DtObjectType used to look up articulated parts in the DtAttachementManager. When an actuator needs access to a particular articulated part it looks it up by the part's object type.

For example:


  DtObjectType rotatingPartType(DtObjectTypeOther, DtSimArtPartKind, 0, 0, artPartDescriptor->partType(), 0, 0, 0);
  myArtPartStateRep = dynamic_cast<DtArticulatedPartStateRepository*>(localStateRepository()->
                                                 attachments()->findPartByType(rotatingPartType));

Constructor & Destructor Documentation

DtActuatorComponent::DtActuatorComponent ( const DtString name,
DtVrfObject owner,
DtSimManager simManager,
DtComponentDescriptor desc = 0,
DtReaderWriterRegistry parentRegistry = 0 
) [protected]

(const DtString& name,

Parameters:
nameReader writer name of this component.
ownerThe DtVrfObject that owns this component
simManagerThe simulation manager (provides access to terrain, message interface, simulation clock).
descThe component descriptor used to initialize this component.
parentRegistryPointer to the parent reader writer registry (the containing object that reads/writes this object).
(const DtString& name, DtVrfObject* owner, DtSimManager* simManager, DtComponentDescriptor* desc = 0, DtReaderWriterRegistry* parentRegistry = 0)

copy constructor

destructor

Default constructor; should not be called.

Here because the compiler will generate an unprotected one otherwise.


Member Function Documentation

const DtActuatorComponent& DtActuatorComponent::operator= ( const DtActuatorComponent orig) [protected]

assignment operator

virtual bool DtActuatorComponent::init ( ) [virtual]
Returns:
Pointer to our entity's radio.
virtual bool DtActuatorComponent::tickWhileDestroyed ( ) const [virtual]

By default, all actuators tick when the entity is destroyed.

Returns:
true.

Reimplemented from DtSimComponent.

virtual void DtActuatorComponent::setRadio ( DtSimBaseRadio radio) [protected, virtual]

Member Data Documentation

Actuators can send messages.

Of course, if your actuator never will, you don't have to use this.


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)