VR-Forces 5.0.2 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Member Functions | Protected Attributes | Private Member Functions
makVrv::DtAttachableEllipsoidArcModelInstance Class Reference

Model instance to draw a EllipsoidArc.

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

Classes

struct  EllipsoidArcRange
 
struct  SphericalQuad
 
struct  SphericalVertex
 
struct  Triangle
 
struct  VertexCache
 

Public Member Functions

 DtAttachableEllipsoidArcModelInstance (DtDe &de)
 
virtual ~DtAttachableEllipsoidArcModelInstance ()
 
virtual void updateGeometry ()
 
Inherited Methods
virtual void addToConnector (DtOsgSceneConnector *connector)
 
virtual bool removeFromConnector (DtOsgSceneConnector *connector)
 
virtual bool realize (DtModelDefinition &definition)
 
virtual void setVisible (bool isVisible)
 
Setters
virtual void setRelativePosition (double x, double y, double z)
 
virtual void setOrientation (double yaw, double pitch, double roll)
 
virtual void setDimensions (double x, double y, double z)
 
virtual void setColor (float r, float g, float b, float a)
 
virtual void setInsideColor (float r, float g, float b, float a)
 
virtual void setOutsideColor (float r, float g, float b, float a)
 
virtual void setAzimuthRange (float azimuthCenter, float azimuthSweep)
 
virtual void setElevationRange (float elevationCenter, float elevationSweep)
 
virtual void setMaxAngleSegment (float angleSegmentMax)
 
virtual void setShowLines (bool showLines)
 
virtual void setLinesHaveAlpha (bool lineAlpha)
 
- Public Member Functions inherited from makVrv::DtOsgModelInstance
virtual ~DtOsgModelInstance ()
 
virtual bool cloneInstance (DtModelDefinition &definition)
 
virtual bool saveModelToFile (const std::string &filename) const
 
virtual void enableColorBlending (bool b)
 
virtual void setBlendColor (float r, float g, float b, float a)
 
virtual void enableTexture (bool onOff)
 
virtual osg::Node * rootNode ()
 
virtual const osg::Node * rootNode () const
 
virtual osg::Node * sensorNode ()
 
virtual const osg::Node * sensorNode () const
 
virtual void setDynamicSensorRegion (const std::string &region, bool state)
 
virtual bool dynamicSensorRegion (const std::string &region)
 
virtual const
SensorRegionStateMap
dynamicSensorRegionMap () const
 
virtual void slot_atcGlobalModelEnableChanged ()
 
virtual bool alphaToCoverageEnabled ()
 
virtual void registerLightPoints (const std::string &groupName, bool daylightControlledLights)
 
- Public Member Functions inherited from makVrv::DtModelInstance
 DtModelInstance (DtDe &de)
 
virtual ~DtModelInstance ()
 
const std::string & realizedDefinitionName () const
 
const DtVectorboundingBoxExtents () const
 
void getBoundingBoxExtents (double &x, double &y, double &z) const
 
const DtVectorboundingBoxCenter () const
 
void getBoundingBoxCenter (double &x, double &y, double &z) const
 
void getBoundingBoxComponents (DtVector &minimum, DtVector &maximum)
 
const DtVectorallGeometryboundingBoxExtents () const
 
void getAllGeometryBoundingBoxExtents (double &x, double &y, double &z) const
 
const DtVectorallGeometryboundingBoxCenter () const
 
void getAllGeometryBoundingBoxCenter (double &x, double &y, double &z) const
 
void getAllGeometryBoundingBoxComponents (DtVector &minimum, DtVector &maximum)
 
virtual void setContributesToBound (bool trueOrFalse)
 
bool contributesToBound () const
 

Protected Member Functions

Updaters
virtual void updateGeometryColors ()
 
virtual void updateGeometryWireframeState ()
 
virtual void updateGeometryTransforms ()
 
Vertex Utilities
double angularDistance (double from, double to)
 
- Protected Member Functions inherited from makVrv::DtOsgModelInstance
 DtOsgModelInstance (DtDe &de)
 
virtual void updateColorBlending ()
 
virtual void updateColorBlending (osg::Node *node)
 
virtual void enableTexture (osg::Node *root, bool onOff)
 
virtual void updateBoundingBoxViaContents ()
 
virtual void setRootNode (osg::Node *node)
 
virtual void setUpDepthTest (osg::StateSet *stateSet)
 

Protected Attributes

osg::ref_ptr
< osg::MatrixTransform > 
myTransform
 
osg::ref_ptr< osg::Group > myBlendNode
 
osg::ref_ptr< osg::Group > myWireNode
 
osg::ref_ptr< osg::Geometry > myGeometry
 
osg::ref_ptr< osg::Geode > myFrontGeode
 
osg::ref_ptr< osg::Geode > myBackGeode
 
int myCenterVertexIndex
 
osg::Vec3d myRelativePosition
 
osg::Quat myRelativeOrientation
 
osg::Vec3d myDimensions
 
EllipsoidArcRange myAzimuthRange
 
EllipsoidArcRange myElevationRange
 
osg::Vec4 myInsideColor
 
osg::Vec4 myOutsideColor
 
bool myShowLines
 
bool myLineAlphaFlag
 
float myAngleSegmentMax
 
bool myFlashing
 
- Protected Attributes inherited from makVrv::DtOsgModelInstance
osg::ref_ptr< osg::Node > myModelRoot
 
osg::ref_ptr< osg::StateSet > myCachedState
 
SensorRegionStateMap mySensorRegionMap
 
AlphaToCoverageState myAlphaToCoverageState
 
DtSignalConnectionManager myConnections
 
bool myModelInstanceShaderSet
 
- Protected Attributes inherited from makVrv::DtModelInstance
DtDemyDe
 
std::string myRealizedModelDefinitionName
 
DtVector myBoundingBoxCenter
 
DtVector myBoundingBoxExtents
 
DtVector myBoundingBoxMinimum
 
DtVector myBoundingBoxMaximum
 
DtVector myAllGeometryBoundingBoxCenter
 
DtVector myAllGeometryBoundingBoxExtents
 
DtVector myAllGeometryBoundingBoxMinimum
 
DtVector myAllGeometryBoundingBoxMaximum
 
bool myContributesToBound
 
bool myColorBlendingEnabled
 
float myBlendRed
 
float myBlendBlue
 
float myBlendGreen
 
float myBlendAlpha
 

Private Member Functions

 DtAttachableEllipsoidArcModelInstance ()
 
 DtAttachableEllipsoidArcModelInstance (const DtAttachableEllipsoidArcModelInstance &)
 
DtAttachableEllipsoidArcModelInstanceoperator= (const DtAttachableEllipsoidArcModelInstance &)
 

Additional Inherited Members

- Public Types inherited from makVrv::DtOsgModelInstance
enum  AlphaToCoverageState { USE_GLOBAL, FORCE_OFF, FORCE_ON }
 
typedef std::unordered_map
< std::string, bool
SensorRegionStateMap
 
- Static Public Member Functions inherited from makVrv::DtOsgModelInstance
static osg::Vec4 readVec4 (const std::string &paramName, const DtModelDefinition &definition, const osg::Vec4 &initValue=osg::Vec4(1, 1, 1, 1))
 
static osg::Vec3 readVec3 (const std::string &paramName, const DtModelDefinition &definition, const osg::Vec3 &initValue=osg::Vec3(1, 1, 1))
 
- Static Public Member Functions inherited from makVrv::DtModelInstance
static float readFloat (const std::string &paramName, const DtModelDefinition &definition)
 
static DtVector readVector (const std::string &paramName, const DtModelDefinition &definition)
 
- Public Attributes inherited from makVrv::DtOsgModelInstance
boost::signalslib::signal
< void(const std::string &) > 
signal_dynamicSensorRegionAdded
 
boost::signalslib::signal
< void(const std::string
&, bool) > 
signal_dynamicSensorRegionChanged
 
boost::signalslib::signal
< void(bool)> 
signal_atcModeEnableChanged
 
- Public Attributes inherited from makVrv::DtModelInstance
boost::signalslib::signal
< void(DtModelInstance *)> 
signal_modelInstanceChanged
 

Constructor & Destructor Documentation

makVrv::DtAttachableEllipsoidArcModelInstance::DtAttachableEllipsoidArcModelInstance ( DtDe de)
virtual makVrv::DtAttachableEllipsoidArcModelInstance::~DtAttachableEllipsoidArcModelInstance ( )
virtual

Virtual DTOR (no-op) (OSG manages created scene objects)

makVrv::DtAttachableEllipsoidArcModelInstance::DtAttachableEllipsoidArcModelInstance ( )
private

Default Constructor not implemented.

makVrv::DtAttachableEllipsoidArcModelInstance::DtAttachableEllipsoidArcModelInstance ( const DtAttachableEllipsoidArcModelInstance )
private

Copy Constructor not implemented - Copy not allowed.

Member Function Documentation

DtAttachableEllipsoidArcModelInstance& makVrv::DtAttachableEllipsoidArcModelInstance::operator= ( const DtAttachableEllipsoidArcModelInstance )
private

Assignment Operator not implemented - Copy not allowed.

virtual void makVrv::DtAttachableEllipsoidArcModelInstance::addToConnector ( DtOsgSceneConnector connector)
virtual

Tell the model instance to add itself to the provided node.

See Also
makVrv::DtOsgModelInstance::addToConnector( DtOsgSceneConnector* )

Reimplemented from makVrv::DtOsgModelInstance.

virtual bool makVrv::DtAttachableEllipsoidArcModelInstance::removeFromConnector ( DtOsgSceneConnector connector)
virtual

Tell the model instance to remove itself from the provided node.

See Also
makVrv::DtOsgModelInstance::removeFromConnector( DtOsgSceneConnector* )

Reimplemented from makVrv::DtOsgModelInstance.

virtual bool makVrv::DtAttachableEllipsoidArcModelInstance::realize ( DtModelDefinition definition)
virtual

Attempt to realize a definition. If the model instance can't realize the definition it should return false. This instance requires the definition be of schema "EllipsoidArc".

Reimplemented from makVrv::DtOsgModelInstance.

virtual void makVrv::DtAttachableEllipsoidArcModelInstance::setVisible ( bool  isVisible)
inlinevirtual
virtual void makVrv::DtAttachableEllipsoidArcModelInstance::setRelativePosition ( double  x,
double  y,
double  z 
)
virtual

Set the relative position of the ellipsoid Sets the position of the model instance relative to the parent node.

Parameters
xthe relative x translation
ythe relative y translation
zthe relative z translation
virtual void makVrv::DtAttachableEllipsoidArcModelInstance::setOrientation ( double  yaw,
double  pitch,
double  roll 
)
virtual

Set the relative orientation of the ellipsoid Sets the orientation of the model instance relative to the parent node.

Parameters
yawthe yaw, -DtTaitBryan::psi()
pitchthe pitch, DtTaitBryan::theta()
rollthe roll, DtTaitBryan::phi()
virtual void makVrv::DtAttachableEllipsoidArcModelInstance::setDimensions ( double  x,
double  y,
double  z 
)
virtual

Set the lengths of the ellipsoid's axes Sets the length of the ellipsoid's axes.

Parameters
xthe length of the ellipsoid's x axis
ythe length of the ellipsoid's y axis
zthe length of the ellipsoid's z axis
virtual void makVrv::DtAttachableEllipsoidArcModelInstance::setColor ( float  r,
float  g,
float  b,
float  a 
)
virtual

Sets both the inside and outside colors Sets the color of the entire ellipsoid arc.

Parameters
rthe red component of the color
gthe green component of the color
bthe blue component of the color
athe alpha component of the color
virtual void makVrv::DtAttachableEllipsoidArcModelInstance::setInsideColor ( float  r,
float  g,
float  b,
float  a 
)
virtual

Sets the color of the center point of the sphere Sets the inner color of the ellipsoid arc Note: This color is not visible if the ellipsoid is a full ellipse (as there is no center vertex)

Parameters
rthe red component of the color
gthe green component of the color
bthe blue component of the color
athe alpha component of the color
virtual void makVrv::DtAttachableEllipsoidArcModelInstance::setOutsideColor ( float  r,
float  g,
float  b,
float  a 
)
virtual

Sets the color of the outer points on the sphere Sets the outer color of the ellipsoid arc.

Parameters
rthe red component of the color
gthe green component of the color
bthe blue component of the color
athe alpha component of the color
virtual void makVrv::DtAttachableEllipsoidArcModelInstance::setAzimuthRange ( float  azimuthCenter,
float  azimuthSweep 
)
virtual

Set the azimuth range of the ellipsoid arc Sets the ellipsoid arc's azimuth range.

Parameters
azimuthCenterthe angle of the center of the azimuth's range
azimuthSweepthe angle from the center to the ends of the azimuth range
virtual void makVrv::DtAttachableEllipsoidArcModelInstance::setElevationRange ( float  elevationCenter,
float  elevationSweep 
)
virtual

Set the elevation range of the ellipsoid arc Sets the ellipsoid arc's elevation range.

Parameters
elevationCenterthe angle of the center of the elevation's range
elevationSweepthe angle from the center to the ends of the elevation range
virtual void makVrv::DtAttachableEllipsoidArcModelInstance::setMaxAngleSegment ( float  angleSegmentMax)
virtual

Set the max angle segment used when building the geometry Sets the max angle segment between sample points along the azimuth/elevation when generating the geometry.

Parameters
angleSegmentMaxthe max angle segment between sample points
virtual void makVrv::DtAttachableEllipsoidArcModelInstance::setShowLines ( bool  showLines)
virtual

Set whether the wireframe outlines are visible on the geometry Sets whether the wireframe lines for the ellipsoid arc should be drawn If set, the wireframe lines are drawn in addition to the geometry faces.

Parameters
showLineswhether the lines should be visible or hidden
virtual void makVrv::DtAttachableEllipsoidArcModelInstance::setLinesHaveAlpha ( bool  lineAlpha)
virtual

Set whether the wireframe outlines should be rendered with alpha Sets whether the alpha component of the ellipsoid's colors should apply to the wireframe outlines as well as the faces, or just to the faces.

Parameters
whetherthe lines should be affected by the color's alpha values.
virtual void makVrv::DtAttachableEllipsoidArcModelInstance::updateGeometry ( )
virtual

Builds the geometry using the defined parameters in myParameters Updates the vertices and faces used to render the ellipsoid arc model then updates the geometry's colors. Called if any of the following methods are called:

See Also
makVrv::DtAttachableEllipsoidArcModelInstance::updateGeometryColors()
virtual void makVrv::DtAttachableEllipsoidArcModelInstance::updateGeometryColors ( )
protectedvirtual

Updates the color(s) of the sphere Updates the colors of the vertices on the ellipsoid arc model's geometry Called if any of the following methods are called:

See Also
makVrv::DtAttachableEllipsoidArcModelInstance::updateGeometry()
virtual void makVrv::DtAttachableEllipsoidArcModelInstance::updateGeometryWireframeState ( )
protectedvirtual

Updates the state of the geometry's wireframe Updates the visibility / alpha state of the geometry's wireframe Called if any of the following methods are called:

virtual void makVrv::DtAttachableEllipsoidArcModelInstance::updateGeometryTransforms ( )
protectedvirtual

Updates the scaling and location applied to the sphere Updates the scaling applied to the model (the ellipsoid arc model's dimensions) Called if any of the following methods are called:

double makVrv::DtAttachableEllipsoidArcModelInstance::angularDistance ( double  from,
double  to 
)
protected

Computes the distance between two angles Computes the angle between two reference angles Counts in the clockwise direction.

Parameters
fromthe first reference angle
tothe second reference angle

Member Data Documentation

osg::ref_ptr<osg::MatrixTransform> makVrv::DtAttachableEllipsoidArcModelInstance::myTransform
protected

The offset and scale transform.

osg::ref_ptr<osg::Group> makVrv::DtAttachableEllipsoidArcModelInstance::myBlendNode
protected

The blending node for the geometry.

osg::ref_ptr<osg::Group> makVrv::DtAttachableEllipsoidArcModelInstance::myWireNode
protected

The wireframe node for the geometry.

osg::ref_ptr<osg::Geometry> makVrv::DtAttachableEllipsoidArcModelInstance::myGeometry
protected

The model instance's geometry.

osg::ref_ptr<osg::Geode> makVrv::DtAttachableEllipsoidArcModelInstance::myFrontGeode
protected

The front facing geometry geode.

osg::ref_ptr<osg::Geode> makVrv::DtAttachableEllipsoidArcModelInstance::myBackGeode
protected

The back facing geometry geode.

int makVrv::DtAttachableEllipsoidArcModelInstance::myCenterVertexIndex
protected
osg::Vec3d makVrv::DtAttachableEllipsoidArcModelInstance::myRelativePosition
protected

Relative position offset.

osg::Quat makVrv::DtAttachableEllipsoidArcModelInstance::myRelativeOrientation
protected

Relative orientation.

osg::Vec3d makVrv::DtAttachableEllipsoidArcModelInstance::myDimensions
protected

Axis dimensions.

EllipsoidArcRange makVrv::DtAttachableEllipsoidArcModelInstance::myAzimuthRange
protected

Azimuth range (center/sweep)

EllipsoidArcRange makVrv::DtAttachableEllipsoidArcModelInstance::myElevationRange
protected

Elevation range (center/sweep)

osg::Vec4 makVrv::DtAttachableEllipsoidArcModelInstance::myInsideColor
protected

Color at the center of the sphere.

osg::Vec4 makVrv::DtAttachableEllipsoidArcModelInstance::myOutsideColor
protected

Color on the external points of the sphere.

bool makVrv::DtAttachableEllipsoidArcModelInstance::myShowLines
protected

Whether or not to display the emitter volume outline lines.

bool makVrv::DtAttachableEllipsoidArcModelInstance::myLineAlphaFlag
protected

Whether the outline lines have alpha or not.

float makVrv::DtAttachableEllipsoidArcModelInstance::myAngleSegmentMax
protected

The max angle used to sample the emitter volume (in degrees)

bool makVrv::DtAttachableEllipsoidArcModelInstance::myFlashing
protected

Like HTML blink.


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

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)