VR-Forces 5.0.3 Developer's Guide
 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 | Private Member Functions
makVrv::DtCubeModelInstance Class Reference

Model instance to draw a cuboid.

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

Public Member Functions

 DtCubeModelInstance (DtDe &de)
 
virtual ~DtCubeModelInstance ()
 
virtual void setDimensions (float x, float y, float z)
 
void dimensions (float &length, float &width, float &height)
 
virtual void setColor (float r, float g, float b, float a)
 
const osg::Vec4 & color () const
 
virtual void setLightingEnabled (bool enabled)
 
virtual bool realize (DtModelDefinition &definition)
 
virtual void setVisible (bool isVisible)
 
virtual void setContributesToBound (bool trueOrFalse)
 
- Public Member Functions inherited from makVrv::DtOsgModelInstance
virtual ~DtOsgModelInstance ()
 
virtual bool cloneInstance (DtModelDefinition &definition)
 
virtual void addToConnector (DtOsgSceneConnector *connector)
 
virtual bool removeFromConnector (DtOsgSceneConnector *connector)
 
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)
 
bool contributesToBound () const
 

Protected Member Functions

virtual void updateColors ()
 
virtual void updateTransform ()
 
void createBlendedGeodes ()
 
void createOpaqueGeode ()
 
void createSingleSidedBlendedGeode ()
 
- 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

float myLength
 
float myWidth
 
float myHeight
 
osg::Vec4 myColor
 
osg::ref_ptr< osg::Drawable > myCubeDrawable
 
osg::ref_ptr< osg::Geode > myGeode
 
osg::ref_ptr< osg::Geode > myBlendedGeode
 
osg::ref_ptr< osg::Geode > myFrontGeode
 
osg::ref_ptr< osg::Geode > myBackGeode
 
osg::ref_ptr
< osg::MatrixTransform > 
myTransform
 
osg::ref_ptr< osg::Material > myMaterial
 
bool mySingleSided
 
- 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

 DtCubeModelInstance ()
 
 DtCubeModelInstance (const DtCubeModelInstance &)
 
DtCubeModelInstanceoperator= (const DtCubeModelInstance &)
 

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::DtCubeModelInstance::DtCubeModelInstance ( DtDe de)

CTOR.

virtual makVrv::DtCubeModelInstance::~DtCubeModelInstance ( )
virtual

DTOR.

makVrv::DtCubeModelInstance::DtCubeModelInstance ( )
private

Default Constructor not implemented.

makVrv::DtCubeModelInstance::DtCubeModelInstance ( const DtCubeModelInstance )
private

Copy Constructor not implemented - Copy not allowed.

Member Function Documentation

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

Assignment Operator not implemented - Copy not allowed.

virtual void makVrv::DtCubeModelInstance::setDimensions ( float  x,
float  y,
float  z 
)
virtual

Set the dimensions of the cube.

void makVrv::DtCubeModelInstance::dimensions ( float &  length,
float &  width,
float &  height 
)

Get the dimensions of the cube.

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

Set the color of the cube.

const osg::Vec4& makVrv::DtCubeModelInstance::color ( ) const

Get the color of the cube.

virtual void makVrv::DtCubeModelInstance::setLightingEnabled ( bool  enabled)
virtual

Set lighting enabled or disabled (default disabled)

virtual bool makVrv::DtCubeModelInstance::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 "Cuboid".

Reimplemented from makVrv::DtOsgModelInstance.

virtual void makVrv::DtCubeModelInstance::setVisible ( bool  isVisible)
inlinevirtual

no-op

Implements makVrv::DtModelInstance.

virtual void makVrv::DtCubeModelInstance::setContributesToBound ( bool  trueOrFalse)
virtual

Override to recalculate bounding box if starts to contribute.

Reimplemented from makVrv::DtModelInstance.

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

Update the color in the material.

virtual void makVrv::DtCubeModelInstance::updateTransform ( )
protectedvirtual

Update the transform matrix of the cylinder.

void makVrv::DtCubeModelInstance::createBlendedGeodes ( )
protected

Creates the geodes needed when doing alpha blending.

void makVrv::DtCubeModelInstance::createOpaqueGeode ( )
protected

Creates the geodes when NOT doing alpha blending.

void makVrv::DtCubeModelInstance::createSingleSidedBlendedGeode ( )
protected

Creates the geode when single sided and alpha blending.

Member Data Documentation

float makVrv::DtCubeModelInstance::myLength
protected

The current parameter set.

float makVrv::DtCubeModelInstance::myWidth
protected
float makVrv::DtCubeModelInstance::myHeight
protected
osg::Vec4 makVrv::DtCubeModelInstance::myColor
protected
osg::ref_ptr<osg::Drawable> makVrv::DtCubeModelInstance::myCubeDrawable
protected
osg::ref_ptr<osg::Geode> makVrv::DtCubeModelInstance::myGeode
protected

Geode to draw the geometry when no blending is required.

osg::ref_ptr<osg::Geode> makVrv::DtCubeModelInstance::myBlendedGeode
protected

Geode to draw the geometry when single-sided blending is required.

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

Geode to draw the geometry with backface culling.

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

Geode to draw the geometry with frontface culling.

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

My tranform.

osg::ref_ptr<osg::Material> makVrv::DtCubeModelInstance::myMaterial
protected

My Material.

bool makVrv::DtCubeModelInstance::mySingleSided
protected

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

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)