![]() |
VR-Forces 4.0.4 Class Documentation
|
A visualizer for displaying a Military Standard Symbology Icon. More...
Public Types | |
| enum | DrawMethod { DrawMethod_Bitmap, DrawMethod_Font } |
Public Member Functions | |
| DtMilStdIconVisualizer (DtBaseConnection &connection, DtStateListener &listener, int modelSet) | |
| CTOR. | |
| virtual | ~DtMilStdIconVisualizer () |
| DTOR. | |
| virtual void | setVisualizerDefinition (const DtVisualizerDefinition &visDef) |
| Sets the visual definition of the visualizer. | |
| virtual void | setModelDefinitionForAgents () |
| Sets the model definition of the agents. | |
| virtual void | setSelected (bool selected) |
| Set the visualizer to be selected. | |
| void | setDrawMethod (DrawMethod dt) |
| Set how the symbol is to be drawn. | |
| DrawMethod | drawMethod () const |
| void | setOutlineEnabled (bool enabled) |
| Set whether the frame component is drawn. | |
| bool | outlineEnabled () const |
| Get whether the frame component is drawn. | |
| void | setFillEnabled (bool enabled) |
| Set whether the fill component is filled. | |
| bool | fillEnabled () const |
| Get whether the fill component is filled. | |
| void | setDamageEnabled (bool enabled) |
| Sets whether damaged component is drawn. | |
| bool | damageEnabled () const |
| Gets whether damaged component is drawn. | |
| void | setIconEnabled (bool enabled) |
| Set whether the icon component is drawn. | |
| bool | iconEnabled () const |
| Get whether the icon component of the symbol. | |
| void | setIconScale (float scale) |
| void | setColorByAffiliationEnabled (bool enabled) |
| Set whether the icon has it's color set by it's affiliation. | |
| bool | colorByAffiliationEnabled () const |
| Get whether the icon has it's color set by it's affiliation. | |
| virtual void | setForceId (int) |
| Sets force of item. | |
| int | forceId () const |
| virtual void | setDamaged (bool) |
| Sets whether or not item is damaged. | |
| bool | damaged () const |
| virtual void | setForceColor (float r, float g, float b, float a) |
| Sets the color of the force. Forces an update. | |
| void | getForceColor (double &r, double &g, double &b, double &a) |
| virtual unsigned short | outlineCharacterForUnitSymbolFont (unsigned short outlineBase, int force) const |
| Routines to modify glyphs into force appropriate glyphs. | |
| virtual unsigned short | fillCharacterForUnitSymbolFont (unsigned short outlineBase, int force) const |
| virtual DtUnicode | generateSymbolString (float fillColor[4], float outlineColor[4], unsigned int fillGlyph, unsigned int outlineGlyph, bool damaged) const |
| Generates the symbol string to use with a font based icon. | |
| unsigned short | outlineGlyph () const |
| Returns glyphs. | |
| unsigned short | fillGlyph () const |
| unsigned short | damageGlyph () const |
| virtual void | setPickable (bool b) |
| Sets pickable state. | |
Protected Member Functions | |
| virtual bool | fillCharacterByOutline (unsigned short outline, unsigned short lower, unsigned short upper, unsigned short start, bool equipment, unsigned short &fill) const |
| virtual unsigned short | forceOffset (int force) const |
| virtual void | setHasMouse (bool hasMouse) |
| virtual void | stateChanged () |
| Virtual function called after any symbol state changes (battle dimension, or affiliation). | |
| virtual void | displayChanged () |
| Virtual function called after any symbol state changes (draw method, frame enabled, fill enabled, icon enabled, color by affiliation);. | |
| virtual void | createModelAgents () |
| Override to create model agents that will be used to display data from the listener. | |
| virtual void | destroyModelAgents () |
| Destroys all currently created definitions. | |
| virtual void | update () |
| virtual void | updateSymbol () |
| virtual void | updateSelectedIcon () |
Protected Attributes | |
| DrawMethod | myDrawMethod |
| Bitmap | |
| bool | myOutlineFlag |
| True | |
| DtUnicodeChar | myOutlineGlyph |
| bool | myFillEnabledFlag |
| True | |
| DtUnicodeChar | myFillGlyph |
| bool | myDamageEnabledFlag |
| False | |
| DtUnicodeChar | myDamageGlyph |
| bool | myIconEnabledFlag |
| True | |
| bool | myColorByAffiliationFlag |
| True | |
| DtProjectedWidgetModelAgent * | myProjectIconPosition |
| DtWidgetAgent * | myIcon |
| DtWidgetLabelAgent * | myLabel |
| DtWidgetInstanceSignaler * | myIconSignaler |
| DtWidgetAgent * | mySelectedIcon |
| bool | myHasMouse |
| DtUnicode | mySymbolString |
| float | myScale |
| int | myForceId |
| bool | myDamaged |
| bool | myForceEffectsGlyphs |
| unsigned int | myGlyphCenterPolicy |
| float | myForceColor [4] |
A visualizer for displaying a Military Standard Symbology Icon.
A symbology icon is made up of several different components. Included are: A frame, a color fill, and a icon.
| makVrv::DtMilStdIconVisualizer::DtMilStdIconVisualizer | ( | DtBaseConnection & | connection, |
| DtStateListener & | listener, | ||
| int | modelSet | ||
| ) |
CTOR.
| virtual makVrv::DtMilStdIconVisualizer::~DtMilStdIconVisualizer | ( | ) | [virtual] |
DTOR.
| virtual void makVrv::DtMilStdIconVisualizer::setVisualizerDefinition | ( | const DtVisualizerDefinition & | visDef | ) | [virtual] |
Sets the visual definition of the visualizer.
Reimplemented from makVrv::DtStateVisualizer.
Reimplemented in makVrv::DtAggregateMilStdIconVisualizer.
| virtual void makVrv::DtMilStdIconVisualizer::setModelDefinitionForAgents | ( | ) | [virtual] |
Sets the model definition of the agents.
Implements makVrv::DtStateVisualizer.
Reimplemented in makVrf::DtVrfGui3DAggregateMilStdIconVisualizer, makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkEntityMilStdIconVisualizer, makVrv::DT_PROTOCOL_NAMESPACE::DtVrlink2DAggregateMilStdIconVisualizer, makVrv::DT_PROTOCOL_NAMESPACE::DtVrlink3DAggregateMilStdIconVisualizer, and makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkTacticalGraphicMilStdIconVisualizer.
| virtual void makVrv::DtMilStdIconVisualizer::setSelected | ( | bool | selected | ) | [virtual] |
Set the visualizer to be selected.
Reimplemented from makVrv::DtStateVisualizer.
Set how the symbol is to be drawn.
| void makVrv::DtMilStdIconVisualizer::setOutlineEnabled | ( | bool | enabled | ) |
Set whether the frame component is drawn.
Get whether the frame component is drawn.
| void makVrv::DtMilStdIconVisualizer::setFillEnabled | ( | bool | enabled | ) |
Set whether the fill component is filled.
Get whether the fill component is filled.
| void makVrv::DtMilStdIconVisualizer::setDamageEnabled | ( | bool | enabled | ) |
Sets whether damaged component is drawn.
Gets whether damaged component is drawn.
| void makVrv::DtMilStdIconVisualizer::setIconEnabled | ( | bool | enabled | ) |
Set whether the icon component is drawn.
Get whether the icon component of the symbol.
| void makVrv::DtMilStdIconVisualizer::setIconScale | ( | float | scale | ) |
| void makVrv::DtMilStdIconVisualizer::setColorByAffiliationEnabled | ( | bool | enabled | ) |
Set whether the icon has it's color set by it's affiliation.
Get whether the icon has it's color set by it's affiliation.
| virtual void makVrv::DtMilStdIconVisualizer::setForceId | ( | int | ) | [virtual] |
Sets force of item.
If force is different than current force, will cause an update
| int makVrv::DtMilStdIconVisualizer::forceId | ( | ) | const [inline] |
| virtual void makVrv::DtMilStdIconVisualizer::setDamaged | ( | bool | ) | [virtual] |
Sets whether or not item is damaged.
If damaged flag is different will cause an update
| bool makVrv::DtMilStdIconVisualizer::damaged | ( | ) | const [inline] |
| virtual void makVrv::DtMilStdIconVisualizer::setForceColor | ( | float | r, |
| float | g, | ||
| float | b, | ||
| float | a | ||
| ) | [virtual] |
Sets the color of the force. Forces an update.
| void makVrv::DtMilStdIconVisualizer::getForceColor | ( | double & | r, |
| double & | g, | ||
| double & | b, | ||
| double & | a | ||
| ) |
| virtual unsigned short makVrv::DtMilStdIconVisualizer::outlineCharacterForUnitSymbolFont | ( | unsigned short | outlineBase, |
| int | force | ||
| ) | const [virtual] |
Routines to modify glyphs into force appropriate glyphs.
Call outlineCharacterForUnitSymbolFont to get the force modified outline, then pass that result into fillCharacterForUnitSymbolFont to return the appropriate fill character
| virtual unsigned short makVrv::DtMilStdIconVisualizer::fillCharacterForUnitSymbolFont | ( | unsigned short | outlineBase, |
| int | force | ||
| ) | const [virtual] |
| virtual DtUnicode makVrv::DtMilStdIconVisualizer::generateSymbolString | ( | float | fillColor[4], |
| float | outlineColor[4], | ||
| unsigned int | fillGlyph, | ||
| unsigned int | outlineGlyph, | ||
| bool | damaged | ||
| ) | const [virtual] |
Generates the symbol string to use with a font based icon.
Reimplemented in makVrv::DtAggregateMilStdIconVisualizer.
| unsigned short makVrv::DtMilStdIconVisualizer::outlineGlyph | ( | ) | const |
Returns glyphs.
| unsigned short makVrv::DtMilStdIconVisualizer::fillGlyph | ( | ) | const |
| unsigned short makVrv::DtMilStdIconVisualizer::damageGlyph | ( | ) | const |
| virtual void makVrv::DtMilStdIconVisualizer::setPickable | ( | bool | ) | [virtual] |
Sets pickable state.
Reimplemented from makVrv::DtStateVisualizer.
| virtual bool makVrv::DtMilStdIconVisualizer::fillCharacterByOutline | ( | unsigned short | outline, |
| unsigned short | lower, | ||
| unsigned short | upper, | ||
| unsigned short | start, | ||
| bool | equipment, | ||
| unsigned short & | fill | ||
| ) | const [protected, virtual] |
| virtual unsigned short makVrv::DtMilStdIconVisualizer::forceOffset | ( | int | force | ) | const [protected, virtual] |
| virtual void makVrv::DtMilStdIconVisualizer::setHasMouse | ( | bool | hasMouse | ) | [protected, virtual] |
| virtual void makVrv::DtMilStdIconVisualizer::stateChanged | ( | ) | [protected, virtual] |
Virtual function called after any symbol state changes (battle dimension, or affiliation).
| virtual void makVrv::DtMilStdIconVisualizer::displayChanged | ( | ) | [protected, virtual] |
Virtual function called after any symbol state changes (draw method, frame enabled, fill enabled, icon enabled, color by affiliation);.
| virtual void makVrv::DtMilStdIconVisualizer::createModelAgents | ( | ) | [protected, virtual] |
Override to create model agents that will be used to display data from the listener.
Implements makVrv::DtStateVisualizer.
| virtual void makVrv::DtMilStdIconVisualizer::destroyModelAgents | ( | ) | [protected, virtual] |
Destroys all currently created definitions.
Implements makVrv::DtStateVisualizer.
| virtual void makVrv::DtMilStdIconVisualizer::update | ( | ) | [protected, virtual] |
| virtual void makVrv::DtMilStdIconVisualizer::updateSymbol | ( | ) | [protected, virtual] |
Reimplemented in makVrv::DT_PROTOCOL_NAMESPACE::DtVrlink2DAggregateMilStdIconVisualizer, makVrv::DT_PROTOCOL_NAMESPACE::DtVrlink3DAggregateMilStdIconVisualizer, makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkEntityMilStdIconVisualizer, and makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkTacticalGraphicMilStdIconVisualizer.
| virtual void makVrv::DtMilStdIconVisualizer::updateSelectedIcon | ( | ) | [protected, virtual] |
Bitmap
bool makVrv::DtMilStdIconVisualizer::myOutlineFlag [protected] |
True
True
False
True
True
DtProjectedWidgetModelAgent* makVrv::DtMilStdIconVisualizer::myProjectIconPosition [protected] |
DtWidgetAgent* makVrv::DtMilStdIconVisualizer::myIcon [protected] |
DtWidgetLabelAgent* makVrv::DtMilStdIconVisualizer::myLabel [protected] |
DtWidgetAgent* makVrv::DtMilStdIconVisualizer::mySelectedIcon [protected] |
bool makVrv::DtMilStdIconVisualizer::myHasMouse [protected] |
float makVrv::DtMilStdIconVisualizer::myScale [protected] |
int makVrv::DtMilStdIconVisualizer::myForceId [protected] |
bool makVrv::DtMilStdIconVisualizer::myDamaged [protected] |
unsigned int makVrv::DtMilStdIconVisualizer::myGlyphCenterPolicy [protected] |
float makVrv::DtMilStdIconVisualizer::myForceColor[4] [protected] |