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 sub-node of a spot-lights'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.
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 |
|---|---|
| public static class | AILight.
An array of |
| Modifier and Type | Field and Description |
|---|---|
| public static final int | ALIGNOF
The struct alignment in bytes. |
| public static final int | MANGLEINNERCONE
The struct member offsets. |
| public static final int | MANGLEOUTERCONE
The struct member offsets. |
| public static final int | MATTENUATIONCONSTANT
The struct member offsets. |
| public static final int | MATTENUATIONLINEAR
The struct member offsets. |
| public static final int | MATTENUATIONQUADRATIC
The struct member offsets. |
| public static final int | MCOLORAMBIENT
The struct member offsets. |
| public static final int | MCOLORDIFFUSE
The struct member offsets. |
| public static final int | MCOLORSPECULAR
The struct member offsets. |
| public static final int | MDIRECTION
The struct member offsets. |
| public static final int | MNAME
The struct member offsets. |
| public static final int | MPOSITION
The struct member offsets. |
| public static final int | MSIZE
The struct member offsets. |
| public static final int | MTYPE
The struct member offsets. |
| public static final int | MUP
The struct member offsets. |
| public static final int | SIZEOF
The struct size in bytes. |
| Access | Constructor and Description |
|---|---|
| protected | |
| public | AILight(ByteBuffer container)
Creates a |
| Modifier and Type | Method and Description |
|---|---|
| protected AILight | create(long
the struct memory address address, ByteBuffer an optional container buffer, to be referenced strongly by the struct instance. container)Implements abstract org. the constructor, but returns the exact type of the Struct subclass.
|
| public static AILight | |
| public static AILight. | create(long
the memory address address, int the buffer capacity capacity)Create a |
| public static AILight | |
| public static AILight. | |
| public float | |
| public float | |
| public float | |
| public float | |
| public float | |
| public AIColor3D | |
| public AIColor3D | |
| public AIColor3D | |
| public AIVector3D | |
| public AIString | |
| public AIVector3D | |
| public AIVector2D | |
| public int | |
| public AIVector3D | |
| public static float | |
| public static float | |
| public static float | |
| public static float | |
| public static float | |
| public static AIColor3D | |
| public static AIColor3D | |
| public static AIColor3D | |
| public static AIVector3D | |
| public static AIString | |
| public static AIVector3D | |
| public static AIVector2D | |
| public static int | |
| public static AIVector3D | |
| public int |
| ALIGNOF | back to summary |
|---|---|
| public static final int ALIGNOF The struct alignment in bytes. | |
| MANGLEINNERCONE | back to summary |
|---|---|
| public static final int MANGLEINNERCONE The struct member offsets. | |
| MANGLEOUTERCONE | back to summary |
|---|---|
| public static final int MANGLEOUTERCONE The struct member offsets. | |
| MATTENUATIONCONSTANT | back to summary |
|---|---|
| public static final int MATTENUATIONCONSTANT The struct member offsets. | |
| MATTENUATIONLINEAR | back to summary |
|---|---|
| public static final int MATTENUATIONLINEAR The struct member offsets. | |
| MATTENUATIONQUADRATIC | back to summary |
|---|---|
| public static final int MATTENUATIONQUADRATIC The struct member offsets. | |
| MCOLORAMBIENT | back to summary |
|---|---|
| public static final int MCOLORAMBIENT The struct member offsets. | |
| MCOLORDIFFUSE | back to summary |
|---|---|
| public static final int MCOLORDIFFUSE The struct member offsets. | |
| MCOLORSPECULAR | back to summary |
|---|---|
| public static final int MCOLORSPECULAR The struct member offsets. | |
| MDIRECTION | back to summary |
|---|---|
| public static final int MDIRECTION The struct member offsets. | |
| MNAME | back to summary |
|---|---|
| public static final int MNAME The struct member offsets. | |
| MPOSITION | back to summary |
|---|---|
| public static final int MPOSITION The struct member offsets. | |
| MSIZE | back to summary |
|---|---|
| public static final int MSIZE The struct member offsets. | |
| MTYPE | back to summary |
|---|---|
| public static final int MTYPE The struct member offsets. | |
| MUP | back to summary |
|---|---|
| public static final int MUP The struct member offsets. | |
| SIZEOF | back to summary |
|---|---|
| public static final int SIZEOF The struct size in bytes. | |
| AILight | back to summary |
|---|---|
| protected AILight(long address, ByteBuffer container) | |
| AILight | back to summary |
|---|---|
| public AILight(ByteBuffer container) Creates a The created instance holds a strong reference to the container object. | |
| create | back to summary |
|---|---|
| protected AILight create(long address, ByteBuffer container) Implements abstract org. Doc from org. Similar to Effectively, every
| |
| create | back to summary |
|---|---|
| public static AILight create(long address) Returns a new | |
| create | back to summary |
|---|---|
| public static AILight. Create a
| |
| createSafe | back to summary |
|---|---|
| public static AILight createSafe(long address) Like
| |
| createSafe | back to summary |
|---|---|
| public static AILight. Like
| |
| mAngleInnerCone | back to summary |
|---|---|
| public float 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 | back to summary |
|---|---|
| public float 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. | |
| mAttenuationConstant | back to summary |
|---|---|
| public float mAttenuationConstant() Constant light attenuation factor. The intensity of the light source at a given distance 'd' from the light's position is
| |
| mAttenuationLinear | back to summary |
|---|---|
| public float mAttenuationLinear() Linear light attenuation factor. The intensity of the light source at a given distance 'd' from the light's position is
| |
| mAttenuationQuadratic | back to summary |
|---|---|
| public float mAttenuationQuadratic() Quadratic light attenuation factor. The intensity of the light source at a given distance 'd' from the light's position is
| |
| mColorAmbient | back to summary |
|---|---|
| public AIColor3D 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.
| |
| mColorDiffuse | back to summary |
|---|---|
| public AIColor3D 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 | back to summary |
|---|---|
| public AIColor3D 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.
| |
| mDirection | back to summary |
|---|---|
| public AIVector3D 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.
| |
| mName | back to summary |
|---|---|
| public AIString mName() The name of the light source. There must be a node in the scene-graph with the same name. This node specifies the position of the light in the scene hierarchy and can be animated.
| |
| mPosition | back to summary |
|---|---|
| public AIVector3D 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.
| |
| mSize | back to summary |
|---|---|
| public AIVector2D mSize() Size of area light source.
| |
| mType | back to summary | |||||
|---|---|---|---|---|---|---|
| public int mType() The type of the light source.
| ||||||
| mUp | back to summary |
|---|---|
| public AIVector3D 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.
| |
| nmAngleInnerCone | back to summary |
|---|---|
| public static float nmAngleInnerCone(long struct) Unsafe version of | |
| nmAngleOuterCone | back to summary |
|---|---|
| public static float nmAngleOuterCone(long struct) Unsafe version of | |
| nmAttenuationConstant | back to summary |
|---|---|
| public static float nmAttenuationConstant(long struct) Unsafe version of | |
| nmAttenuationLinear | back to summary |
|---|---|
| public static float nmAttenuationLinear(long struct) Unsafe version of | |
| nmAttenuationQuadratic | back to summary |
|---|---|
| public static float nmAttenuationQuadratic(long struct) Unsafe version of | |
| nmColorAmbient | back to summary |
|---|---|
| public static AIColor3D nmColorAmbient(long struct) Unsafe version of | |
| nmColorDiffuse | back to summary |
|---|---|
| public static AIColor3D nmColorDiffuse(long struct) Unsafe version of | |
| nmColorSpecular | back to summary |
|---|---|
| public static AIColor3D nmColorSpecular(long struct) Unsafe version of | |
| nmDirection | back to summary |
|---|---|
| public static AIVector3D nmDirection(long struct) Unsafe version of | |
| nmName | back to summary |
|---|---|
| public static AIString nmName(long struct) Unsafe version of | |
| nmPosition | back to summary |
|---|---|
| public static AIVector3D nmPosition(long struct) Unsafe version of | |
| nmSize | back to summary |
|---|---|
| public static AIVector2D nmSize(long struct) Unsafe version of | |
| nmType | back to summary |
|---|---|
| public static int nmType(long struct) Unsafe version of | |
| nmUp | back to summary |
|---|---|
| public static AIVector3D nmUp(long struct) Unsafe version of | |
| sizeof | back to summary |
|---|---|
| public int sizeof() Implements abstract org. Doc from org. Returns
| |
AILight structs.
| Modifier and Type | Field and Description |
|---|---|
| private static final AILight |
| Access | Constructor and Description |
|---|---|
| public | Buffer(ByteBuffer container)
Creates a new |
| public | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| protected AILight | |
| public float | |
| public float | |
| public float | |
| public float | |
| public float | |
| public AIColor3D | |
| public AIColor3D | |
| public AIColor3D | |
| public AIVector3D | |
| public AIString | |
| public AIVector3D | |
| public AIVector2D | |
| public int | |
| public AIVector3D | |
| protected AILight. |
| ELEMENT_FACTORY | back to summary |
|---|---|
| private static final AILight ELEMENT_FACTORY | |
| Buffer | back to summary |
|---|---|
| public Buffer(ByteBuffer container) Creates a new Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values
will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided
by The created buffer instance holds a strong reference to the container object. | |
| Buffer | back to summary |
|---|---|
| public Buffer(long address, int cap) | |
| Buffer | back to summary |
|---|---|
| pack-priv Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap) | |
| getElementFactory | back to summary |
|---|---|
| protected AILight getElementFactory() Implements abstract org.
| |
| mAngleInnerCone | back to summary |
|---|---|
public float mAngleInnerCone()
| |
| mAngleOuterCone | back to summary |
|---|---|
public float mAngleOuterCone()
| |
| mAttenuationConstant | back to summary |
|---|---|
public float mAttenuationConstant()
| |
| mAttenuationLinear | back to summary |
|---|---|
public float mAttenuationLinear()
| |
| mAttenuationQuadratic | back to summary |
|---|---|
public float mAttenuationQuadratic()
| |
| mColorAmbient | back to summary |
|---|---|
public AIColor3D mColorAmbient()
| |
| mColorDiffuse | back to summary |
|---|---|
public AIColor3D mColorDiffuse()
| |
| mColorSpecular | back to summary |
|---|---|
public AIColor3D mColorSpecular()
| |
| mDirection | back to summary |
|---|---|
public AIVector3D mDirection()
| |
| mName | back to summary |
|---|---|
public AIString mName()
| |
| mPosition | back to summary |
|---|---|
public AIVector3D mPosition()
| |
| mSize | back to summary |
|---|---|
public AIVector2D mSize()
| |
| mType | back to summary |
|---|---|
public int mType()
| |
| mUp | back to summary |
|---|---|
public AIVector3D mUp()
| |
| self | back to summary |
|---|---|
| protected AILight. Implements abstract org.
| |