![]() |
VR-Forces 4.0.4 Class Documentation
|
End User Description: This controller handles DtLaunchSmokeTask tasks on an entity, and creates one or more tactical smoke clouds when the task executes. More...

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 | |
| DtLaunchSmokeController & | operator= (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 DtRwSensorContactInfo * | findClosestThreat () 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 DtSimComponent * | creator (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc, DtReaderWriterRegistry *parentRegistry) |
| This is called by the factory. | |
Protected Attributes | |
| const DtLaunchSmokeControllerDescriptor * | myDesc |
| std::list< DtVector > | myPoints |
| double | myArcRange |
| bool | myLaunchAtNearestThreat |
| ! Data from task msg | |
| double | myHeading |
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
| DtLaunchSmokeController::DtLaunchSmokeController | ( | const DtString & | name, |
| DtVrfObject * | owner, | ||
| DtSimManager * | simManager, | ||
| DtComponentDescriptor * | desc = NULL, |
||
| DtReaderWriterRegistry * | parentRegistry = 0 |
||
| ) |
constructor
| virtual DtLaunchSmokeController::~DtLaunchSmokeController | ( | ) | [virtual] |
destructor
copy constructor
| 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.
| virtual void DtLaunchSmokeController::registerTaskMsgCallbacks | ( | ) | [virtual] |
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.
| virtual void DtLaunchSmokeController::processLaunchSmokeTask | ( | DtSimMessage * | msg | ) | [virtual] |
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.
| virtual bool DtLaunchSmokeController::useSmokeBomb | ( | ) | [virtual] |
Tries to use a single smoke bomb resource; Return true if successful.
| virtual bool DtLaunchSmokeController::launchSmoke | ( | ) | [virtual] |
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.
| virtual DtRwSensorContactInfo* DtLaunchSmokeController::findClosestThreat | ( | ) | const [virtual] |
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.
const DtLaunchSmokeControllerDescriptor* DtLaunchSmokeController::myDesc [protected] |
std::list<DtVector> DtLaunchSmokeController::myPoints [protected] |
double DtLaunchSmokeController::myArcRange [protected] |
bool DtLaunchSmokeController::myLaunchAtNearestThreat [protected] |
! Data from task msg
double DtLaunchSmokeController::myHeading [protected] |