Click or drag to resize

Light Class

Describes a light source in the scene. Assimp supports multiple light sources including spot, point, and directional lights. All are defined by a single structure and distinguished by their parameters. Lights have corresponding nodes in the scenegraph.

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.

Inheritance Hierarchy
SystemObject
  Internal.AssimpLight

Namespace: Internal.Assimp
Assembly: NeoAxis.Core (in NeoAxis.Core.dll) Version: 2026.2.1.0 (2026.2.1.0)
Syntax
C#
public sealed class Light : IMarshalable<Light, AiLight>

The Light type exposes the following members.

Constructors
 NameDescription
Public methodLight Constructs a new instance of the Light class.
Top
Properties
 NameDescription
Public propertyAngleInnerCone 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.
Public propertyAngleOuterCone 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.
Public propertyAreaSize Gets or sets the Width (X) and Height (Y) of the area that represents an Area light.
Public propertyAttenuationConstant 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.

Public propertyAttenuationLinear 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.

Public propertyAttenuationQuadratic 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.

Public propertyColorAmbient 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.
Public propertyColorDiffuse 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.
Public propertyColorSpecular 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.
Public propertyDirection 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.
Public propertyLightType Gets or sets the type of light source. This should never be undefined.
Public propertyName Gets or sets the name of the light source. This corresponds to a node present in the scenegraph.
Public propertyPosition 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.
Public propertyUp 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.
Top
Methods
 NameDescription
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodStatic memberFreeNative Frees unmanaged memory created by ToNative(IntPtr, Native).
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Top
Extension Methods
 NameDescription
Public Extension MethodMethodInvoke Calls the object method by name.
(Defined by ObjectEx)
Public Extension MethodPropertyGet Gets the value of the object property by name.
(Defined by ObjectEx)
Public Extension MethodPropertyGetT Gets the value of the object property by name.
(Defined by ObjectEx)
Public Extension MethodPropertySet Sets the value of the object property by name.
(Defined by ObjectEx)
Top
See Also