A3DGraphDirectionalLightData
-
struct
A3DGraphDirectionalLightData Data for a directional light source entity (
A3DGraphDirectionalLight)2.0
2.0
A directional light simulates a source which is far away from the scene. In that situation, all light rays are coming from the same direction, regardless of the position of the illuminated object or the viewer. The illumination only depends on the light orientation, and not its position.
All colors within this structure are global indexes to RGB color codes. The actual values can be queried using
A3DGlobalGetGraphRgbColorData.A3DGraphDirectionalLightDatais one of the four light source types provided by HOOPS. It is associated to thekA3DTypeGraphDirectionalLightentity type. The other available light sources areA3DGraphAmbientLightData,A3DGraphPointLightDataandA3DGraphSpotLightData.A3D_MAKE_DATAinitializesm_dIntensityto0.0. For a full-strength light, setm_dIntensityto1.0before callingA3DGraphDirectionalLightCreate.Only directional lights have an intensity value.
A3DGraphAmbientLightData,A3DGraphPointLightDataandA3DGraphSpotLightDatahave no equivalent field. For point and spot lights, the light colors set the strength and the attenuation factors reduce it with distance.HOOPS does not check or clamp the value of
m_dIntensity.A3DGraphDirectionalLightCreatestores any value, and some readers, such as the U3D reader, copy the value from the file without validation. It is up to your application to validate this value if needed.A3DGraphDirectionalLightCreate()A3DGlobalGetGraphRgbColorData()Directional light source data.
Variables
-
A3DUns32
A3DGraphDirectionalLightData.m_uiAmbientColorIndex -
The main or ambient color of the light source.
-
A3DUns32
A3DGraphDirectionalLightData.m_uiDiffuseColorIndex -
The diffuse color of the light source.
-
A3DUns32
A3DGraphDirectionalLightData.m_uiSpecularColorIndex -
The specular color of the light source.
-
A3DDouble
A3DGraphDirectionalLightData.m_dIntensity -
The intensity coefficient of the light source, expected in
[0.0 ; 1.0], where1.0is full intensity.
-
A3DVector3dData
A3DGraphDirectionalLightData.m_sDirection -
The direction of the light source, in world space coordinates.