VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
makVrv::DtExtrudedPolygonModelInstance Class Reference

A prism controlled by control points. More...

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

Public Member Functions

 DtExtrudedPolygonModelInstance (DtDe &de)
 CTOR. More...
 
virtual ~DtExtrudedPolygonModelInstance ()
 DTOR. More...
 
virtual void setFill (bool)
 Sets whether or not polygon is filled or just an outline (default is false) More...
 
virtual void setPolygonMode (DtExtrudedPolygonModel::PolygonMode mode)
 Sets the mode of the polygon (by default top and bottom) More...
 
virtual void updateGeometry ()
 If polygons need updating, also update them. More...
 
virtual void setInsideColor (float r, float g, float b, float a)
 Set the inside color of the line. More...
 
virtual void getInsideColor (float &r, float &g, float &b, float &a) const
 Gets the inside color of the line. More...
 
virtual void setOutsideColor (float r, float g, float b, float a)
 Set the outside color of the line. More...
 
virtual void getOutsideColor (float &r, float &g, float &b, float &a) const
 Gets the outside color of the line. More...
 
virtual void setColor (float r, float g, float b, float a)
 Sets the inside and outside color. More...
 
- Public Member Functions inherited from makVrv::DtExtrudedModelInstance
 DtExtrudedModelInstance (DtDe &de)
 CTOR. More...
 
virtual ~DtExtrudedModelInstance ()
 DTOR. More...
 
virtual const PointVectorpoints () const
 Returns the points associated with this model. More...
 
virtual void addPoint (const DtVector &, int index=-1)
 Add a control point to the end of the control point list if index is -1, or, at the specified index. More...
 
virtual void removePoint (int index)
 Remove a control point at the specified index. More...
 
virtual void setPoints (const std::vector< DtVector > &)
 Sets all the points. More...
 
virtual void setPosition (int index, const DtVector &)
 Move a control point at the specified index to a new position. More...
 
virtual void setPositions (const std::vector< DtVector > &)
 Sets all the positions int the model. replacing existing. More...
 
virtual void clearPoints ()
 Clears out positions and resets geometry. More...
 
virtual void addToConnector (DtOsgSceneConnector *connector)
 Tell the model instance to add itself to the provided node. More...
 
virtual bool removeFromConnector (DtOsgSceneConnector *connector)
 Tell the model instance to remove itself from the provided node. More...
 
virtual void setStipplePattern (unsigned int)
 Sets the stipple pattern of the line. More...
 
virtual void getColor (float &r, float &g, float &b, float &a) const
 Gets the color of the line. More...
 
virtual void setTextureHeight (double height)
 Set the height of the texture in meters. More...
 
virtual void setTextureWidth (double width)
 Set the width of the texture tiles in meters. More...
 
virtual void setTexture (osg::Texture *texture)
 Set the shape's texture. More...
 
virtual void setWidth (float)
 Sets the width of the line. If there is height, will 0 out height. More...
 
virtual void setHeight (float)
 Sets the height of the line ("up/down" the origin point). More...
 
virtual void setDimensions (float width, float height)
 Sets the dimensions of the line. More...
 
virtual void setLineWidth (float width)
 Sets the width of the line in pixel space, not world. More...
 
virtual void setScribeWidth (float width)
 Sets the width of the scribe line in pixel space. More...
 
virtual void setScribeAllPolygons (bool)
 Sets whether or not to only scribe the outline (and not the line edges). More...
 
virtual void setScribed (bool b)
 Sets the line to be scribed (default true) More...
 
virtual void setScribeColor (float r, float g, float b, float a)
 Sets the color of the scribe line. More...
 
virtual void setVisible (bool isVisible)
 no-op More...
 
int pointCount () const
 Returns the number of points. More...
 
const DtVectororigin () const
 Returns the origin point of the line. More...
 
const DtVectorpoint (int) const
 Returns the point at the given index. zero point if index is out of range. More...
 
virtual void setPickable (bool)
 Sets whether or not line is pickable. More...
 
bool pickable () const
 Returns whether or not line is pickable. More...
 
void setOrigin (const DtVector &origin)
 
virtual void setSolid (bool)
 Sets shape solid or outlined only. If solid is false and scribed is false, line will be effectively invisible. More...
 
osg::Node * rootNode ()
 Returns the root node. More...
 
virtual void setUpExtent (float height)
 Set the shape's upwards extrusion extent. More...
 
virtual void setDownExtent (float height)
 Set the shape's downwards extrusion extent. More...
 
virtual void setLeftExtent (float height)
 Set the shape's left extrusion extent. More...
 
virtual void setRightExtent (float heigh)
 Set the shape's right extrusion extent. More...
 
- Public Member Functions inherited from makVrv::DtOsgModelInstance
virtual ~DtOsgModelInstance ()
 DTOR. More...
 
virtual bool realize (DtModelDefinition &definition)
 Attempt to realize a definition. More...
 
virtual bool cloneInstance (DtModelDefinition &definition)
 Attempt to clone the basic geometry. More...
 
virtual bool saveModelToFile (const std::string &filename) const
 Attempt to save the model to a file. More...
 
virtual void enableColorBlending (bool b)
 Enable / disable coloring on all models in the scene object Note about enableColorBlending: If this particular model has instancing enabled then this flag is set to false and color blending is handled by the instance manager. More...
 
virtual void setBlendColor (float r, float g, float b, float a)
 set the model's color More...
 
virtual void enableTexture (bool onOff)
 
virtual const osg::Node * rootNode () const
 
virtual osg::Node * sensorNode ()
 Get the model instance's sensor node, . More...
 
virtual const osg::Node * sensorNode () const
 
virtual void addDynamicSensorRegion (const std::string &region)
 Add an active region state. More...
 
virtual void setDynamicSensorRegion (const std::string &region, bool state)
 Set the state of an active region. More...
 
virtual bool dynamicSensorRegion (const std::string &region)
 Get the current state of the specified sensor region. More...
 
SensorRegionStateMap const dynamicSensorRegionMap () const
 Get the map containing all regions and their current states. More...
 
virtual void slot_atcGlobalModelEnableChanged ()
 Slot to handle the global alpha to coverage signal for entities. More...
 
virtual bool alphaToCoverageEnabled ()
 Get the current setting for alpha to coverage for this model. More...
 
virtual void registerLightPoints (const std::string &groupName, bool daylightControlledLights)
 loop over all this models light points and register them with the light point manager daylightControlled is only used if the light points do not already have a type specified More...
 
- Public Member Functions inherited from makVrv::DtModelInstance
 DtModelInstance (DtDe &de)
 CTOR. More...
 
virtual ~DtModelInstance ()
 DTOR. More...
 
const std::string & realizedDefinitionName () const
 Get the name of the definition that this model instance was realized with. More...
 
const DtVectorboundingBoxExtents () const
 Get the bounding box extents of the model instance. More...
 
void getBoundingBoxExtents (double &x, double &y, double &z) const
 Get the bounding box extents of the model instance. More...
 
const DtVectorboundingBoxCenter () const
 Get the bounding box center of the model instance. More...
 
void getBoundingBoxCenter (double &x, double &y, double &z) const
 Get the bounding box center of the model instance. More...
 
void getBoundingBoxComponents (DtVector &minimum, DtVector &maximum)
 Get the bounding box min/max of the model instance. More...
 
const DtVectorallGeometryboundingBoxExtents () const
 functions for getting the allGeometry versions of the extents (they are calculated by traversing as if all switch paths are active) More...
 
void getAllGeometryBoundingBoxExtents (double &x, double &y, double &z) const
 Get the all geometry version of bounding box extents of the model instance. More...
 
const DtVectorallGeometryboundingBoxCenter () const
 Get the all geometry version of bounding box center of the model instance. More...
 
void getAllGeometryBoundingBoxCenter (double &x, double &y, double &z) const
 Get the all geometry version of bounding box center of the model instance. More...
 
void getAllGeometryBoundingBoxComponents (DtVector &minimum, DtVector &maximum)
 Get the all geometry version of bounding box min/max of the model instance. More...
 
virtual void setContributesToBound (bool trueOrFalse)
 Set whether this model instance contributes to an object's overall bounding volume. More...
 
bool contributesToBound () const
 Get whether this model instance contributes to an object's overall bounding volume. More...
 

Protected Member Functions

virtual void updatePoints ()
 Overridden to also create top/bottom geode points if filled. More...
 
virtual void updatePolygons ()
 Creates the top/bottom polygons as necessary. More...
 
virtual void addTop ()
 Adds top polygon. More...
 
virtual void addBottom ()
 Adds bottom polygon. More...
 
virtual void updateColors ()
 Updates colors. More...
 
virtual void updateStippling ()
 Updates stippling. More...
 
virtual void calculateCenterPoints ()
 Given the points, calculate the center of the top and bottom polygon to be used for fill. More...
 
- Protected Member Functions inherited from makVrv::DtExtrudedModelInstance
virtual osg::Vec3 rotatePoint (const osg::Vec3 &org, double range, const DtTaitBryan &angle) const
 Rotates the point at the given topo angle and returns the result. More...
 
virtual void updateMode ()
 Updates the line mode to a correct mode for the given extents. More...
 
virtual void updateTextureCoordinates ()
 Recalculate the texture coordinates. More...
 
virtual void addPointsForExtentExtrusion (const DtVector &point)
 Add points for a height or width extrustion. More...
 
virtual void addFaceForRotation (const osg::Quat &rotation, const DtVector &point)
 Adds a face given the rotation matrix. More...
 
virtual void addPointsForFullExtrusion (const DtVector &from, const DtVector &to)
 Add points for full extrustion. More...
 
virtual void setupScribeTransparency (bool b)
 Sets up the fact that the scribe line is transparent (true) or not (false) with respect to blending into the background. More...
 
virtual void setupGeodeTransparency (bool b)
 Sets up transparency for geode that represents the objects points. More...
 
virtual void updateScribeLine ()
 Updates the scribe line for geometry and color. More...
 
virtual bool frontAndBackFaceRendered () const
 Returns true if the first and last face are part of the line. Default is true. More...
 
virtual void updatePointsForLineStrip ()
 Updates the points for the line strip mode (no extrusion) More...
 
virtual void updatePointsForTriangleStrip ()
 Updates points for width or height extrusion. More...
 
virtual void updatePointsForExtrusion ()
 Updates points for full extrusion. More...
 
virtual void createFaces ()
 Creates the front/back face per segment for full extrusion. More...
 
virtual void updateScribeForTriangleStrip ()
 Updates script line for triangle strip mode. More...
 
virtual void updateScribeForExtrusion (osg::Vec3Array *)
 Updates scribe line for full extrusion mode. More...
 
virtual void updateScribeForOutline ()
 Updates scribe for outline (top/bottom) only. More...
 
virtual void updateScribeForFull ()
 Updates scribe for edges and outline. More...
 
virtual void updateGeometryWithStrip (osg::ref_ptr< osg::Geometry > &, const osg::ref_ptr< osg::Vec3Array > &)
 Updates geometry with indicies necessary to draw scribe line. More...
 
- Protected Member Functions inherited from makVrv::DtOsgModelInstance
 DtOsgModelInstance (DtDe &de)
 CTOR. More...
 
virtual void updateColorBlending ()
 calls update color blending with the model root. More...
 
virtual void updateColorBlending (osg::Node *node)
 
virtual void enableTexture (osg::Node *root, bool onOff)
 
virtual void updateBoundingBoxViaContents ()
 
virtual void setRootNode (osg::Node *node)
 Set the model instance's root node. More...
 
virtual void setUpDepthTest (osg::StateSet *stateSet)
 Helper function to set up a depth test on a state set taking into account whether reverse z is enabled or not. More...
 

Protected Attributes

osg::ref_ptr< osg::Geode > myCoverGeode
 
osg::ref_ptr< osg::Vec3Array > myFillArray
 
osg::ref_ptr< osg::Geometry > myTopGeometry
 
osg::ref_ptr< osg::Geometry > myBottomGeometry
 
bool myFilled
 
DtExtrudedPolygonModel::PolygonMode myPolygonMode
 
osg::Vec4 myInsideColor
 
float myLightingOffClamp
 
- Protected Attributes inherited from makVrv::DtExtrudedModelInstance
osg::ref_ptr< osg::Geode > myShapeGeode
 
osg::ref_ptr< osg::Geometry > myShapeGeometry
 
osg::ref_ptr< osg::Vec3Array > myShapePoints
 
osg::ref_ptr< osg::Geode > myScribeGeode
 
osg::ref_ptr< osg::Geometry > myScribeGeometryFull
 
osg::ref_ptr< osg::Geometry > myScribeGeometryTop
 
osg::ref_ptr< osg::Geometry > myScribeGeometryBottom
 
osg::ref_ptr< osg::Vec3Array > myScribePointsTop
 
osg::ref_ptr< osg::Vec3Array > myScribePointsBottom
 
osg::ref_ptr< osg::Vec3Array > myScribePointsFull
 
osg::ref_ptr< osg::Texture > myTexture
 
osg::ref_ptr< osg::Vec2Array > myTextureCoordinates
 
osg::ref_ptr< osg::LineWidth > myLineWidth
 
osg::ref_ptr< osg::LineWidth > myScribeWidth
 
osg::ref_ptr< osg::Group > myFrontTransparentGroup
 
osg::ref_ptr< osg::Group > myBackTransparentGroup
 
osg::ref_ptr< osg::Group > myOpaqueGroup
 
osg::ref_ptr< osg::Group > myMainTransform
 
osg::ref_ptr< osg::Vec3Array > myFaces
 If the line has width and height, the list of faces that make up the junction points of the boxes. More...
 
osg::Vec4 myColor
 
double myTextureWidth
 
double myTextureHeight
 
float myUpExtent
 
float myDownExtent
 
float myLeftExtent
 
float myRightExtent
 
PointVector myLinePoints
 
DtVector myOrigin
 
bool myShapePointsDirty
 
bool myScribed
 
bool myScribeAllPolygons
 
bool mySolid
 
bool myScribeWidthSet
 
int myStipplePattern
 
LineExtrusionMode myMode
 
DtOsgSegmentPickablemyPickable
 If drawing as line use this pointer to create the pickable segments of that line, else geometry will not support it. More...
 
bool myIsPickable
 
osg::Vec4 myScribeColor
 
bool myScribeColorSet
 
- 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
 Has this model instance had a shader generated for it? Used for classes (ex. More...
 
- 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
 

Additional Inherited Members

- Public Types inherited from makVrv::DtExtrudedModelInstance
enum  LineExtrusionMode { LineOnly, ExtrudeWidth, ExtrudeHeight, FullExtrusion }
 
typedef std::vector< DtVectorPointVector
 
- Public Types inherited from makVrv::DtOsgModelInstance
enum  AlphaToCoverageState { USE_GLOBAL, FORCE_OFF, FORCE_ON }
 The possible states of a control point. More...
 
typedef boost::unordered_map
< std::string, bool
SensorRegionStateMap
 Dynamic Sensor Region methods. More...
 
- 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
 Signal raised when a dynamic sensor region is added. More...
 
boost::signalslib::signal
< void(const std::string
&, bool) > 
signal_dynamicSensorRegionChanged
 Signal raised when a dynamic sensor region's state changes. More...
 
boost::signalslib::signal
< void(bool)> 
signal_atcModeEnableChanged
 Signal raised when alpha to coverage for this model is changed. More...
 
- Public Attributes inherited from makVrv::DtModelInstance
boost::signalslib::signal
< void(DtModelInstance *)> 
signal_modelInstanceChanged
 

Detailed Description

A prism controlled by control points.

Constructor & Destructor Documentation

makVrv::DtExtrudedPolygonModelInstance::DtExtrudedPolygonModelInstance ( DtDe de)

CTOR.

virtual makVrv::DtExtrudedPolygonModelInstance::~DtExtrudedPolygonModelInstance ( )
virtual

DTOR.

Member Function Documentation

virtual void makVrv::DtExtrudedPolygonModelInstance::setFill ( bool  )
virtual

Sets whether or not polygon is filled or just an outline (default is false)

virtual void makVrv::DtExtrudedPolygonModelInstance::setPolygonMode ( DtExtrudedPolygonModel::PolygonMode  mode)
virtual

Sets the mode of the polygon (by default top and bottom)

virtual void makVrv::DtExtrudedPolygonModelInstance::updateGeometry ( )
virtual

If polygons need updating, also update them.

Reimplemented from makVrv::DtExtrudedModelInstance.

virtual void makVrv::DtExtrudedPolygonModelInstance::setInsideColor ( float  r,
float  g,
float  b,
float  a 
)
virtual

Set the inside color of the line.

virtual void makVrv::DtExtrudedPolygonModelInstance::getInsideColor ( float &  r,
float &  g,
float &  b,
float &  a 
) const
virtual

Gets the inside color of the line.

virtual void makVrv::DtExtrudedPolygonModelInstance::setOutsideColor ( float  r,
float  g,
float  b,
float  a 
)
virtual

Set the outside color of the line.

virtual void makVrv::DtExtrudedPolygonModelInstance::getOutsideColor ( float &  r,
float &  g,
float &  b,
float &  a 
) const
virtual

Gets the outside color of the line.

virtual void makVrv::DtExtrudedPolygonModelInstance::setColor ( float  r,
float  g,
float  b,
float  a 
)
virtual

Sets the inside and outside color.

Reimplemented from makVrv::DtExtrudedModelInstance.

virtual void makVrv::DtExtrudedPolygonModelInstance::updatePoints ( )
protectedvirtual

Overridden to also create top/bottom geode points if filled.

Reimplemented from makVrv::DtExtrudedModelInstance.

virtual void makVrv::DtExtrudedPolygonModelInstance::updatePolygons ( )
protectedvirtual

Creates the top/bottom polygons as necessary.

virtual void makVrv::DtExtrudedPolygonModelInstance::addTop ( )
protectedvirtual

Adds top polygon.

virtual void makVrv::DtExtrudedPolygonModelInstance::addBottom ( )
protectedvirtual

Adds bottom polygon.

virtual void makVrv::DtExtrudedPolygonModelInstance::updateColors ( )
protectedvirtual

Updates colors.

Reimplemented from makVrv::DtExtrudedModelInstance.

virtual void makVrv::DtExtrudedPolygonModelInstance::updateStippling ( )
protectedvirtual

Updates stippling.

Reimplemented from makVrv::DtExtrudedModelInstance.

virtual void makVrv::DtExtrudedPolygonModelInstance::calculateCenterPoints ( )
protectedvirtual

Given the points, calculate the center of the top and bottom polygon to be used for fill.

Then place the top point as the first and bottom as the second of the myFillArray

Member Data Documentation

osg::ref_ptr<osg::Geode> makVrv::DtExtrudedPolygonModelInstance::myCoverGeode
protected
osg::ref_ptr<osg::Vec3Array> makVrv::DtExtrudedPolygonModelInstance::myFillArray
protected
osg::ref_ptr<osg::Geometry> makVrv::DtExtrudedPolygonModelInstance::myTopGeometry
protected
osg::ref_ptr<osg::Geometry> makVrv::DtExtrudedPolygonModelInstance::myBottomGeometry
protected
bool makVrv::DtExtrudedPolygonModelInstance::myFilled
protected
DtExtrudedPolygonModel::PolygonMode makVrv::DtExtrudedPolygonModelInstance::myPolygonMode
protected
osg::Vec4 makVrv::DtExtrudedPolygonModelInstance::myInsideColor
protected
float makVrv::DtExtrudedPolygonModelInstance::myLightingOffClamp
protected

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

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)