VR-Forces 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 Attributes
makVrv::DtOsgLightModel Class Reference

DtOsgLightModel is the concrete implementation of DtLightModel. This class creates and manages a DtLight object from the vrvGraphicsUtils project.

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

Public Member Functions

 DtOsgLightModel (DtDe &de, DtUniqueID id)
 
virtual ~DtOsgLightModel ()
 
virtual void setPosition (int vtx, const DtVector &position) override
 
virtual void setOrientation (int vtx, const DtTaitBryan &orientation) override
 
virtual void setOn (bool bOn) override
 
virtual bool isOn () const override
 
virtual void setLightType (unsigned int lightType) override
 
virtual unsigned int lightType () const override
 
virtual const DtVector & lightPosition () const override
 
virtual void setLightDirection (const DtVector &direction) override
 
virtual const DtVector & lightDirection () const override
 
virtual void setDiffuseColor (float r, float g, float b, float a) override
 
virtual void setAmbientColor (float r, float g, float b, float a) override
 
virtual void setSpecularColor (float r, float g, float b, float a) override
 
virtual void setRange (float range) override
 
virtual float range () const override
 
virtual void setAttenuation (float constant, float linear, float quadratic) override
 
virtual void setSpotLightParameters (float innerAngleDegrees, float outerAngleDegrees, float falloff) override
 
virtual void setSensorMask (unsigned int mask) override
 
virtual unsigned int sensorMask () const override
 
virtual void addToScene (const DtUniqueID &sceneObjectId, DtModelSetId modelSet, int visualizerType) override
 
virtual void removeFromScene () override
 
DtLight * light () const
 
virtual void setIsSupportModel (bool isSupport) override
 
 DtOsgLightModel ()=delete
 
 DtOsgLightModel (const DtOsgLightModel &)=delete
 
 DtOsgLightModel (const DtOsgLightModel &&)=delete
 
DtOsgLightModel & operator= (const DtOsgLightModel &)=delete
 
DtOsgLightModel & operator= (const DtOsgLightModel &&)=delete
 
- Public Member Functions inherited from makVrv::DtLightModel
 DtLightModel (DtDe &de, DtUniqueID id)
 
virtual ~DtLightModel ()
 
 DtLightModel ()=delete
 
 DtLightModel (const DtLightModel &)=delete
 
 DtLightModel (const DtLightModel &&)=delete
 
DtLightModel & operator= (const DtLightModel &)=delete
 
DtLightModel & operator= (const DtLightModel &&)=delete
 
- Public Member Functions inherited from makVrv::DtModel
 DtModel (DtDe &de, DtUniqueID id)
 
virtual ~DtModel ()
 
virtual DtModelInstance * createModelInstance (const std::string &modelDefName, bool realize)
 
virtual DtModelInstance * createModelInstance (const DtModelDefinition &definition, bool realize)
 
virtual void setModelDefinition (const std::string &str)
 
virtual const std::string & modelDefinitionName ()
 
virtual void saveModelToFile (const std::string &filename)
 
virtual const std::string & className () const
 
virtual DtUniqueID uniqueId () const
 
unsigned int transformSize () const
 
virtual const DtVector & position (int vtx=0) const
 
virtual void removePosition (int vtx)
 
virtual void setPositionOffset (const DtVector &positionOffset)
 
virtual const DtVector & positionOffset () const
 
virtual void setPositionAndOrientation (int vtx, const DtVector &positionOffset, const DtTaitBryan &orientation)
 
virtual const DtTaitBryan & orientation (int vtx=0) const
 
virtual void setOrientationOffset (const DtTaitBryan &orientationOffset)
 
virtual const DtTaitBryan & orientationOffset () const
 
virtual void enableColorBlending (bool b)
 
virtual void setBlendColor (float r, float g, float b, float a)
 
virtual void getBlendColor (float &r, float &g, float &b, float &a)
 
virtual bool colorBlendingEnabled () const
 
virtual void setColor (float r, float g, float b, float a)
 
virtual void enableLighting (bool l)
 
virtual DtModelSetId modelSet () const
 
const DtVector & boundingBoxExtents () const
 
void getBoundingBoxExtents (double &x, double &y, double &z) const
 
const DtVector & boundingBoxCenter () const
 
virtual void getBoundingBoxCenter (double &x, double &y, double &z) const
 
virtual void getBoundingBoxComponents (DtVector &minimum, DtVector &maximum)
 
void setContributesToBound (bool trueOrFalse)
 
bool contributesToBound () const
 
DtDe & de ()
 
virtual void setModelInstance (DtModelInstance *modelInstance)
 
virtual void promoteBackgroundModelInstance (const DtModelDefinition &defintion)
 
virtual void setVisible (bool isVisible)
 
virtual bool visible () const
 
virtual unsigned int getSensorMask () const
 
DtUniqueID sceneObjectId () const
 
virtual void addedToSceneObjectAsProp (const DtUniqueID &sceneObj)
 
virtual void addedToSceneObject (const DtUniqueID &sceneObj, DtModelSetId modelSet, int visualizerType)
 
virtual void setElementId (DtElementID id)
 
virtual void removedFromSceneObject ()
 
virtual void setSolid (bool isSolid)
 
virtual bool isProp ()
 
virtual void updateMinLastFrameDistance (float distance)
 
virtual void resetLastFrameDistance ()
 
virtual float minLastFrameDistance () const
 
virtual DtModelInstance * modelInstance ()
 
virtual const DtModelInstance * modelInstance () const
 
int visualizerType () const
 
virtual bool supportsMultithreadedLoad ()
 
virtual void backgroundLoad (DtBackgroundLoadContext &context)
 
virtual void foregroundLoad ()
 
virtual bool isActivelyBackgroundLoading ()
 
virtual DtLoaderHandle * getLoadQueueHandle ()
 

Protected Attributes

DtOsgLightManager & myOsgLightManager
 
DtLight * myLight
 
DtVector myLightPosition
 
DtVector myLightDirection
 
LightType myLightType
 
unsigned int myLightTypeId
 
unsigned int mySensorMask
 
float myRange
 
float myAttenuationConstant
 
float myAttenuationLinear
 
float myAttenuationQuadratic
 
float mySpotInnerAngleDegrees
 
float mySpotOuterAngleDegrees
 
float mySpotFalloff
 
DtColorValue myDiffuseColor
 
DtColorValue myAmbientColor
 
DtColorValue mySpecularColor
 
bool myLightIsOn
 
- Protected Attributes inherited from makVrv::DtModel
DtLoaderHandle * myInLoadQueueHandle
 
DtDe & myDe
 
const DtUniqueID myUniqueId
 
DtUniqueID myElementId
 
DtUniqueID myParentSceneObjectID
 
DtModelInstance * myBackgroundModelInstance
 
TransformList myTransforms
 
DtModelInstance * myModelInstance
 
DtModelSetId myModelSet
 
int myVisualizerType
 
bool myContributesToBound
 
bool myIsPropFlag
 
bool myColorBlendingEnabled
 
bool myVisibleFlag
 
float myBlendColor [4]
 
unsigned int mySensorMask
 
DtVector myPositionOffset
 
DtTaitBryan myOrientationOffset
 
std::string myModelDefinitionName
 
float myMinLastFrameDistance
 
bool myRequireModelInstance
 

Additional Inherited Members

- Public Attributes inherited from makVrv::DtModel
boost::signalslib::signal
< void(DtModel *)> 
signal_modelToBeDestroyed
 
boost::signalslib::signal
< void(DtModel *)> 
signal_modelChanged
 
boost::signalslib::signal
< bool(DtModel *, bool),
SlotReturnOR > 
signal_visibilityChangeRequested
 
boost::signalslib::signal
< void(DtModelInstance
*, DtModel *)> 
signal_modelInstanceCreated
 
boost::signalslib::signal
< void(DtModelInstance
*, DtModel *)> 
signal_modelInstanceToBeDestroyed
 
- Protected Types inherited from makVrv::DtModel
typedef std::vector
< ObjectTransform > 
TransformList
 
- Protected Member Functions inherited from makVrv::DtModel
virtual void addToSceneAsProp (const DtUniqueID &sceneObjectId)
 
virtual void initializeModelInstance ()
 
void slot_modelInstanceChanged (DtModelInstance *instance)
 
virtual void waitAndClearLoadHandle ()
 
virtual void removedFromLoadQueue ()
 
virtual void setDoneBackgroundLoading ()
 
virtual void setActivelyBackgroundLoading ()
 
- Static Protected Attributes inherited from makVrv::DtModel
static bool theInittedState
 

Constructor & Destructor Documentation

makVrv::DtOsgLightModel::DtOsgLightModel ( DtDe &  de,
DtUniqueID  id 
)

CTOR.

virtual makVrv::DtOsgLightModel::~DtOsgLightModel ( )
virtual

DTOR.

makVrv::DtOsgLightModel::DtOsgLightModel ( )
delete

Not allowed.

makVrv::DtOsgLightModel::DtOsgLightModel ( const DtOsgLightModel &  )
delete

Not allowed.

makVrv::DtOsgLightModel::DtOsgLightModel ( const DtOsgLightModel &&  )
delete

Not allowed.

Member Function Documentation

DtOsgLightModel& makVrv::DtOsgLightModel::operator= ( const DtOsgLightModel &  )
delete

Not allowed.

DtOsgLightModel& makVrv::DtOsgLightModel::operator= ( const DtOsgLightModel &&  )
delete

Not allowed.

virtual void makVrv::DtOsgLightModel::setPosition ( int  vtx,
const DtVector &  position 
)
overridevirtual

Set the position of a control vertex in the model.

Reimplemented from makVrv::DtModel.

virtual void makVrv::DtOsgLightModel::setOrientation ( int  vtx,
const DtTaitBryan &  orientation 
)
overridevirtual

Set the orientation of a vertex in the model.

Reimplemented from makVrv::DtModel.

virtual void makVrv::DtOsgLightModel::setOn ( bool  bOn)
overridevirtual

Set whether the light is on or off.

Implements makVrv::DtLightModel.

virtual bool makVrv::DtOsgLightModel::isOn ( ) const
overridevirtual

Get whether the light is on or off.

Implements makVrv::DtLightModel.

virtual void makVrv::DtOsgLightModel::setLightType ( unsigned int  lightType)
overridevirtual

Set the light type (directional, point, spotlight) LT_DIRECTIONAL = 0 LT_POINT = 1 LT_SPOTLIGHT = 2.

Implements makVrv::DtLightModel.

virtual unsigned int makVrv::DtOsgLightModel::lightType ( ) const
overridevirtual

Get the light type.

Implements makVrv::DtLightModel.

virtual const DtVector& makVrv::DtOsgLightModel::lightPosition ( ) const
overridevirtual

Get the position of the light.

Implements makVrv::DtLightModel.

virtual void makVrv::DtOsgLightModel::setLightDirection ( const DtVector &  direction)
overridevirtual

Set the direction of the light (for directional and spot lights)

Implements makVrv::DtLightModel.

virtual const DtVector& makVrv::DtOsgLightModel::lightDirection ( ) const
overridevirtual

Get the direction of the light.

Implements makVrv::DtLightModel.

virtual void makVrv::DtOsgLightModel::setDiffuseColor ( float  r,
float  g,
float  b,
float  a 
)
overridevirtual

Set the diffuse color of the light.

Implements makVrv::DtLightModel.

virtual void makVrv::DtOsgLightModel::setAmbientColor ( float  r,
float  g,
float  b,
float  a 
)
overridevirtual

Set the ambient color of the light.

Implements makVrv::DtLightModel.

virtual void makVrv::DtOsgLightModel::setSpecularColor ( float  r,
float  g,
float  b,
float  a 
)
overridevirtual

Set the specular color of the light.

Implements makVrv::DtLightModel.

virtual void makVrv::DtOsgLightModel::setRange ( float  range)
overridevirtual

Set the range of the light (for point and spot lights)

Implements makVrv::DtLightModel.

virtual float makVrv::DtOsgLightModel::range ( ) const
overridevirtual

Get the range of the light.

Implements makVrv::DtLightModel.

virtual void makVrv::DtOsgLightModel::setAttenuation ( float  constant,
float  linear,
float  quadratic 
)
overridevirtual

Set attenuation factors for the light.

Implements makVrv::DtLightModel.

virtual void makVrv::DtOsgLightModel::setSpotLightParameters ( float  innerAngleDegrees,
float  outerAngleDegrees,
float  falloff 
)
overridevirtual

Set spotlight parameters (inner angle, outer angle, falloff)

Implements makVrv::DtLightModel.

virtual void makVrv::DtOsgLightModel::setSensorMask ( unsigned int  mask)
overridevirtual

Set the sensor mask (which sensor modes the light is visible in)

Implements makVrv::DtLightModel.

virtual unsigned int makVrv::DtOsgLightModel::sensorMask ( ) const
overridevirtual

Get the sensor mask.

Implements makVrv::DtLightModel.

virtual void makVrv::DtOsgLightModel::addToScene ( const DtUniqueID &  sceneObjectId,
DtModelSetId  modelSet,
int  visualizerType 
)
overridevirtual

Attach the light to the scene.

Implements makVrv::DtModel.

virtual void makVrv::DtOsgLightModel::removeFromScene ( )
overridevirtual

Detach the light from the scene.

Implements makVrv::DtModel.

DtLight* makVrv::DtOsgLightModel::light ( ) const
inline

Get the underlying DtLight object.

virtual void makVrv::DtOsgLightModel::setIsSupportModel ( bool  isSupport)
overridevirtual

Set whether the model is part of the support group (whether or not other scene objects can ground clamp to this model)

Implements makVrv::DtModel.

Member Data Documentation

DtOsgLightManager& makVrv::DtOsgLightModel::myOsgLightManager
protected
DtLight* makVrv::DtOsgLightModel::myLight
protected
DtVector makVrv::DtOsgLightModel::myLightPosition
protected
DtVector makVrv::DtOsgLightModel::myLightDirection
protected
LightType makVrv::DtOsgLightModel::myLightType
protected
unsigned int makVrv::DtOsgLightModel::myLightTypeId
protected
unsigned int makVrv::DtOsgLightModel::mySensorMask
protected
float makVrv::DtOsgLightModel::myRange
protected
float makVrv::DtOsgLightModel::myAttenuationConstant
protected
float makVrv::DtOsgLightModel::myAttenuationLinear
protected
float makVrv::DtOsgLightModel::myAttenuationQuadratic
protected
float makVrv::DtOsgLightModel::mySpotInnerAngleDegrees
protected
float makVrv::DtOsgLightModel::mySpotOuterAngleDegrees
protected
float makVrv::DtOsgLightModel::mySpotFalloff
protected
DtColorValue makVrv::DtOsgLightModel::myDiffuseColor
protected
DtColorValue makVrv::DtOsgLightModel::myAmbientColor
protected
DtColorValue makVrv::DtOsgLightModel::mySpecularColor
protected
bool makVrv::DtOsgLightModel::myLightIsOn
protected

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

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)