VR-Forces 4.0.4 Class Documentation
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
makVrv::DtMilStdIconVisualizer Class Reference

A visualizer for displaying a Military Standard Symbology Icon. More...

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

List of all members.

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
DtWidgetInstanceSignalermyIconSignaler
DtWidgetAgent * mySelectedIcon
bool myHasMouse
DtUnicode mySymbolString
float myScale
int myForceId
bool myDamaged
bool myForceEffectsGlyphs
unsigned int myGlyphCenterPolicy
float myForceColor [4]

Detailed Description

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.


Member Enumeration Documentation

Enumerator:
DrawMethod_Bitmap 
DrawMethod_Font 

Constructor & Destructor Documentation

CTOR.

DTOR.


Member Function Documentation

Sets the visual definition of the visualizer.

Reimplemented from makVrv::DtStateVisualizer.

Reimplemented in makVrv::DtAggregateMilStdIconVisualizer.

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.

Set whether the frame component is drawn.

Get whether the frame component is drawn.

Set whether the fill component is filled.

Get whether the fill component is filled.

Sets whether damaged component is drawn.

Gets whether damaged component is drawn.

Set whether the icon component is drawn.

Get whether the icon component of the symbol.

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

virtual void makVrv::DtMilStdIconVisualizer::setDamaged ( bool  ) [virtual]

Sets whether or not item is damaged.

If damaged flag is different will cause an update

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.

Returns glyphs.

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]
virtual void makVrv::DtMilStdIconVisualizer::updateSelectedIcon ( ) [protected, virtual]

Member Data Documentation

Bitmap

True

True

False

True

True

DtProjectedWidgetModelAgent* makVrv::DtMilStdIconVisualizer::myProjectIconPosition [protected]
DtWidgetAgent* makVrv::DtMilStdIconVisualizer::myIcon [protected]
DtWidgetLabelAgent* makVrv::DtMilStdIconVisualizer::myLabel [protected]

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

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)