20 #include <matrix/vlVector.h>
22 #include <boost/bind/bind.hpp>
23 #include <boost/bind/placeholders.hpp>
27 class DtCoordinateSystem;
28 class DtEventProcessorInterface;
33 struct DtBallisticShotDefinition;
48 virtual const std::string&
className()
const;
69 void fireShot(
const DtBallisticShotDefinition& def);
75 void predictShot(
const DtBallisticShotDefinition& def);
bool myRemoveRequested
True if 'R' was pressed this frame (remove all).
Definition: DtExampleBallisticsDriver.h:116
virtual void slot_coordinateSystemChanged()
Handles a coordinate-system change.
float myWindDirection
Current wind direction in radians.
Definition: DtExampleBallisticsDriver.h:106
bool myFireRequestedN
True if 'N' was pressed this frame (fire red burst).
Definition: DtExampleBallisticsDriver.h:109
bool myFireRequestedM
True if 'M' was pressed this frame (fire green burst).
Definition: DtExampleBallisticsDriver.h:110
virtual bool onStart()
Performs startup logic for the driver.
bool myPreviewRequestedN
True if Shift+'N' was pressed this frame (preview red shot).
Definition: DtExampleBallisticsDriver.h:113
std::deque< makVrv::DtBallisticManager::BallisticIdentifier > myFiredIdentifiers
Identifiers of previously fired bursts, stored for removal via the 'R' key.
Definition: DtExampleBallisticsDriver.h:119
virtual void slot_windDirectionChanged(float radians)
Handles a wind direction change; re-predicts any arcs currently on screen.
virtual bool onTick()
Performs update logic for the driver.
bool myPreviewRequestedB
True if Shift+'B' was pressed this frame (preview orange shot).
Definition: DtExampleBallisticsDriver.h:112
virtual bool onStop()
Performs shutdown logic for the driver.
makVrv::DtSignalConnectionManager myConnections
Manages signal/slot lifetime connections.
Definition: DtExampleBallisticsDriver.h:100
Driver that demonstrates firing GPU tracer bursts and previewing predicted ballistic trajectories...
Definition: DtExampleBallisticsDriver.h:37
virtual void slot_windSpeedChanged(float metersPerSecond)
Handles a wind speed change; re-predicts any arcs currently on screen.
The DtDriver is an abstract class. Developers derive from this to create logic that "directs" things ...
Definition: DtDriver.h:31
void predictShot(const DtBallisticShotDefinition &def)
Draws the predicted trajectory arcs for the given shot without firing. Any arcs already shown for thi...
Contains the DtBallisticManager class declaration.
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
virtual ~DtExampleBallisticsDriver()
Destructor.
void redrawActivePreviews()
Re-predicts every arc currently on screen so it reflects the latest wind speed and direction...
float myWindSpeed
Current wind speed in metres per second.
Definition: DtExampleBallisticsDriver.h:105
The DtAgentManager manages the distributed scene object framework. This includes the objects and upda...
Definition: DtAgentManager.h:38
makVrv::DtEventProcessorInterface * myEventProcessor
Event processor for input handling.
Definition: DtExampleBallisticsDriver.h:126
Contains makVrv:DtDriver class.
The DtCoordinateSystem is used to manage the current coordinate system of the scene.
Definition: DtCoordinateSystem.h:40
void clearPredictedArcs()
Removes every predicted trajectory arc previously drawn by predictShot().
Base class to provide boost signal/slot management.
virtual const std::string & className() const
Returns the driver's class name.
std::vector< const DtBallisticShotDefinition * > myActivePreviews
Shot definitions whose arcs are currently displayed, so they can be re-predicted when the wind change...
Definition: DtExampleBallisticsDriver.h:124
bool myPreviewRequestedM
True if Shift+'M' was pressed this frame (preview green shot).
Definition: DtExampleBallisticsDriver.h:114
virtual void computeDirectionVectors(DtVector position, DtVector &east, DtVector &north, DtVector &up)
Computes local direction vectors for the given world position.
void removeArcsFor(const DtBallisticShotDefinition &def)
Removes the three predicted arcs previously drawn for one shot.
bool myFireRequestedB
True if 'B' was pressed this frame (fire orange burst).
Definition: DtExampleBallisticsDriver.h:108
DtExampleBallisticsDriver(makVrv::DtAgentManager &am)
Constructor.
The DtEventProcessorInterface defines the generic interface for classes which handle input events...
Definition: DtEventProcessorInterface.h:34
makVrv::DtCoordinateSystem * myCoordinateSystem
Local copy of the system-wide coordinate system, kept for thread safety.
Definition: DtExampleBallisticsDriver.h:103
void fireShot(const DtBallisticShotDefinition &def)
Fires a GPU tracer burst described by the given shot definition.