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

End User Description: This controller handles DtLaunchSmokeTask tasks on an entity, and creates one or more tactical smoke clouds when the task executes. More...

Inheritance diagram for DtLaunchSmokeController:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 DtLaunchSmokeController (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=NULL, DtReaderWriterRegistry *parentRegistry=0)
 constructor
virtual ~DtLaunchSmokeController ()
 destructor
 DtLaunchSmokeController (const DtLaunchSmokeController &orig)
 copy constructor
DtLaunchSmokeControlleroperator= (const DtLaunchSmokeController &orig)
 assignment operator
virtual DtString type () const
 This returns the string TestLaunchSmokeControllerType (defined above), used to uniquely identify the type of component.
virtual void registerTaskMsgCallbacks ()
 Register a callback for task notification.
virtual void processLaunchSmokeTask (DtSimMessage *msg)
 Called by LaunchSmokeTaskCallback() when a new DtLaunchSmokeTask message is received.
virtual bool init ()
 Calculates myPoints, myArcRange from the descriptor parameters and stores them for use when the smoke is launched.
virtual void tick ()
 Update control values.
virtual bool useSmokeBomb ()
 Tries to use a single smoke bomb resource; Return true if successful.
virtual bool launchSmoke ()
 Launch smoke based on myLaunchAtNearestThreat flag.
virtual void sendDetonation (const DtVector &geocLoc) const
 Sends detonations at the specified location.
virtual void launchSmokeTowards (double heading)
 Launch smoke towards to given compass heading.
virtual double calculateHeadingTowards (DtRwSensorContactInfo *closest) const
 Calculate the heading towards the given entity.
virtual DtRwSensorContactInfofindClosestThreat () const
 Calculate the closest threat.
virtual void terrainClamp (const DtVector &geocLocIn, DtVector &geocLocOut) const
 Ensure detonation positions are above ground and outside buildings.
virtual void createSmoke (const std::list< DtVector > &cloudLocations)
 Create a VrfObject to simulate the resulting smoke.

Static Public Member Functions

static void launchSmokeTaskCallback (DtSimMessage *msg, void *usr)
 Callback function (registered in registerTaskMsgCallbacks()) for DtLaunchSmoke task messages.
static DtSimComponentcreator (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc, DtReaderWriterRegistry *parentRegistry)
 This is called by the factory.

Protected Attributes

const
DtLaunchSmokeControllerDescriptor
myDesc
std::list< DtVectormyPoints
double myArcRange
bool myLaunchAtNearestThreat
 ! Data from task msg
double myHeading

Detailed Description

End User Description: This controller handles DtLaunchSmokeTask tasks on an entity, and creates one or more tactical smoke clouds when the task executes.

Uses Descriptor Type: DtLaunchSmokeControllerDescriptor


Constructor & Destructor Documentation

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

constructor

destructor

copy constructor


Member Function Documentation

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

assignment operator

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

This returns the string TestLaunchSmokeControllerType (defined above), used to uniquely identify the type of component.

Implements DtTaskControllerComponent.

Register a callback for task notification.

Reimplemented from DtTaskControllerComponent.

static void DtLaunchSmokeController::launchSmokeTaskCallback ( DtSimMessage msg,
void *  usr 
) [static]

Callback function (registered in registerTaskMsgCallbacks()) for DtLaunchSmoke task messages.

Calls processLaunchSmokeTask() to actually handle the task.

Called by LaunchSmokeTaskCallback() when a new DtLaunchSmokeTask message is received.

virtual bool DtLaunchSmokeController::init ( ) [virtual]

Calculates myPoints, myArcRange from the descriptor parameters and stores them for use when the smoke is launched.

Reimplemented from DtControllerComponent.

virtual void DtLaunchSmokeController::tick ( ) [virtual]

Update control values.

Reimplemented from DtSimComponent.

static DtSimComponent* DtLaunchSmokeController::creator ( const DtString name,
DtVrfObject owner,
DtSimManager simManager,
DtComponentDescriptor desc,
DtReaderWriterRegistry parentRegistry 
) [static]

This is called by the factory.

Tries to use a single smoke bomb resource; Return true if successful.

Launch smoke based on myLaunchAtNearestThreat flag.

Returns true if successful; false otherwise

virtual void DtLaunchSmokeController::sendDetonation ( const DtVector geocLoc) const [virtual]

Sends detonations at the specified location.

virtual void DtLaunchSmokeController::launchSmokeTowards ( double  heading) [virtual]

Launch smoke towards to given compass heading.

virtual double DtLaunchSmokeController::calculateHeadingTowards ( DtRwSensorContactInfo closest) const [virtual]

Calculate the heading towards the given entity.

Calculate the closest threat.

virtual void DtLaunchSmokeController::terrainClamp ( const DtVector geocLocIn,
DtVector geocLocOut 
) const [virtual]

Ensure detonation positions are above ground and outside buildings.

virtual void DtLaunchSmokeController::createSmoke ( const std::list< DtVector > &  cloudLocations) [virtual]

Create a VrfObject to simulate the resulting smoke.


Member Data Documentation

! Data from task msg


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)