A3DGraphPointLightData Struct Reference

Data for a point light source entity (A3DGraphPointLight) More...

Data Fields

A3DDouble m_dConstantAttenuation
 Constant attenuation factor usually set to 1.0.
 
A3DDouble m_dLinearAttenuation
 Linear attenuation factor.
 
A3DDouble m_dQuadraticAttenuation
 Quadratic attenuation factor.
 
A3DVector3dData m_sLocation
 The light source position in world space coordinates.
 
A3DUns32 m_uiAmbientColorIndex
 The main or ambient color of the light source.
 
A3DUns32 m_uiDiffuseColorIndex
 The diffuse color of the light source.
 
A3DUns32 m_uiSpecularColorIndex
 The specular color of the light source.
 

Detailed Description

Data for a point light source entity (A3DGraphPointLight)

Version
2.0

A point light, or position light, is a light source with a given position in the world space. It illuminate in all directions, with the light rays fading over the distance. Basic lighting computations on objects will mainly depend on how far they are from such light sources.

All colors within this structure are global indexes to RGB color codes. The actual values can be queried using A3DGlobalGetGraphRgbColorData.

A3DGraphPointLightData is one of the four light source types provided by HOOPS. It is associated to the kA3DTypeGraphPointLight entity type. The other available light sources are A3DGraphAmbientLightData, A3DGraphSpotLightData and A3DGraphDirectionalLightData.

Position
The position of the light source is expressed with m_sLocation in world space coordinates. The main use of a point light's position is to compute the distance between the light source and the illuminated object.
Attenuation
The phenomenon of reducing the intensity of light over the distance from its source is called attenuation. The operation is done by computing a value called attenuation factor and applying it to the light color. A light attenuation is described using three floating-point values:
Ligthing color
The color of a lighting source is usually described with a single color, referenced to by m_uiAmbientColorIndex which is applied to the receiving material. Different implementations can take benefit from making the distinction between ambient, diffuse and specular colors upon computing light. These additional information can be written into m_uiDiffuseColorIndex and m_uiSpecularColorIndex. When ununsed, these values are either set to the same value as m_uiAmbientColorIndex or A3D_DEFAULT_COLOR_INDEX.
See also
A3DGraphPointLightGet
A3DGraphPointLightCreate
A3DGraphRgbColorData
A3DGlobalGetGraphRgbColorData
A3DGlobalInsertGraphRgbColor
A3DGraphMaterialData
A3DGraphAmbientLightData
A3DGraphDirectionalLightData
A3DGraphSpotLightData