LightProperties struct

From Solid Graphics Wiki

Jump to: navigation, search
LightProperties struct
Namespace: SKL3D
Base type: (None)
Include: Skl3DDraw.h
Lib (Release): SKL.lib
Lib (Debug): SKL_D.lib

The LightProperties class specifies an OpenGL light properties using it's ambient, diffuse, specular, spot and attenuation attributes. The attributes are defined the same as OpenGL light attributes with the same name.



Constructors

Default LightProperties struct constructor does not initialize the light properties to any value. This is on purpose for performance reasons. Other struct constructor allow to initialize the light using it's diffuse, specular and ambien color properties. The spotCutOffAngle is initialized to 180.0f, spotExponent to 0.0f, constantAttenuation to 1.0f, linearAttenuation and quadraticAttenuation to 0.0f.

Fields

For more information about light properties please see OpenGL documentation.

Field name Type Description
diffuseColor Color Light's diffuse color component value.
specularColor Color Light's specular color component value.
ambientColor Color Light's ambient color component value.
spotCutOffAngle float Spot-light cut-off angle.
spotExponent float Spotlight exponent.
constantAttenuation float Light's constant attenuation property.
linearAttenuation float Light's linear attenuation property.
quadraticAttenuation float Light's quadratic attenuation property.

Methods

Method name Description
LoadFromXML Loads the light properties from XmlReader.
SaveToXML Saves the light properties to MemoryBuffer as XML.

Operators

The struct has no operator defined.

See Also

   


SolidKit Library Documentation

Personal tools