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

Class for generic lights. More...

Public Member Functions

 DtLight (DtLightManager *lightManager)
 CTOR. More...
 
 ~DtLight ()
 DTOR. More...
 
void setPosition (const Vector3_64 &vPosition)
 Only relevant to Point and Spot Lights. More...
 
const Vector3_64position (void) const
 
void setDirection (const Vector3_64 &vDirection)
 Only relevant to Directional and Spot Lights. More...
 
const Vector3_64direction (void) const
 
LightGroup lightGroup () const
 Which group is this light under (prop, terrain, none) More...
 
void setLightGroup (LightGroup group)
 Set the group this light belongs to (props, terrain, none) More...
 
const AxisAlignedBoundingBox_64getWorldAABB (void) const
 
DtLightoperator= (const DtLight &rhs)
 
bool isInitted () const
 
void setOn (bool bOn)
 Turn light on or off. More...
 
bool isOn (void) const
 
void setLightType (LightType lightType)
 Turn light on or off This is separate so as to enable pooling of lights so that a previous light of type x in the pool can be picked up and used as a light of a different type y, or the same type for that matter. More...
 
LightType lightType (void) const
 
void setAmbientColor (const DtColorValue &color)
 Set ambient, diffuse, specular properties. More...
 
void setDiffuseColor (const DtColorValue &color)
 
void setSpecularColor (const DtColorValue &color)
 
const DtColorValueambientColor (void) const
 Get ambient, diffuse, specular properties. More...
 
const DtColorValuediffuseColor (void) const
 
const DtColorValuespecularColor (void) const
 
void setRange (float32 fRange)
 Range and Squared Range. More...
 
float32 range (void) const
 
float32 squaredRange (void) const
 
void setAttenuation (float32 fConstant, float32 fLinear, float32 fQuadratic)
 Attenuation properties. More...
 
float32 constantAttenuation (void) const
 
float32 linearAttenuation (void) const
 
float32 quadraticAttenuation (void) const
 
void getAttenuation (float32 attenuations[3]) const
 
void setSpotLightParameters (const DtDegrees &fInnerAngleDegrees, const DtDegrees &fOuterAngleDegrees, float32 fFalloff)
 Spot Light properties. More...
 
void setSpotLightAngles (const DtDegrees &fInnerAngleDegrees, const DtDegrees &fOuterAngleDegrees)
 
void getSpotLightAngles (DtDegrees &fInnerAngleDegrees, DtDegrees &fOuterAngleDegrees)
 
DtDegrees innerAngle (void) const
 
DtDegrees outerAngle (void) const
 
float32 falloff (void) const
 
DtUserObjectBindingsgetUserObjectBindings (void)
 User object bindings. More...
 
const DtUserObjectBindingsgetUserObjectBindings (void) const
 
void setOctreeNode (void *pUserData)
 octree Data More...
 
void * octreeNode () const
 

Static Public Member Functions

static const std::string & getReservedBindingKey (void)
 

Public Attributes

float64 myTempValue
 

Private Member Functions

void getArbitraryBasisVectors (Vector3_64 &vBasis0, Vector3_64 &vBasis1) const
 Calculate two arbitrary basis vectors for the light direction. More...
 
void getArbitraryBasisPoints (float distance, boost::array< Vector3_64, 4 > &point) const
 Calculate basis points along arbitrary basis vectors with given distance. More...
 
float getAngleFactor () const
 Calculate angle multiplicative factor (see comment in C++) More...
 
Vector3_64 getSpotCenter () const
 Return the center of the distant side of the spotlight cone. More...
 
void UpdateBounds (void)
 

Private Attributes

LightType myLightType
 
DtColorValue myAmbientColor
 
DtColorValue myDiffuseColor
 
DtColorValue mySpecularColor
 
Vector3_64 myVecPosition
 Applicable only to point lights and spot lights. More...
 
Vector3_64 myVecDirection
 Applicable only to directional lights. More...
 
float32 myfRange
 
float32 myfSquaredRange
 
float32 myfConstantAttenuation
 
float32 myfLinearAttenuation
 
float32 myfQuadraticAttenuation
 
DtDegrees myfInnerAngle
 Angle of a spotlight's inner cone - that is, the fully illuminated spotlight cone. More...
 
DtDegrees myfOuterAngle
 Angle defining the outer edge of the spotlight's outer cone. Points outside this cone are not lit by the spotlight. This value must be between 0 and pi. More...
 
float32 myfFallOff
 Decrease in illumination between a spotlight's inner cone and the outer edge of the outer cone. More...
 
bool mybIsOn
 
bool mybIsInitted
 init bit to keep track if it's really safe to add to the octtree More...
 
DtUserObjectBindings myUserObjectBindings
 
void * myOctreeNode
 
AxisAlignedBoundingBox_64 myWorldAABB
 
bool mySignalsEnabled
 
bool myUpdateSignalEnabled
 
LightGroup myLightGroup
 For switching on and off lights Is this light node under the DtOsgRenderer::propsRoot or under DtOsgRenderer::terrainRoot. More...
 
DtLightManagermyLightManager
 

Static Private Attributes

static const std::string mystrReservedBinding
 

Friends

class DtLightScreenSpaceData
 
LightSignal signal_LightUpdated
 Light signals. More...
 
LightSignal signal_LightBoundsUpdated
 
LightSignal signal_LightDestroyed
 
void enableSignals (bool enable)
 
bool signalsEnabled (void) const
 
void enableUpdateSignals (bool enable)
 

Detailed Description

Class for generic lights.

Constructor & Destructor Documentation

makVrv::DtLight::DtLight ( DtLightManager lightManager)

CTOR.

makVrv::DtLight::~DtLight ( )

DTOR.

Member Function Documentation

void makVrv::DtLight::setOn ( bool  bOn)

Turn light on or off.

bool makVrv::DtLight::isOn ( void  ) const
inline
void makVrv::DtLight::setLightType ( LightType  lightType)

Turn light on or off This is separate so as to enable pooling of lights so that a previous light of type x in the pool can be picked up and used as a light of a different type y, or the same type for that matter.

LightType makVrv::DtLight::lightType ( void  ) const
void makVrv::DtLight::setAmbientColor ( const DtColorValue color)

Set ambient, diffuse, specular properties.

void makVrv::DtLight::setDiffuseColor ( const DtColorValue color)
void makVrv::DtLight::setSpecularColor ( const DtColorValue color)
const DtColorValue& makVrv::DtLight::ambientColor ( void  ) const

Get ambient, diffuse, specular properties.

const DtColorValue& makVrv::DtLight::diffuseColor ( void  ) const
const DtColorValue& makVrv::DtLight::specularColor ( void  ) const
void makVrv::DtLight::setPosition ( const Vector3_64 vPosition)

Only relevant to Point and Spot Lights.

const Vector3_64& makVrv::DtLight::position ( void  ) const
void makVrv::DtLight::setDirection ( const Vector3_64 vDirection)

Only relevant to Directional and Spot Lights.

const Vector3_64& makVrv::DtLight::direction ( void  ) const
void makVrv::DtLight::setRange ( float32  fRange)

Range and Squared Range.

float32 makVrv::DtLight::range ( void  ) const
float32 makVrv::DtLight::squaredRange ( void  ) const
void makVrv::DtLight::setAttenuation ( float32  fConstant,
float32  fLinear,
float32  fQuadratic 
)

Attenuation properties.

float32 makVrv::DtLight::constantAttenuation ( void  ) const
float32 makVrv::DtLight::linearAttenuation ( void  ) const
float32 makVrv::DtLight::quadraticAttenuation ( void  ) const
void makVrv::DtLight::getAttenuation ( float32  attenuations[3]) const
void makVrv::DtLight::setSpotLightParameters ( const DtDegrees fInnerAngleDegrees,
const DtDegrees fOuterAngleDegrees,
float32  fFalloff 
)

Spot Light properties.

void makVrv::DtLight::setSpotLightAngles ( const DtDegrees fInnerAngleDegrees,
const DtDegrees fOuterAngleDegrees 
)
void makVrv::DtLight::getSpotLightAngles ( DtDegrees fInnerAngleDegrees,
DtDegrees fOuterAngleDegrees 
)
DtDegrees makVrv::DtLight::innerAngle ( void  ) const
DtDegrees makVrv::DtLight::outerAngle ( void  ) const
float32 makVrv::DtLight::falloff ( void  ) const
DtUserObjectBindings& makVrv::DtLight::getUserObjectBindings ( void  )

User object bindings.

const DtUserObjectBindings& makVrv::DtLight::getUserObjectBindings ( void  ) const
void makVrv::DtLight::setOctreeNode ( void *  pUserData)

octree Data

void* makVrv::DtLight::octreeNode ( ) const
inline
void makVrv::DtLight::enableSignals ( bool  enable)
bool makVrv::DtLight::signalsEnabled ( void  ) const
void makVrv::DtLight::enableUpdateSignals ( bool  enable)
LightGroup makVrv::DtLight::lightGroup ( ) const

Which group is this light under (prop, terrain, none)

void makVrv::DtLight::setLightGroup ( LightGroup  group)

Set the group this light belongs to (props, terrain, none)

const AxisAlignedBoundingBox_64& makVrv::DtLight::getWorldAABB ( void  ) const
static const std::string& makVrv::DtLight::getReservedBindingKey ( void  )
inlinestatic
DtLight& makVrv::DtLight::operator= ( const DtLight rhs)
bool makVrv::DtLight::isInitted ( ) const
inline
void makVrv::DtLight::getArbitraryBasisVectors ( Vector3_64 vBasis0,
Vector3_64 vBasis1 
) const
private

Calculate two arbitrary basis vectors for the light direction.

void makVrv::DtLight::getArbitraryBasisPoints ( float  distance,
boost::array< Vector3_64, 4 > &  point 
) const
private

Calculate basis points along arbitrary basis vectors with given distance.

float makVrv::DtLight::getAngleFactor ( ) const
private

Calculate angle multiplicative factor (see comment in C++)

Vector3_64 makVrv::DtLight::getSpotCenter ( ) const
private

Return the center of the distant side of the spotlight cone.

void makVrv::DtLight::UpdateBounds ( void  )
private

Friends And Related Function Documentation

friend class DtLightScreenSpaceData
friend

Member Data Documentation

LightSignal makVrv::DtLight::signal_LightUpdated

Light signals.

LightSignal makVrv::DtLight::signal_LightBoundsUpdated
LightSignal makVrv::DtLight::signal_LightDestroyed
float64 makVrv::DtLight::myTempValue
LightType makVrv::DtLight::myLightType
private
DtColorValue makVrv::DtLight::myAmbientColor
private
DtColorValue makVrv::DtLight::myDiffuseColor
private
DtColorValue makVrv::DtLight::mySpecularColor
private
Vector3_64 makVrv::DtLight::myVecPosition
private

Applicable only to point lights and spot lights.

Vector3_64 makVrv::DtLight::myVecDirection
private

Applicable only to directional lights.

float32 makVrv::DtLight::myfRange
private
float32 makVrv::DtLight::myfSquaredRange
private
float32 makVrv::DtLight::myfConstantAttenuation
private
float32 makVrv::DtLight::myfLinearAttenuation
private
float32 makVrv::DtLight::myfQuadraticAttenuation
private
DtDegrees makVrv::DtLight::myfInnerAngle
private

Angle of a spotlight's inner cone - that is, the fully illuminated spotlight cone.

DtDegrees makVrv::DtLight::myfOuterAngle
private

Angle defining the outer edge of the spotlight's outer cone. Points outside this cone are not lit by the spotlight. This value must be between 0 and pi.

float32 makVrv::DtLight::myfFallOff
private

Decrease in illumination between a spotlight's inner cone and the outer edge of the outer cone.

bool makVrv::DtLight::mybIsOn
private
bool makVrv::DtLight::mybIsInitted
private

init bit to keep track if it's really safe to add to the octtree

DtUserObjectBindings makVrv::DtLight::myUserObjectBindings
private
void* makVrv::DtLight::myOctreeNode
private
AxisAlignedBoundingBox_64 makVrv::DtLight::myWorldAABB
private
const std::string makVrv::DtLight::mystrReservedBinding
staticprivate
bool makVrv::DtLight::mySignalsEnabled
private
bool makVrv::DtLight::myUpdateSignalEnabled
private
LightGroup makVrv::DtLight::myLightGroup
private

For switching on and off lights Is this light node under the DtOsgRenderer::propsRoot or under DtOsgRenderer::terrainRoot.

DtLightManager* makVrv::DtLight::myLightManager
private

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

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)