Light Class |
Some file formats such as 3DS and ASE export a "target point", e.g. the point a spot light is looking at (it can even be animated). Assimp writes the target point as a subnode of a spotlight's main node called "spotName.Target". However, this is just additional information then, the transform tracks of the main node make the spot light already point in the right direction.
public sealed class Light : IMarshalable<Light, AiLight>
The Light type exposes the following members.
| Name | Description | |
|---|---|---|
| AngleInnerCone | Gets or sets the inner angle of a spot light's light cone. The spot light has maximum influence on objects inside this angle. The angle is given in radians, it is 2PI for point lights and defined for directional lights. | |
| AngleOuterCone | Gets or sets the outer angle of a spot light's light cone. The spot light does not affect objects outside this angle. The angle is given in radians. It is 2PI for point lights and undefined for directional lights. The outer angle must be greater than or equal to the inner angle. | |
| AreaSize | Gets or sets the Width (X) and Height (Y) of the area that represents an Area light. | |
| AttenuationConstant |
Gets or sets the constant light attenuation factor. The intensity of the light source
at a given distance 'd' from the light position is Atten = 1 / (att0 + att1 * d + att2 * d*d).
This member corresponds to the att0 variable in the equation and is undefined for directional lights. | |
| AttenuationLinear |
Gets or sets the linear light attenuation factor. The intensity of the light source
at a given distance 'd' from the light position is Atten = 1 / (att0 + att1 * d + att2 * d*d)This member corresponds to the att1 variable in the equation and is undefined for directional lights. | |
| AttenuationQuadratic |
Gets or sets the quadratic light attenuation factor. The intensity of the light source
at a given distance 'd' from the light position is Atten = 1 / (att0 + att1 * d + att2 * d*d).
This member corresponds to the att2 variable in the equation and is undefined for directional lights. | |
| ColorAmbient | Gets or sets the ambient color of the light source. The ambient light color is multiplied with the ambient material color to obtain the final color that contributes to the ambient shading term. | |
| ColorDiffuse | Gets or sets the diffuse color of the light source. The diffuse light color is multiplied with the diffuse material color to obtain the final color that contributes to the diffuse shading term. | |
| ColorSpecular | Gets or sets the specular color of the light source. The specular light color is multiplied with the specular material color to obtain the final color that contributes to the specular shading term. | |
| Direction | Gets or sets the direction of the light source in space, relative to the transformation of the node corresponding to the light. This is undefined for point lights. | |
| LightType | Gets or sets the type of light source. This should never be undefined. | |
| Name | Gets or sets the name of the light source. This corresponds to a node present in the scenegraph. | |
| Position | Gets or sets the position of the light source in space, relative to the transformation of the node corresponding to the light. This is undefined for directional lights. | |
| Up | Gets or sets the up vector of the light source in space, relative to the transformation of the node corresponding to the light. This is undefined for point lights. |
| Name | Description | |
|---|---|---|
| Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) | |
| FreeNative | Frees unmanaged memory created by ToNative(IntPtr, Native). | |
| GetHashCode | Serves as the default hash function. (Inherited from Object) | |
| GetType | Gets the Type of the current instance. (Inherited from Object) | |
| ToString | Returns a string that represents the current object. (Inherited from Object) |
| Name | Description | |
|---|---|---|
| MethodInvoke |
Calls the object method by name.
(Defined by ObjectEx) | |
| PropertyGet |
Gets the value of the object property by name.
(Defined by ObjectEx) | |
| PropertyGetT |
Gets the value of the object property by name.
(Defined by ObjectEx) | |
| PropertySet |
Sets the value of the object property by name.
(Defined by ObjectEx) |