VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
makVrv::DtManeuverByFireVisualizer Class Referenceabstract

Interface for a Maneuver By Fire Position Tactical Graphic Visualizer.

This class is used by a Connection to realize a support by fire position tactical graphic or attack by fire position tactical graphic by setting the attributes of a Maneuver By Fire Facade according to signals received from the DtTacticalGraphicStateListener.

This class must be extended to create an maneuver by fire position model of the desired type, e.g. a 2D versus 3D maneuver by fire position.

The tactical graphic supports two modes which can be set in the entity definition under 'tacticalManeuverMode' If 'tacticalManeuverMode' is "Support" the the graphic will draw as a Support by Fire Position tactical graphic If 'tacticalManeuverMode' is "Attack" the the graphic will draw as an Attack by Fire Position tactical graphic

In the API, you can use setManeuverMode("Support") or setManeuverMode("Attack")

Inheritance diagram for makVrv::DtManeuverByFireVisualizer:
Inheritance graph
[legend]

Public Member Functions

 DtManeuverByFireVisualizer (DtBaseConnection &simulation, DtStateListener &listener, DtSceneObjectAgent *sceneObject, DtModelSetId modelSet)
 
virtual ~DtManeuverByFireVisualizer ()
 
 DtManeuverByFireVisualizer ()=delete
 
 DtManeuverByFireVisualizer (const DtManeuverByFireVisualizer &)=delete
 
DtManeuverByFireVisualizeroperator= (const DtManeuverByFireVisualizer &)=delete
 
virtual void initialize () override
 
virtual void useDefaultColor ()
 
virtual void setPenStyle (vrvTacticalGraphicUtilities::PenStyle)
 
virtual void setIsFriendlyForceColorOverrideEnabled (bool enabled)
 
virtual bool isFriendlyForceColorOverrideEnabled () const
 
virtual void setColor (float r, float g, float b, float a)
 
virtual void getColor (float &r, float &g, float &b, float &a) const
 
virtual void setSelectedColor (float r, float g, float b, float a)
 
virtual void getSelectedColor (float &r, float &g, float &b, float &a) const
 
virtual void setStipplePattern (unsigned short)
 
virtual unsigned short stipplePattern ()
 
virtual void setPixelLineWidth (int)
 
virtual int pixelLineWidth ()
 
virtual void setManeuverMode (DtOverlayManeuverByFireModel::ManeuverMode mode)
 
virtual
DtOverlayManeuverByFireModel::ManeuverMode 
maneuverMode ()
 
- Public Member Functions inherited from makVrv::DtStateVisualizer
 DtStateVisualizer (DtBaseConnection &connection, DtStateListener &listener, DtSceneObjectAgent *sceneObjectAgent, DtModelSetId modelSet)
 
virtual ~DtStateVisualizer ()
 
virtual DtModelSetId modelSet ()
 
virtual void createModelAgents ()=0
 
virtual void destroyModelAgents ()=0
 
virtual const TypeInfotypeInfo () const =0
 
virtual void setSceneObjectAgent (DtSceneObjectAgent *sceneObject)
 
void setModelDefinition (const std::string &definition)
 
const std::string & modelDefinition () const
 
virtual void implementVisibility (bool visible)
 
void setName (const std::string &)
 
const std::string & name () const
 
virtual void setPickable (bool)
 
virtual bool pickable () const
 
virtual DtUniqueID sceneObjectID () const
 
int visualizerType () const
 
virtual void setVisualizerDefinition (const DtVisualizerDefinition &)
 
DtStateListenerlistener ()
 
const DtStateListenerlistener () const
 
DtBaseConnectionsimulation ()
 
void setDistribute (bool b)
 
bool distribute () const
 
virtual bool isVisible () const
 
virtual bool setVisualizerIsVisible (bool vis, DtVisualizerShowHideContext::VisualizerShowHideContext context)
 

Protected Member Functions

virtual void setInitialValuesFromVisualizerDefinition () override
 
virtual void connectToListenerSignals () override
 
virtual void updateColors ()=0
 
virtual void slot_setSelected (bool) override
 
void setFriendlyForceColorStyle (vrvTacticalGraphicUtilities::FriendlyForceColorStyle style)
 
- Protected Member Functions inherited from makVrv::DtStateVisualizer
virtual void setModelDefinitionForAgents ()=0
 
virtual void makeVisible ()
 
template<typename T , typename C >
void connectAndUpdate (boost::signalslib::signal< void(T)> &sig, void(C::*fp)(T), T val)
 

Protected Attributes

DtTacticalGraphicStateListenermyManeuverByFireListener
 
float myDefaultColor [4]
 
float myColor [4]
 
float mySelectedColor [4]
 
double myDefaultLineWidth
 
int myLineWidth
 
unsigned short myLineStipple
 
DtOverlayManeuverByFireModel::ManeuverMode myManeuverMode
 
vrvTacticalGraphicUtilities::FriendlyForceColorStyle myFriendlyForceColorStyle
 
bool myIsFriendlyForceColorOverrideEnabled
 
- Protected Attributes inherited from makVrv::DtStateVisualizer
DtBaseConnectionmySimulation
 
DtStateListenermyListener
 
bool myDistributeFlag
 
DtUniqueID mySceneObjectID
 
std::string myName
 
std::string myModelDefinition
 
DtSignalConnectionManager myConnections
 
DtModelSetId myModelSet
 
int myVisualizerType
 
bool myPickable
 
bool myVisible
 
const DtVisualizerDefinitionmyVisualizerDefinition
 
DtSceneObjectAgent * mySceneObjectAgent
 
bool myInitialInitializeDone
 
ShowHideContextVector myVisualizerShowHideContexts
 

Additional Inherited Members

- Public Types inherited from makVrv::DtStateVisualizer
enum  Type {
  AllVisualizerTypes = 0, EntityVisualizerType = 1, EnvironmentalVisualizerType, InteractionVisualizerType,
  AggregateVisualizerType, IntervisibilityVisualizerType, TacticalSmokeVisualizerType, UserType = 10000
}
 
- Protected Types inherited from makVrv::DtStateVisualizer
typedef std::vector
< DtVisualizerShowHideContext::VisualizerShowHideContext
ShowHideContextVector
 

Constructor & Destructor Documentation

makVrv::DtManeuverByFireVisualizer::DtManeuverByFireVisualizer ( DtBaseConnection simulation,
DtStateListener listener,
DtSceneObjectAgent *  sceneObject,
DtModelSetId  modelSet 
)

CTOR.

virtual makVrv::DtManeuverByFireVisualizer::~DtManeuverByFireVisualizer ( )
virtual

DTOR.

makVrv::DtManeuverByFireVisualizer::DtManeuverByFireVisualizer ( )
delete

Default Constructor not implemented.

makVrv::DtManeuverByFireVisualizer::DtManeuverByFireVisualizer ( const DtManeuverByFireVisualizer )
delete

Copy Constructor not implemented - Copy not allowed.

Member Function Documentation

DtManeuverByFireVisualizer& makVrv::DtManeuverByFireVisualizer::operator= ( const DtManeuverByFireVisualizer )
delete

Assignment Operator not implemented - Copy not allowed.

virtual void makVrv::DtManeuverByFireVisualizer::initialize ( )
overridevirtual

Initialize the visualizer.

Reimplemented from makVrv::DtStateVisualizer.

virtual void makVrv::DtManeuverByFireVisualizer::setColor ( float  r,
float  g,
float  b,
float  a 
)
virtual

Set/Get the color for the maneuver by fire position. Valid range for argument values are 0.0 - 1.0. This will apply to all segments of the arc. If arguments are all 0, use the default as defined in the visual definition.

virtual void makVrv::DtManeuverByFireVisualizer::getColor ( float &  r,
float &  g,
float &  b,
float &  a 
) const
virtual

Set/Get the color for the maneuver by fire position. Valid range for argument values are 0.0 - 1.0. This will apply to all segments of the arc. If arguments are all 0, use the default as defined in the visual definition.

virtual void makVrv::DtManeuverByFireVisualizer::setSelectedColor ( float  r,
float  g,
float  b,
float  a 
)
virtual

Set/Get the inside color of the maneuver by fire position when selected. Valid range for argument values are 0.0 - 1.0. Default value is (0, 0, 0, 1).

virtual void makVrv::DtManeuverByFireVisualizer::getSelectedColor ( float &  r,
float &  g,
float &  b,
float &  a 
) const
virtual

Set/Get the inside color of the maneuver by fire position when selected. Valid range for argument values are 0.0 - 1.0. Default value is (0, 0, 0, 1).

virtual void makVrv::DtManeuverByFireVisualizer::useDefaultColor ( )
virtual

Sets color to default color The default color is defined in the visualizer definition. This function is called when setColor( 0, 0, 0, 0 ); is called.

virtual void makVrv::DtManeuverByFireVisualizer::setPenStyle ( vrvTacticalGraphicUtilities::PenStyle  )
virtual

Set the pen style This function translates the pen style to a stipple pattern. See vrvTacticalGraphicUtilities for styles.

virtual void makVrv::DtManeuverByFireVisualizer::setStipplePattern ( unsigned  short)
virtual

Set/Get the stipple pattern for the maneuver by fire position.

Reimplemented in makVrv::Dt2DManeuverByFireVisualizer.

virtual unsigned short makVrv::DtManeuverByFireVisualizer::stipplePattern ( )
virtual

Set/Get the stipple pattern for the maneuver by fire position.

virtual void makVrv::DtManeuverByFireVisualizer::setPixelLineWidth ( int  )
virtual

Set/Get the line width of the maneuver by fire position The pixel line width is the width of the line in osg pixel space. This is different than physicalLineWidth which sets the width of the line in database space.

Reimplemented in makVrv::Dt2DManeuverByFireVisualizer.

virtual int makVrv::DtManeuverByFireVisualizer::pixelLineWidth ( )
virtual

Set/Get the line width of the maneuver by fire position The pixel line width is the width of the line in osg pixel space. This is different than physicalLineWidth which sets the width of the line in database space.

virtual void makVrv::DtManeuverByFireVisualizer::setManeuverMode ( DtOverlayManeuverByFireModel::ManeuverMode  mode)
virtual

Set/Get the maneuver mode for the tactical graphic Two modes are supported: If string = "Support" then the tactical graphic will draw in support by fire position mode = 2 arrows If string = "Attack" then the tactical graphic will draw in attack by fire position mode = 1 arrow.

virtual DtOverlayManeuverByFireModel::ManeuverMode makVrv::DtManeuverByFireVisualizer::maneuverMode ( )
virtual

Set/Get the maneuver mode for the tactical graphic Two modes are supported: If string = "Support" then the tactical graphic will draw in support by fire position mode = 2 arrows If string = "Attack" then the tactical graphic will draw in attack by fire position mode = 1 arrow.

virtual void makVrv::DtManeuverByFireVisualizer::setIsFriendlyForceColorOverrideEnabled ( bool  enabled)
virtual

Set  whether or not the color  of this graphic,  if aligned friendly, 

can be overridden with black/white coloration

virtual bool makVrv::DtManeuverByFireVisualizer::isFriendlyForceColorOverrideEnabled ( ) const
virtual

Returns (based on the model definitionor set value) whether or not the color of this graphic, if aligned friendly, can be overridden with black/white coloration.

virtual void makVrv::DtManeuverByFireVisualizer::setInitialValuesFromVisualizerDefinition ( )
overrideprotectedvirtual

Sets member variables from the visualizer definition if they exist Should not call this directly. Called by DtStateVisualizer::initialize.

Reimplemented from makVrv::DtStateVisualizer.

virtual void makVrv::DtManeuverByFireVisualizer::connectToListenerSignals ( )
overrideprotectedvirtual

Connect the visualizer to the listeners signals Called by DtStateVisualizer::initialize()

Reimplemented from makVrv::DtStateVisualizer.

virtual void makVrv::DtManeuverByFireVisualizer::updateColors ( )
protectedpure virtual

Update the colors on the model.

Implemented in makVrv::Dt2DManeuverByFireVisualizer.

virtual void makVrv::DtManeuverByFireVisualizer::slot_setSelected ( bool  )
overrideprotectedvirtual

Sets whether or not the maneuver by fire position is selected. Connected to DtStateListener's signal_objectSelectionChanged signal.

Reimplemented from makVrv::DtStateVisualizer.

void makVrv::DtManeuverByFireVisualizer::setFriendlyForceColorStyle ( vrvTacticalGraphicUtilities::FriendlyForceColorStyle  style)
protected

Connected to the TG listener's signal_friendlyForceColorStyleChanged. This will cache the new value and force a call to updateColors()

Member Data Documentation

DtTacticalGraphicStateListener& makVrv::DtManeuverByFireVisualizer::myManeuverByFireListener
protected
float makVrv::DtManeuverByFireVisualizer::myDefaultColor[4]
protected
float makVrv::DtManeuverByFireVisualizer::myColor[4]
protected
float makVrv::DtManeuverByFireVisualizer::mySelectedColor[4]
protected
double makVrv::DtManeuverByFireVisualizer::myDefaultLineWidth
protected
int makVrv::DtManeuverByFireVisualizer::myLineWidth
protected
unsigned short makVrv::DtManeuverByFireVisualizer::myLineStipple
protected
DtOverlayManeuverByFireModel::ManeuverMode makVrv::DtManeuverByFireVisualizer::myManeuverMode
protected
vrvTacticalGraphicUtilities::FriendlyForceColorStyle makVrv::DtManeuverByFireVisualizer::myFriendlyForceColorStyle
protected
bool makVrv::DtManeuverByFireVisualizer::myIsFriendlyForceColorOverrideEnabled
protected

The documentation for this class was generated from the following file:

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)