![]() |
VR-Forces Developer's Guide
|
Protocol independent emitter volume visualizer.

Public Types | |
| enum | ColoringMode { PulseFrequency, Frequency, Fixed } |
Public Types inherited from makVrv::DtStateVisualizer | |
| enum | Type { AllVisualizerTypes = 0, EntityVisualizerType = 1, EnvironmentalVisualizerType, InteractionVisualizerType, AggregateVisualizerType, IntervisibilityVisualizerType, TacticalSmokeVisualizerType, UserType = 10000 } |
Protected Types | |
| using | EmitterBeamModelMap = std::unordered_map< DtUniqueID, DtModelAgent * > |
Protected Types inherited from makVrv::DtStateVisualizer | |
| typedef std::vector < DtVisualizerShowHideContext::VisualizerShowHideContext > | ShowHideContextVector |
Protected Member Functions | |
| virtual DtEntityStateListener & | entityStateListener () |
| virtual const DtEntityStateListener & | entityStateListener () const |
| virtual DtModelAgent * | createBeamModel () |
| virtual DtModelAgent * | findBeamModel (const DtUniqueID &beamModelId) |
| virtual bool | beamIsVisible (float elevationSweep, float azimuthSweep, float emittedPower) |
| virtual void | setBeamModelVisible (DtModelAgent *beamModel, bool visibility) |
| virtual void | slot_entityEmitterVolumesVisibleChanged (bool visible, bool instanceOnly) |
| virtual void | setInitialValuesFromVisualizerDefinition () override |
| virtual void | connectToListenerSignals () override |
| virtual double | calculateBeamScale (float elevationRangeSweep, float azimuthRangeSweep, float erPower) |
| virtual void | computeColorForFrequency (double hi, double low, double act, float innerColor[4], float outerColor[4]) |
| virtual void | destroyEmitterBeam (const DtUniqueID &) |
| virtual void | destroyEmitterBeamModel (DtModelAgent *) |
| virtual void | slot_setBeamlRelativePosition (const DtUniqueID &beamId, DtVector32 offset) |
| virtual void | slot_setBeamAzimuthRange (const DtUniqueID &beamId, float center, float sweep) |
| virtual void | slot_setBeamElevationRange (const DtUniqueID &beamId, float center, float sweep) |
| virtual void | slot_setBeamERP (const DtUniqueID &beamId, float erp) |
| virtual void | slot_setBeamFrequency (const DtUniqueID &beamId, float freq) |
| virtual void | slot_setBeamPulseWidth (const DtUniqueID &beamId, float width) |
| virtual void | setBeamModelRelativePosition (DtModelAgent *beamModel, DtVector32 offset)=0 |
| virtual void | setBeamModelAzimuthRange (DtModelAgent *beamModel, float center, float sweep)=0 |
| virtual void | setBeamModelElevationRange (DtModelAgent *beamModel, float center, float sweep)=0 |
| virtual void | setBeamModelScale (DtModelAgent *beamModel, double scale)=0 |
| virtual void | updateBeamModelColors (DtModelAgent *beamModel, float freq, float prf) |
| virtual void | setBeamInsideColor (DtModelAgent *beamModel, float r, float g, float b, float a)=0 |
| virtual void | setBeamOutsideColor (DtModelAgent *beamModel, float r, float g, float b, float a)=0 |
Protected Member Functions inherited from makVrv::DtStateVisualizer | |
| virtual void | makeVisible () |
| virtual bool | isVisible () const |
| template<typename T , typename C > | |
| void | connectAndUpdate (boost::signalslib::signal< void(T)> &sig, void(C::*fp)(T), T val) |
Static Protected Member Functions | |
| static void | hsv2rgb (float hue, float sat, float val, float color[3]) |
Protected Attributes | |
| ColoringMode | myColoringMode |
| DtEntityStateListener * | myEntityStateListener |
| EmitterBeamModelMap | myEmitterBeamModelMap |
| double | myLinearScale |
| double | myExponentialScale |
| double | myHighPulseFrequency |
| double | myLowPulseFrequency |
| double | myHighFrequency |
| double | myLowFrequency |
| float | myNearColor [4] |
| float | myFarColor [4] |
| bool | myUseCorrectedBeamScaleFormula |
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 |
|
protected |
| makVrv::DtEntityEmitterVolumeVisualizer::DtEntityEmitterVolumeVisualizer | ( | DtBaseConnection & | simulation, |
| DtStateListener & | listener, | ||
| DtSceneObjectAgent * | sceneObject, | ||
| DtModelSetId | modelSet | ||
| ) |
CTOR.
|
virtual |
DTOR Cleans up the model agents associated with this visualizer.
|
delete |
default constructor - not allowed
|
delete |
copy constructor - not allowed
|
delete |
assignment operator - not allowed
|
overridevirtual |
Initialize the visualizer.
Reimplemented from makVrv::DtStateVisualizer.
|
overridevirtual |
Implements makVrv::DtStateVisualizer.
|
overridevirtual |
Detaches all beam model agents from the scene object agent and deletes them.
Implements makVrv::DtStateVisualizer.
|
overridevirtual |
Sets the model definition on all instantiated beam model agents.
Implements makVrv::DtStateVisualizer.
|
virtual |
Receives notification of emitter beam discovery Connected to signal_emitterBeamAdded.
|
virtual |
Receives notification of pending emitter beam removals Connected to signal_emitterBeamRemoved.
|
virtual |
Sets the method used to color the emitter volume Sets the mode to use for coloring the emitter volumes.
| mode | the coloring mode to use |
|
virtual |
Gets the method used to color the emitter volume Gets the mode used for coloring the emitter volumes.
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
Creates a new beam model agent Extending classes should override this method to use a different beam model.
Reimplemented in makVrv::Dt3DEntityEmitterVolumeVisualizer, and makVrv::Dt2DEntityEmitterVolumeVisualizer.
|
protectedvirtual |
Beam model accessor Gets the beam model with the given beamModelId.
| beamModelId | the unique beam model ID |
|
protectedvirtual |
Determines whether a beam model should be visible or not based on the geometry, emitted power, and myEntityStateListener->entityEmitterVolumesVisible()
|
protectedvirtual |
Shows or hides the given beam model by adding or removing it from the scene object.
|
protectedvirtual |
Slot for emitter volume visibility toggle from the signaler Connected to signal_entityEmitterVolumesVisibleChanged.
|
protectedvirtual |
Slots for beam signals from the entity state listener. Each slot finds the model associated with the ID and calls the setbeam* method for the appropriate variable.
|
protectedvirtual |
Sets the azimuth range of the given emitter beam Converts the input azimuth center from counter-clockwise starting at the +y axis to clockwise starting at the +x axis (wrt +z rotation), and sets the resulting azimuth on the beam model with the given id.
Reimplemented in makVrv::Dt3DEntityEmitterVolumeVisualizer.
|
protectedvirtual |
Sets the elevation range of the given emitter beam Converts the input elevation center from an angle offset from the -z axis to an angle offset from the x/y plane (positive in the -z axis direction, and negative angles in the +z axis direction), and sets the resulting elevation on the beam model with the given id.
Reimplemented in makVrv::Dt3DEntityEmitterVolumeVisualizer.
|
protectedvirtual |
Slots for beam signals from the entity state listener. Each slot finds the model associated with the ID and calls the setbeam* method for the appropriate variable.
|
protectedvirtual |
Slots for beam signals from the entity state listener. Each slot finds the model associated with the ID and calls the setbeam* method for the appropriate variable.
|
protectedvirtual |
Slots for beam signals from the entity state listener. Each slot finds the model associated with the ID and calls the setbeam* method for the appropriate variable.
|
protectedpure virtual |
2D & 3D Derived Visualizers implement
Sets the relative position of the emitter beams Converts the given offset position from (x,y,z) to (y,x,-z) and sets the relative position on the beam's model agent.
Implemented in makVrv::Dt2DEntityEmitterVolumeVisualizer, and makVrv::Dt3DEntityEmitterVolumeVisualizer.
|
protectedpure virtual |
Slots for beam signals from the entity state listener. Each slot finds the model associated with the ID and calls the setbeam* method for the appropriate variable.
Implemented in makVrv::Dt2DEntityEmitterVolumeVisualizer, and makVrv::Dt3DEntityEmitterVolumeVisualizer.
|
protectedpure virtual |
Slots for beam signals from the entity state listener. Each slot finds the model associated with the ID and calls the setbeam* method for the appropriate variable.
Implemented in makVrv::Dt2DEntityEmitterVolumeVisualizer, and makVrv::Dt3DEntityEmitterVolumeVisualizer.
|
protectedpure virtual |
Slots for beam signals from the entity state listener. Each slot finds the model associated with the ID and calls the setbeam* method for the appropriate variable.
Implemented in makVrv::Dt3DEntityEmitterVolumeVisualizer, and makVrv::Dt2DEntityEmitterVolumeVisualizer.
|
protectedvirtual |
Updates the colors on the given beam using the beam parameters Determines what colors to use for the beam model based on the coloring mode and the near and far colors set for this visualizer.
|
protectedpure virtual |
Slots for beam signals from the entity state listener. Each slot finds the model associated with the ID and calls the setbeam* method for the appropriate variable.
Implemented in makVrv::Dt3DEntityEmitterVolumeVisualizer, and makVrv::Dt2DEntityEmitterVolumeVisualizer.
|
protectedpure virtual |
Slots for beam signals from the entity state listener. Each slot finds the model associated with the ID and calls the setbeam* method for the appropriate variable.
Implemented in makVrv::Dt3DEntityEmitterVolumeVisualizer, and makVrv::Dt2DEntityEmitterVolumeVisualizer.
|
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 |
Connect the visualizer to the listeners signals.
Reimplemented from makVrv::DtStateVisualizer.
|
protectedvirtual |
Calculates the scale on the given beam using the beam sweep and power.
Applies scaling to the emitter volume visual model. DMO: I got this function by algebraicly simplifying the function in the original Stealth source code. I have no idea what it is doing. DJW: Taken from: cvs:/vpNet/libsrc/vpNetProtocol/vpNetEmitterSystemDriver.cxx 6/30/2010 TDL: A new visual definition parameter, useCorrectedBeamScale has been added. If this is set to true, a corrected formula is used to distribute the power value through the beam's surface. 10/20/2018
|
protectedvirtual |
Formats inputs and calls to DtHsv2Rgb Converts low / actual / hi to a number in the range [0,1] indicating the distance between low and hi, then multiplies that value by a preset hue (purple - 0.73f) for input into the DtHsv2Rgb function.
| hi | the hi frequency to use for scaling |
| low | the low frequency to use for scaling |
| act | the actual frequency |
| color | reference to storage for the resulting color |
|
staticprotected |
Converts the given hue/sat/val to an RGB color This method was originally written by Mike Weiblen of SAIC's War Breaker program. The function was modified to fit into the standard VR-Link format.
| hue | the hue value |
| sat | the saturation value |
| val | the value value (color brightness) |
| color | reference to storage for the resulting color |
|
protectedvirtual |
Removes the model from the scene object and deletes it Removes the entry from myEmitterBeamModelMap.
|
protectedvirtual |
Removes the model from the scene object and deletes it.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |