VR-Forces 4.1.1 Class Documentation
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
exampleRangeLine::DtRangeLineVisualizer Class Reference

DtRangeLineVisualizer display a range line drawn as geometry in the scene without occlusion. More...

Inheritance diagram for exampleRangeLine::DtRangeLineVisualizer:
Inheritance graph
[legend]

Public Member Functions

 DtRangeLineVisualizer (makVrv::DtBaseConnection &simulation, makVrv::DtStateListener &listener, int modelSet)
 Constructor.
virtual ~DtRangeLineVisualizer ()
 Destructor.
virtual void setColor (float r, float g, float b, float a)
 Sets the color for the visible portion of the line (default is green)
void color (float &r, float &g, float &b, float &a) const
virtual void setStartPoint (const DtVector &)
 Sets the start for of the first vertex. Will delete any updaters if they exist for the start point.
virtual void setEndPoint (const DtVector &)
 Sets the end point. Will delete any updaters if they exist for the end point.
virtual void setStartAttachPoint (makVrv::DtElementID)
 Will set the start attach point. Converts to scene id for current model set.
virtual void setStartPointOffset (const DtVector &)
 Sets the offset from the attached start point.
virtual void setEndAttachPoint (makVrv::DtElementID)
 Will set the end attach point. Converts to scene id for current model set.
virtual void setEndPointOffset (const DtVector &)
 Sets the offset from the attached end point.
virtual void setSelected (bool b)
 Sets selected state.
- Public Member Functions inherited from makVrv::DtSceneObjectVisualizer
 DtSceneObjectVisualizer (DtBaseConnection &simulation, DtStateListener &listener, int modelSet)
virtual ~DtSceneObjectVisualizer ()
virtual DtUniqueID uniqueID () const
 Return unique id of mySceneObjectAgent, if it exists, else returns 0;.
virtual DtSceneObjectAgent * sceneObjectAgent ()
virtual void setParent (DtStateVisualizer *p)
 Override of base class setParent to simply set the parent without destroying/recreating model agents.
virtual void setSceneObjectAgent (DtSceneObjectAgent *)
virtual void setElementID (const DtElementID &elementID)
DtElementID elementID () const
virtual bool show (int)
 Override to show/hide scene object agent (if it exists)
virtual bool hide (int)
 Will call destroyModelAgents(), if, when the context is added, it is the first context in the list.
- Public Member Functions inherited from makVrv::DtStateVisualizer
 DtStateVisualizer (DtBaseConnection &connection, DtStateListener &listener, int modelSet)
 CTOR.
virtual ~DtStateVisualizer ()
 DTOR.
virtual const TypeInfotypeInfo () const =0
 Get the type info.
void setModelDefinition (const std::string &definition)
 Sets the model definition and creates agent(s) based on that definition.
const std::string & modelDefinition () const
 Gets the current model definition.
virtual bool setVisible (bool visible, int context)
 Returns true if this context wants to show or hide the item.
virtual void initialize ()
 Initialize the visualizer.
virtual bool isVisible () const
 Returns true if visible.
virtual bool selected () const
void setName (const std::string &)
 Internal name of state visualizer.
const std::string & name () const
virtual void setPickable (bool)
 Sets pickable state.
virtual bool pickable () const
virtual void setUniqueID (DtUniqueID id)
int visualizerType () const
void setShowHideContext (const std::vector< int > &s)
 Set show/hide context without changing visibility of item.
virtual void setVisualizerDefinition (const DtVisualizerDefinition &)
 Set any other additional visualizer information from the visual record.
DtStateListenerlistener ()
DtBaseConnectionsimulation ()
 Get the connection for this visualizer.
void setDistribute (bool b)
 Whether or not to distribute over the network.
bool distribute () const

Protected Member Functions

virtual void createModelAgents ()
 Creates the model agent. If already created, makes it visible.
virtual void destroyModelAgents ()
 Model agent is only destroyed in destructor.
virtual void setModelDefinitionForAgents ()
 Sets model definition for all the agents that this visualizer might be using.
virtual makVrv::DtUniqueID elementIdToSceneId (makVrv::DtElementID id)
virtual void resetSpatial ()
virtual
makVrv::DtSegmentedLineModelAgent * 
createLineModelAgent ()=0
 Creates the model that will be used to display the line.
- Protected Member Functions inherited from makVrv::DtSceneObjectVisualizer
virtual DtSceneObjectAgent * createObjectAgent ()
- Protected Member Functions inherited from makVrv::DtStateVisualizer
virtual void slot_mouseDown (DtMouseState &mouseState, const std::string &displayEngineName, const std::string &windowName, const std::string &channelName)
 Called when the mouse is clicked in this visualizer.
virtual void slot_mouseUp (DtMouseState &mouseState, const std::string &displayEngineName, const std::string &windowName, const std::string &channelName)
virtual void slot_mouseDblClick (DtMouseState &mouseState, const std::string &displayEngineName, const std::string &windowName, const std::string &channelName)
virtual bool supportsShowHideContext (int) const
 Default returns true.
template<typename T , typename C >
void connectAndUpdate (boost::signal< void(T)> &sig, void(C::*fp)(T), T val)
 Connect a signal and update the entity.

Protected Attributes

DtRangeLineStateListenermyLineListener
makVrv::DtSegmentedLineModelAgent * myLineModelAgent
makVrv::DtAttachableUpdaterAgent * myAttachableUpdaterAgent
- Protected Attributes inherited from makVrv::DtSceneObjectVisualizer
DtElementID myElementID
- Protected Attributes inherited from makVrv::DtStateVisualizer
DtBaseConnectionmySimulation
DtStateListenermyListener
bool myDistributeFlag
DtUniqueID myUniqueID
std::string myName
std::string myModelDefinition
DtSignalConnectionManager myConnections
int myModelSet
int myVisualizerType
std::vector< int > myShowHideContexts
bool mySelected
bool myPickable
bool myVisible
DtStateVisualizermyParent
DtSceneObjectAgent * mySceneObjectAgent

Additional Inherited Members

- Public Types inherited from makVrv::DtStateVisualizer
enum  Type {
  AllVisualizerTypes = 0, EntityVisualizerType = 1, EnvironmentalVisualizerType, InteractionVisualizerType,
  AggregateVisualizerType, IntervisibilityVisualizerType, TacticalSmokeVisualizerType, UserType = 10000
}
 Visualizer class types that are supportable via visualizers. More...
- Public Attributes inherited from makVrv::DtStateVisualizer
boost::signal< void(DtStateVisualizer
*, DtStateVisualizer
*, DtStateVisualizer *)> 
signal_reparented
 Signaled when the parent of this item changes, called before destroying any model agents.
boost::signal< void(DtMouseState
&, const DtUniqueID &, const
std::string &, const
std::string &, const
std::string
&, DtStateVisualizer *)> 
signal_mouseDown
 Emitted when the entity's indicator is clicked.
boost::signal< void(DtMouseState
&, const DtUniqueID &, const
std::string &, const
std::string &, const
std::string
&, DtStateVisualizer *)> 
signal_mouseUp
boost::signal< void(DtMouseState
&, const DtUniqueID &, const
std::string &, const
std::string &, const
std::string
&, DtStateVisualizer *)> 
signal_mouseDblClick

Detailed Description

DtRangeLineVisualizer display a range line drawn as geometry in the scene without occlusion.

Constructor & Destructor Documentation

exampleRangeLine::DtRangeLineVisualizer::DtRangeLineVisualizer ( makVrv::DtBaseConnection simulation,
makVrv::DtStateListener listener,
int  modelSet 
)

Constructor.

virtual exampleRangeLine::DtRangeLineVisualizer::~DtRangeLineVisualizer ( )
virtual

Destructor.

Member Function Documentation

virtual void exampleRangeLine::DtRangeLineVisualizer::setColor ( float  r,
float  g,
float  b,
float  a 
)
virtual

Sets the color for the visible portion of the line (default is green)

void exampleRangeLine::DtRangeLineVisualizer::color ( float &  r,
float &  g,
float &  b,
float &  a 
) const
virtual void exampleRangeLine::DtRangeLineVisualizer::setStartPoint ( const DtVector )
virtual

Sets the start for of the first vertex. Will delete any updaters if they exist for the start point.

virtual void exampleRangeLine::DtRangeLineVisualizer::setEndPoint ( const DtVector )
virtual

Sets the end point. Will delete any updaters if they exist for the end point.

virtual void exampleRangeLine::DtRangeLineVisualizer::setStartAttachPoint ( makVrv::DtElementID  )
virtual

Will set the start attach point. Converts to scene id for current model set.

virtual void exampleRangeLine::DtRangeLineVisualizer::setStartPointOffset ( const DtVector )
virtual

Sets the offset from the attached start point.

virtual void exampleRangeLine::DtRangeLineVisualizer::setEndAttachPoint ( makVrv::DtElementID  )
virtual

Will set the end attach point. Converts to scene id for current model set.

virtual void exampleRangeLine::DtRangeLineVisualizer::setEndPointOffset ( const DtVector )
virtual

Sets the offset from the attached end point.

virtual void exampleRangeLine::DtRangeLineVisualizer::setSelected ( bool  )
virtual

Sets selected state.

Reimplemented from makVrv::DtStateVisualizer.

virtual void exampleRangeLine::DtRangeLineVisualizer::createModelAgents ( )
protectedvirtual

Creates the model agent. If already created, makes it visible.

Reimplemented from makVrv::DtSceneObjectVisualizer.

virtual void exampleRangeLine::DtRangeLineVisualizer::destroyModelAgents ( )
protectedvirtual

Model agent is only destroyed in destructor.

Here, it will be hidden (if it has been created)

Reimplemented from makVrv::DtSceneObjectVisualizer.

virtual void exampleRangeLine::DtRangeLineVisualizer::setModelDefinitionForAgents ( )
protectedvirtual

Sets model definition for all the agents that this visualizer might be using.

If model agents are not created, should create them. Should not call this directly, but rather call setModelDefinition

Reimplemented from makVrv::DtSceneObjectVisualizer.

virtual makVrv::DtUniqueID exampleRangeLine::DtRangeLineVisualizer::elementIdToSceneId ( makVrv::DtElementID  id)
protectedvirtual
virtual void exampleRangeLine::DtRangeLineVisualizer::resetSpatial ( )
protectedvirtual
virtual makVrv::DtSegmentedLineModelAgent* exampleRangeLine::DtRangeLineVisualizer::createLineModelAgent ( )
protectedpure virtual

Creates the model that will be used to display the line.

Implemented in exampleRangeLine::Dt2DRangeLineVisualizer, and exampleRangeLine::Dt3DRangeLineVisualizer.

Member Data Documentation

DtRangeLineStateListener& exampleRangeLine::DtRangeLineVisualizer::myLineListener
protected
makVrv::DtSegmentedLineModelAgent* exampleRangeLine::DtRangeLineVisualizer::myLineModelAgent
protected
makVrv::DtAttachableUpdaterAgent* exampleRangeLine::DtRangeLineVisualizer::myAttachableUpdaterAgent
protected

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

Document ID: Generated on Mon Apr 8 19:24:01 EDT 2013 from SVN revision 125877
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)