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

DtGroundJoyMoveController is a controller that enables joystick control of a ground vehicle. More...

Inheritance diagram for DtGroundJoyMoveController:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 DtGroundJoyMoveController (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc, DtReaderWriterRegistry *parentRegistry=0)
 (const DtString&,DtVrfObject*,DtSimManager*,
virtual ~DtGroundJoyMoveController ()
 destructor
virtual void tick ()
 Calculate new control values.
virtual DtString type () const
 Returns a string identifies the class type of component.
virtual void setComponentDescriptor (DtComponentDescriptor *descriptor)
 Attempts to cast the descriptor to a DtGroundJoyDeviceControllerDescriptor and store it in myJoyDeviceControllerDescriptor.
virtual void processSetJoyDeviceSwitch (DtSimMessage *msg)
virtual void calcAndSetPortValues ()
virtual bool joystickEnabled () const
virtual bool collisionDetected ()

Static Public Member Functions

static void setJoyDeviceSwitchCallbacks (DtSimMessage *msg, void *usrData)
 Forwards a DtSetJoyDeviceSwitchRequest message to the joy controller pointed to by usrData.
static DtSimComponentcreator (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 (const DtString&,DtVrfObject*,DtSimManager*,

Protected Member Functions

virtual void initializeJoyDevice ()
 Obtain the joyDevice and initialize it.
virtual void setRadio (DtSimRadio *radio)
 Overrides this so it can register its interest in the set commands.
virtual bool detectCollision ()
virtual void collideWithLifeform (DtVrfObject *)

Protected Attributes

DtJoyDevice * myJoyDevice
bool myInitialized
int myCurrentGear
bool myCollisionDetected
bool myInternalCollisionDetected
const
DtGroundJoyDeviceControllerDescriptor
myJoyDeviceControllerDescriptor
bool myJoystickEnabled

Private Member Functions

 DtGroundJoyMoveController ()
 default constructor; not implemented.
 DtGroundJoyMoveController (const DtGroundJoyMoveController &orig)
 copy constructor; not implemented.
DtGroundJoyMoveControlleroperator= (const DtGroundJoyMoveController &orig)
 assignment operator; not implemented.

Detailed Description

DtGroundJoyMoveController is a controller that enables joystick control of a ground vehicle.

Uses Descriptor Type: DtGroundJoyDeviceControllerDescriptor


Constructor & Destructor Documentation

DtGroundJoyMoveController::DtGroundJoyMoveController ( const DtString name,
DtVrfObject owner,
DtSimManager simManager,
DtComponentDescriptor desc,
DtReaderWriterRegistry parentRegistry = 0 
)

(const DtString&,DtVrfObject*,DtSimManager*,

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&,DtVrfObject*,DtSimManager*, DtComponentDescriptor*,DtReaderWriterRegistry* parentRegistry)

destructor

default constructor; not implemented.

copy constructor; not implemented.


Member Function Documentation

virtual void DtGroundJoyMoveController::tick ( ) [virtual]

Calculate new control values.

Reimplemented from DtSimComponent.

virtual DtString DtGroundJoyMoveController::type ( ) const [virtual]

Returns a string identifies the class type of component.

Type values are defined in compTypes.h. DtSimComponent creation functions are registered with the DtSimComponentFactory using the type values as the key.

Returns:
DtGroundJoyMoveControllerType

Reimplemented from DtGroundAutoControllerComponent.

Attempts to cast the descriptor to a DtGroundJoyDeviceControllerDescriptor and store it in myJoyDeviceControllerDescriptor.

Reimplemented from DtSimComponent.

static void DtGroundJoyMoveController::setJoyDeviceSwitchCallbacks ( DtSimMessage msg,
void *  usrData 
) [static]

Forwards a DtSetJoyDeviceSwitchRequest message to the joy controller pointed to by usrData.

virtual bool DtGroundJoyMoveController::joystickEnabled ( ) const [virtual]
static DtSimComponent* DtGroundJoyMoveController::creator ( const DtString name,
DtVrfObject owner,
DtSimManager simManager,
DtComponentDescriptor desc = 0,
DtReaderWriterRegistry parentRegistry = 0 
) [static]

(const DtString&,DtVrfObject*,DtSimManager*,

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&,DtVrfObject*,DtSimManager*, DtComponentDescriptor*,DtReaderWriterRegistry* parentRegistry)

Returns:
New instance of this class.
DtGroundJoyMoveController& DtGroundJoyMoveController::operator= ( const DtGroundJoyMoveController orig) [private]

assignment operator; not implemented.

virtual void DtGroundJoyMoveController::initializeJoyDevice ( ) [protected, virtual]

Obtain the joyDevice and initialize it.

virtual void DtGroundJoyMoveController::setRadio ( DtSimRadio radio) [protected, virtual]

Overrides this so it can register its interest in the set commands.

Reimplemented from DtTaskControllerComponent.

virtual bool DtGroundJoyMoveController::detectCollision ( ) [protected, virtual]
virtual void DtGroundJoyMoveController::collideWithLifeform ( DtVrfObject ) [protected, virtual]

Member Data Documentation

DtJoyDevice* DtGroundJoyMoveController::myJoyDevice [protected]

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)