![]() |
VR-Forces Developer's Guide
|
Interface for an Arc Tactical Graphic Visualizer.
This class is used by to realize an Arc tactical graphic by setting the attributes of a arc modelaccording to signals received from the DtTacticalGraphicStateListener.
This class must be extended to create an arc model of the desired type, e.g. a 2D versus 3D arc.
Currently only 2D arcs exist.

Public Member Functions | |
| DtArcVisualizer (DtBaseConnection &simulation, DtStateListener &listener, DtSceneObjectAgent *sceneObject, DtModelSetId modelSet) | |
| DtArcVisualizer ()=delete | |
| DtArcVisualizer (const DtArcVisualizer &)=delete | |
| DtArcVisualizer & | operator= (const DtArcVisualizer &)=delete |
| virtual | ~DtArcVisualizer () |
| virtual void | initialize () override |
| virtual void | setPenStyle (vrvTacticalGraphicUtilities::PenStyle) |
| virtual void | setPixelLineWidth (int) |
| virtual float | pixelLineWidth () const |
| virtual void | slot_setSelected (bool) |
| virtual void | setModelDefinitionForAgents () override |
| DtModelAgent * | findModelAgent () |
| 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 | useDefaultColor () |
| 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 | updateColors ()=0 |
| virtual void | setStipplePattern (unsigned short stipplePattern) |
| virtual unsigned short | stipplePattern () const |
| virtual void | setDimensions (double x, double y) |
| virtual void | getDimensions (double &x, double &y) const |
| virtual void | setScale (float scale) |
| virtual float | scale () const |
| virtual void | setMaxAngleSegment (double angleSegmentMax) |
| virtual double | maxAngleSegment () const |
| virtual void | setStartAngle (double startAngle) |
| virtual double | startAngle () const |
| virtual void | setEndAngle (double endAngle) |
| virtual double | endAngle () const |
Public Member Functions inherited from makVrv::DtStateVisualizer | |
| DtStateVisualizer (DtBaseConnection &connection, DtStateListener &listener, DtSceneObjectAgent *sceneObjectAgent, DtModelSetId modelSet) | |
| virtual | ~DtStateVisualizer () |
| virtual DtModelSetId | modelSet () |
| virtual const TypeInfo & | typeInfo () 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 &) |
| DtStateListener & | listener () |
| const DtStateListener & | listener () const |
| DtBaseConnection & | simulation () |
| void | setDistribute (bool b) |
| bool | distribute () const |
| virtual bool | isVisible () const |
| virtual bool | setVisualizerIsVisible (bool vis, DtVisualizerShowHideContext::VisualizerShowHideContext context) |
Protected Member Functions | |
| virtual void | destroyModelAgents () |
| virtual void | connectToListenerSignals () override |
| virtual void | setInitialValuesFromVisualizerDefinition () override |
| virtual void | createModelAgents () override |
| void | setFriendlyForceColorStyle (vrvTacticalGraphicUtilities::FriendlyForceColorStyle style) |
Protected Member Functions inherited from makVrv::DtStateVisualizer | |
| virtual void | makeVisible () |
| template<typename T , typename C > | |
| void | connectAndUpdate (boost::signalslib::signal< void(T)> &sig, void(C::*fp)(T), T val) |
Protected Attributes | |
| DtModelAgent * | myModelAgent |
| DtTacticalGraphicStateListener & | myArcListener |
| float | myDefaultColor [4] |
| float | myColor [4] |
| float | mySelectedColor [4] |
| float | myScale |
| double | myDefaultLineWidth |
| double | myStartAngle |
| double | myEndAngle |
| double | myMaxAngleSegment |
| double | myDimensions [2] |
| unsigned short | myLineStipple |
| int | myLineWidth |
| vrvTacticalGraphicUtilities::FriendlyForceColorStyle | myFriendlyForceColorStyle |
| bool | myIsFriendlyForceColorOverrideEnabled |
Protected Attributes inherited from makVrv::DtStateVisualizer | |
| DtBaseConnection & | mySimulation |
| DtStateListener & | myListener |
| bool | myDistributeFlag |
| DtUniqueID | mySceneObjectID |
| std::string | myName |
| std::string | myModelDefinition |
| DtSignalConnectionManager | myConnections |
| DtModelSetId | myModelSet |
| int | myVisualizerType |
| bool | myPickable |
| bool | myVisible |
| const DtVisualizerDefinition * | myVisualizerDefinition |
| 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 |
| makVrv::DtArcVisualizer::DtArcVisualizer | ( | DtBaseConnection & | simulation, |
| DtStateListener & | listener, | ||
| DtSceneObjectAgent * | sceneObject, | ||
| DtModelSetId | modelSet | ||
| ) |
CTOR.
|
delete |
Default Constructor not implemented.
|
delete |
Copy Constructor not implemented - Copy not allowed.
|
virtual |
DTOR.
|
delete |
Assignment Operator not implemented - Copy not allowed.
|
overridevirtual |
Initialize the visualizer.
Reimplemented from makVrv::DtStateVisualizer.
|
virtual |
Color.
Sets the color for the arc. 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 |
Color.
Sets the color for the arc. 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 |
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 |
Set/Get the selected color of the arc - default is (1, 1, 1, 1). Valid range for argument values are 0.0 - 1.0.
|
virtual |
Color.
Sets the color for the arc. 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
|
pure virtual |
Update the colors on the model - derived classes override.
Implemented in makVrv::Dt2DArcVisualizer.
|
virtual |
Set the pen style This function translates the pen style to a stipple pattern. See vrvTacticalGraphicUtilities for styles.
|
virtual |
Set/Get the stipple line pattern of the arc Default value is 0xFFFF.
Reimplemented in makVrv::Dt2DArcVisualizer.
|
virtual |
Set/Get the stipple line pattern of the arc Default value is 0xFFFF.
|
virtual |
Sets the line width of the arc 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::Dt2DArcVisualizer.
|
virtual |
Set/Get the axis lengths of the ellipse used to draw the arc Default value is 0, 0.
Reimplemented in makVrv::Dt2DArcVisualizer.
Set/Get the axis lengths of the ellipse used to draw the arc Default value is 0, 0.
|
virtual |
Set/Get the scale factor of the arc Default value is 1.
Reimplemented in makVrv::Dt2DArcVisualizer.
|
virtual |
Set/Get the scale factor of the arc Default value is 1.
|
virtual |
Set/Get the max angle segment used when building the geometry Default value is PI / 18.
Reimplemented in makVrv::Dt2DArcVisualizer.
|
virtual |
Set/Get the max angle segment used when building the geometry Default value is PI / 18.
|
virtual |
Set/Get the start angle of the arc, in radians Default value is 0.
Reimplemented in makVrv::Dt2DArcVisualizer.
|
virtual |
Set/Get the start angle of the arc, in radians Default value is 0.
|
virtual |
Set/Get the end angle of the arc, in radians Default value is PI.
Reimplemented in makVrv::Dt2DArcVisualizer.
|
virtual |
Set/Get the end angle of the arc, in radians Default value is PI.
|
virtual |
Sets whether or not the arc is selected.
Reimplemented from makVrv::DtStateVisualizer.
|
overridevirtual |
Applies myModelDefinition to the arc model agent.
Implements makVrv::DtStateVisualizer.
Reimplemented in makVrv::Dt2DArcVisualizer.
| DtModelAgent* makVrv::DtArcVisualizer::findModelAgent | ( | ) |
Returns the arc model agent used for this class This function can return null.
|
virtual |
Set whether or not the color of this graphic, if aligned friendly,
can be overridden with black/white coloration
|
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.
|
protectedvirtual |
Destroy the model agents associated with the arc.
Implements makVrv::DtStateVisualizer.
Reimplemented in makVrv::Dt2DArcVisualizer.
|
overrideprotectedvirtual |
Connect the visualizer to the listeners signals Called by DtStateVisualizer::initialize()
Reimplemented from makVrv::DtStateVisualizer.
|
overrideprotectedvirtual |
Sets member variables from the visualizer definition if they exist Should not call this directly. Called by DtStateVisualizer::initialize.
Reimplemented from makVrv::DtStateVisualizer.
|
overrideprotectedvirtual |
No-op must override pure virtual.
Implements makVrv::DtStateVisualizer.
Reimplemented in makVrv::Dt2DArcVisualizer.
|
protected |
Connected to the TG listener's signal_friendlyForceColorStyleChanged. This will cache the new value and force a call to updateColors()
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |