public class AILight
extends org.lwjgl.system.Struct
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.
mName –
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.mType – The type of the light source. LightSource_UNDEFINED is not a valid value for this member. One of:LightSource_DIRECTIONAL | LightSource_POINT | LightSource_SPOT | LightSource_AMBIENT |
LightSource_AREA |
mPosition –
Position of the light source in space. Relative to the transformation of the node corresponding to the light. The position is undefined for directional
lights.mDirection –
Direction of the light source in space. Relative to the transformation of the node corresponding to the light. The direction is undefined for point
lights. The vector may be normalized, but it needn't.mUp –
Up direction of the light source in space. Relative to the transformation of the node corresponding to the light. The direction is undefined for point
lights. The vector may be normalized, but it needn't.mAttenuationConstant –
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.mAttenuationLinear –
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.mAttenuationQuadratic –
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.mColorDiffuse –
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.mColorSpecular –
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.mColorAmbient –
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. Most renderers will ignore this value it, is just a remaining of the fixed-function pipeline that is still supported by quite
many file formats.mAngleInnerCone –
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.mAngleOuterCone –
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.mSize – Size of area light source.
struct aiLight {
struct aiString mName;
aiLightSourceType mType;
struct aiVector3D mPosition;
struct aiVector3D mDirection;
struct aiVector3D mUp;
float mAttenuationConstant;
float mAttenuationLinear;
float mAttenuationQuadratic;
struct aiColor3D mColorDiffuse;
struct aiColor3D mColorSpecular;
struct aiColor3D mColorAmbient;
float mAngleInnerCone;
float mAngleOuterCone;
struct aiVector2D mSize;
}| Modifier and Type | Class and Description |
|---|---|
static class |
AILight.Buffer
An array of
AILight structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
MANGLEINNERCONE
The struct member offsets.
|
static int |
MANGLEOUTERCONE
The struct member offsets.
|
static int |
MATTENUATIONCONSTANT
The struct member offsets.
|
static int |
MATTENUATIONLINEAR
The struct member offsets.
|
static int |
MATTENUATIONQUADRATIC
The struct member offsets.
|
static int |
MCOLORAMBIENT
The struct member offsets.
|
static int |
MCOLORDIFFUSE
The struct member offsets.
|
static int |
MCOLORSPECULAR
The struct member offsets.
|
static int |
MDIRECTION
The struct member offsets.
|
static int |
MNAME
The struct member offsets.
|
static int |
MPOSITION
The struct member offsets.
|
static int |
MSIZE
The struct member offsets.
|
static int |
MTYPE
The struct member offsets.
|
static int |
MUP
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
| Constructor and Description |
|---|
AILight(java.nio.ByteBuffer container)
Creates a
AILight instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
static AILight |
create(long address)
Returns a new
AILight instance for the specified memory address. |
static AILight.Buffer |
create(long address,
int capacity)
Create a
AILight.Buffer instance at the specified memory. |
static AILight |
createSafe(long address)
|
static AILight.Buffer |
createSafe(long address,
int capacity)
|
float |
mAngleInnerCone()
Returns the value of the
mAngleInnerCone field. |
float |
mAngleOuterCone()
Returns the value of the
mAngleOuterCone field. |
float |
mAttenuationConstant()
Returns the value of the
mAttenuationConstant field. |
float |
mAttenuationLinear()
Returns the value of the
mAttenuationLinear field. |
float |
mAttenuationQuadratic()
Returns the value of the
mAttenuationQuadratic field. |
AIColor3D |
mColorAmbient()
Returns a
AIColor3D view of the mColorAmbient field. |
AIColor3D |
mColorDiffuse()
Returns a
AIColor3D view of the mColorDiffuse field. |
AIColor3D |
mColorSpecular()
Returns a
AIColor3D view of the mColorSpecular field. |
AIVector3D |
mDirection()
Returns a
AIVector3D view of the mDirection field. |
AIString |
mName()
Returns a
AIString view of the mName field. |
AIVector3D |
mPosition()
Returns a
AIVector3D view of the mPosition field. |
AIVector2D |
mSize()
Returns a
AIVector2D view of the mSize field. |
int |
mType()
Returns the value of the
mType field. |
AIVector3D |
mUp()
Returns a
AIVector3D view of the mUp field. |
static float |
nmAngleInnerCone(long struct)
Unsafe version of
mAngleInnerCone(). |
static float |
nmAngleOuterCone(long struct)
Unsafe version of
mAngleOuterCone(). |
static float |
nmAttenuationConstant(long struct)
Unsafe version of
mAttenuationConstant(). |
static float |
nmAttenuationLinear(long struct)
Unsafe version of
mAttenuationLinear(). |
static float |
nmAttenuationQuadratic(long struct)
Unsafe version of
mAttenuationQuadratic(). |
static AIColor3D |
nmColorAmbient(long struct)
Unsafe version of
mColorAmbient(). |
static AIColor3D |
nmColorDiffuse(long struct)
Unsafe version of
mColorDiffuse(). |
static AIColor3D |
nmColorSpecular(long struct)
Unsafe version of
mColorSpecular(). |
static AIVector3D |
nmDirection(long struct)
Unsafe version of
mDirection(). |
static AIString |
nmName(long struct)
Unsafe version of
mName(). |
static AIVector3D |
nmPosition(long struct)
Unsafe version of
mPosition(). |
static AIVector2D |
nmSize(long struct)
Unsafe version of
mSize(). |
static int |
nmType(long struct)
Unsafe version of
mType(). |
static AIVector3D |
nmUp(long struct)
Unsafe version of
mUp(). |
int |
sizeof() |
public static final int SIZEOF
public static final int ALIGNOF
public static final int MNAME
public static final int MTYPE
public static final int MPOSITION
public static final int MDIRECTION
public static final int MUP
public static final int MATTENUATIONCONSTANT
public static final int MATTENUATIONLINEAR
public static final int MATTENUATIONQUADRATIC
public static final int MCOLORDIFFUSE
public static final int MCOLORSPECULAR
public static final int MCOLORAMBIENT
public static final int MANGLEINNERCONE
public static final int MANGLEOUTERCONE
public static final int MSIZE
public AILight(java.nio.ByteBuffer container)
AILight instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be
visible to the struct instance and vice versa.
The created instance holds a strong reference to the container object.
public int sizeof()
sizeof in class org.lwjgl.system.Structpublic int mType()
mType field.public AIVector3D mPosition()
AIVector3D view of the mPosition field.public AIVector3D mDirection()
AIVector3D view of the mDirection field.public AIVector3D mUp()
AIVector3D view of the mUp field.public float mAttenuationConstant()
mAttenuationConstant field.public float mAttenuationLinear()
mAttenuationLinear field.public float mAttenuationQuadratic()
mAttenuationQuadratic field.public AIColor3D mColorSpecular()
AIColor3D view of the mColorSpecular field.public float mAngleInnerCone()
mAngleInnerCone field.public float mAngleOuterCone()
mAngleOuterCone field.public AIVector2D mSize()
AIVector2D view of the mSize field.public static AILight create(long address)
AILight instance for the specified memory address.@Nullable public static AILight createSafe(long address)
public static AILight.Buffer create(long address, int capacity)
AILight.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static AILight.Buffer createSafe(long address, int capacity)
public static int nmType(long struct)
mType().public static AIVector3D nmPosition(long struct)
mPosition().public static AIVector3D nmDirection(long struct)
mDirection().public static AIVector3D nmUp(long struct)
mUp().public static float nmAttenuationConstant(long struct)
mAttenuationConstant().public static float nmAttenuationLinear(long struct)
mAttenuationLinear().public static float nmAttenuationQuadratic(long struct)
mAttenuationQuadratic().public static AIColor3D nmColorDiffuse(long struct)
mColorDiffuse().public static AIColor3D nmColorSpecular(long struct)
mColorSpecular().public static AIColor3D nmColorAmbient(long struct)
mColorAmbient().public static float nmAngleInnerCone(long struct)
mAngleInnerCone().public static float nmAngleOuterCone(long struct)
mAngleOuterCone().public static AIVector2D nmSize(long struct)
mSize().Copyright LWJGL. All Rights Reserved. License terms.