Assimp  v3.1.1 (June 2014)
jassimp.AiLight Class Reference

Describes a light source. More...

Public Member Functions

float getAngleInnerCone ()
 Inner angle of a spot light's light cone. More...
 
float getAngleOuterCone ()
 Outer angle of a spot light's light cone. More...
 
float getAttenuationConstant ()
 Constant light attenuation factor. More...
 
float getAttenuationLinear ()
 Linear light attenuation factor. More...
 
float getAttenuationQuadratic ()
 Quadratic light attenuation factor. More...
 
String getName ()
 Returns the name of the light source. More...
 
AiLightType getType ()
 Returns The type of the light source. More...
 

Detailed Description

Describes a light source.

Assimp supports multiple sorts of light sources, including directional, point and spot lights. All of them are defined with just a single structure and distinguished by their parameters. Note - some file formats (such as 3DS, ASE) export a "target point" - the point a spot light is looking at (it can even be animated). Assimp writes the target point as a subnode of a spotlights's main node, called "<spotName>.Target". However, this is just additional information then, the transformation tracks of the main node make the spot light already point in the right direction.

Member Function Documentation

§ getAngleInnerCone()

float jassimp.AiLight.getAngleInnerCone ( )
inline

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 undefined for directional lights.

Returns
the inner angle

§ getAngleOuterCone()

float jassimp.AiLight.getAngleOuterCone ( )
inline

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. It is assumed that the application uses a smooth interpolation between the inner and the outer cone of the spot light.

Returns
the outer angle

§ getAttenuationConstant()

float jassimp.AiLight.getAttenuationConstant ( )
inline

Constant light attenuation factor.

The intensity of the light source at a given distance 'd' from the light's position is Atten = 1/( att0 + att1 * d + att2 * d*d) This member corresponds to the att0 variable in the equation. Naturally undefined for directional lights.

Returns
the constant light attenuation factor

§ getAttenuationLinear()

float jassimp.AiLight.getAttenuationLinear ( )
inline

Linear light attenuation factor.

The intensity of the light source at a given distance 'd' from the light's position is Atten = 1/( att0 + att1 * d + att2 * d*d) This member corresponds to the att1 variable in the equation. Naturally undefined for directional lights.

Returns
the linear light attenuation factor

§ getAttenuationQuadratic()

float jassimp.AiLight.getAttenuationQuadratic ( )
inline

Quadratic light attenuation factor.

The intensity of the light source at a given distance 'd' from the light's position is Atten = 1/( att0 + att1 * d + att2 * d*d) This member corresponds to the att2 variable in the equation. Naturally undefined for directional lights.

Returns
the quadratic light attenuation factor

§ getName()

String jassimp.AiLight.getName ( )
inline

Returns the name of the light source.

There must be a node in the scenegraph with the same name. This node specifies the position of the light in the scene hierarchy and can be animated.

Returns
the name

§ getType()

AiLightType jassimp.AiLight.getType ( )
inline

Returns The type of the light source.

Returns
the type

The documentation for this class was generated from the following file: