VR-Forces 4.6.1 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
makVrv::DtLight Class Reference

Class for generic lights. More...

Public Member Functions

 DtLight (void)
 CTOR.
 ~DtLight ()
 DTOR.
void setPosition (const Vector3_64 &vPosition)
 Only relevant to Point and Spot Lights.
const Vector3_64position (void) const
void setDirection (const Vector3_64 &vDirection)
 Only relevant to Directional and Spot Lights.
const Vector3_64direction (void) const
LightGroup lightGroup () const
 Which group is this light under (prop, terrain, none)
void setLightGroup (LightGroup group)
 Set the group this light belongs to (props, terrain, none)
const AxisAlignedBoundingBox_64getWorldAABB (void) const
DtLightoperator= (const DtLight &rhs)
void setOn (bool bOn)
 Turn light on or off.
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.
LightType lightType (void) const
void setAmbientColor (const DtColorValue &color)
 Set ambient, diffuse, specular properties.
void setDiffuseColor (const DtColorValue &color)
void setSpecularColor (const DtColorValue &color)
const DtColorValueambientColor (void) const
 Get ambient, diffuse, specular properties.
const DtColorValuediffuseColor (void) const
const DtColorValuespecularColor (void) const
void setRange (float32 fRange)
 Range and Squared Range.
float32 range (void) const
float32 squaredRange (void) const
void setAttenuation (float32 fConstant, float32 fLinear, float32 fQuadratic)
 Attenuation properties.
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.
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.
const DtUserObjectBindingsgetUserObjectBindings (void) const
void setUserData (void *pUserData)
 User Data.
void * userData () const

Static Public Member Functions

static const std::string & getReservedBindingKey (void)

Public Attributes

float64 myTempValue

Private Member Functions

void UpdateBounds (void)

Private Attributes

LightType myLightType
DtColorValue myAmbientColor
DtColorValue myDiffuseColor
DtColorValue mySpecularColor
Vector3_64 myVecPosition
 Applicable only to point lights and spot lights.
Vector3_64 myVecDirection
 Applicable only to directional lights.
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.
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.
float32 myfFallOff
 Decrease in illumination between a spotlight's inner cone and the outer edge of the outer cone.
bool mybIsOn
DtUserObjectBindings myUserObjectBindings
void * myUserData
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.

Static Private Attributes

static const std::string mystrReservedBinding
LightSignal signal_LightUpdated
 Light signals.
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 ( void  )

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::setUserData ( void *  pUserData)
inline

User Data.

void* makVrv::DtLight::userData ( ) 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)
void makVrv::DtLight::UpdateBounds ( void  )
private

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
DtUserObjectBindings makVrv::DtLight::myUserObjectBindings
private
void* makVrv::DtLight::myUserData
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.


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

Document ID: Generated on Wed Jul 25 16:57:45 EDT 2018 from SVN revision 190790
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)