Top Description Inners Fields Constructors Methods
org.lwjgl.assimp

public Class AILight

extends Struct<AILight>
Class Inheritance
Annotations
@NativeType:struct aiLight
Imports
javax.annotation.*, java.nio.*, org.lwjgl.system.*

Helper structure to describe 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 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.

Layout


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;
}

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
AILight.Buffer

An array of AILight structs.

Field Summary

Modifier and TypeField 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.

Inherited from org.lwjgl.system.Struct:
containerDEFAULT_ALIGN_ASDEFAULT_PACK_ALIGNMENT

Constructor Summary

AccessConstructor and Description
protected
AILight(long address, ByteBuffer container)

public
AILight(ByteBuffer container)

Creates a AILight instance at the current position of the specified ByteBuffer container.

Method Summary

Modifier and TypeMethod 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.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.
public static AILight
create(long address)

Returns a new AILight instance for the specified memory address.

public static AILight.Buffer
create(long
the memory address
address
,
int
the buffer capacity
capacity
)

Create a AILight.Buffer instance at the specified memory.

public static AILight
createSafe(long address)

Like create, but returns null if address is NULL.

public static AILight.Buffer
createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

public float
mAngleInnerCone()

Inner angle of a spot light's light cone.

public float
mAngleOuterCone()

Outer angle of a spot light's light cone.

public float
mAttenuationConstant()

Constant light attenuation factor.

public float
mAttenuationLinear()

Linear light attenuation factor.

public float
mAttenuationQuadratic()

Quadratic light attenuation factor.

public AIColor3D
mColorAmbient()

Ambient color of the light source.

public AIColor3D
mColorDiffuse()

Diffuse color of the light source.

public AIColor3D
mColorSpecular()

Specular color of the light source.

public AIVector3D
mDirection()

Direction of the light source in space.

public AIString
mName()

The name of the light source.

public AIVector3D
mPosition()

Position of the light source in space.

public AIVector2D
mSize()

Size of area light source.

public int
mType()

The type of the light source.

public AIVector3D
mUp()

Up direction of the light source in space.

public static float
nmAngleInnerCone(long struct)

Unsafe version of mAngleInnerCone.

public static float
nmAngleOuterCone(long struct)

Unsafe version of mAngleOuterCone.

public static float
nmAttenuationConstant(long struct)

Unsafe version of mAttenuationConstant.

public static float
nmAttenuationLinear(long struct)

Unsafe version of mAttenuationLinear.

public static float
nmAttenuationQuadratic(long struct)

Unsafe version of mAttenuationQuadratic.

public static AIColor3D
nmColorAmbient(long struct)

Unsafe version of mColorAmbient.

public static AIColor3D
nmColorDiffuse(long struct)

Unsafe version of mColorDiffuse.

public static AIColor3D
nmColorSpecular(long struct)

Unsafe version of mColorSpecular.

public static AIVector3D
nmDirection(long struct)

Unsafe version of mDirection.

public static AIString
nmName(long struct)

Unsafe version of mName.

public static AIVector3D
nmPosition(long struct)

Unsafe version of mPosition.

public static AIVector2D
nmSize(long struct)

Unsafe version of mSize.

public static int
nmType(long struct)

Unsafe version of mType.

public static AIVector3D
nmUp(long struct)

Unsafe version of mUp.

public int
sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).
Inherited from org.lwjgl.system.Struct:
__array__array__array__checkContainer__checkMalloc__create__getContainer__getContainer__member__member__member__padding__padding__struct__struct__union__unionclearfreeisNullvalidate

Field Detail

ALIGNOFback to summary
public static final int ALIGNOF

The struct alignment in bytes.

MANGLEINNERCONEback to summary
public static final int MANGLEINNERCONE

The struct member offsets.

MANGLEOUTERCONEback to summary
public static final int MANGLEOUTERCONE

The struct member offsets.

MATTENUATIONCONSTANTback to summary
public static final int MATTENUATIONCONSTANT

The struct member offsets.

MATTENUATIONLINEARback to summary
public static final int MATTENUATIONLINEAR

The struct member offsets.

MATTENUATIONQUADRATICback to summary
public static final int MATTENUATIONQUADRATIC

The struct member offsets.

MCOLORAMBIENTback to summary
public static final int MCOLORAMBIENT

The struct member offsets.

MCOLORDIFFUSEback to summary
public static final int MCOLORDIFFUSE

The struct member offsets.

MCOLORSPECULARback to summary
public static final int MCOLORSPECULAR

The struct member offsets.

MDIRECTIONback to summary
public static final int MDIRECTION

The struct member offsets.

MNAMEback to summary
public static final int MNAME

The struct member offsets.

MPOSITIONback to summary
public static final int MPOSITION

The struct member offsets.

MSIZEback to summary
public static final int MSIZE

The struct member offsets.

MTYPEback to summary
public static final int MTYPE

The struct member offsets.

MUPback to summary
public static final int MUP

The struct member offsets.

SIZEOFback to summary
public static final int SIZEOF

The struct size in bytes.

Constructor Detail

AILightback to summary
protected AILight(long address, ByteBuffer container)
AILightback to summary
public AILight(ByteBuffer container)

Creates a 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.

Method Detail

createback to summary
protected AILight create(long address, ByteBuffer container)

Implements abstract org.lwjgl.system.Struct.create.

Doc from org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.

Effectively, every Struct instance is a factory for more instances of the same type. This is used by StructBuffer.

Parameters
address:long

the struct memory address

container:ByteBuffer

an optional container buffer, to be referenced strongly by the struct instance.

Annotations
@Override
createback to summary
public static AILight create(long address)

Returns a new AILight instance for the specified memory address.

createback to summary
public static AILight.Buffer create(long address, int capacity)

Create a AILight.Buffer instance at the specified memory.

Parameters
address:long

the memory address

capacity:int

the buffer capacity

createSafeback to summary
public static AILight createSafe(long address)

Like create, but returns null if address is NULL.

Annotations
@Nullable
createSafeback to summary
public static AILight.Buffer createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

Annotations
@Nullable
mAngleInnerConeback 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.

mAngleOuterConeback 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.

mAttenuationConstantback 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 Atten = 1/( att0 + att1 * d + att2 * d*d). This member corresponds to the att0 variable in the equation. Naturally undefined for directional lights.

mAttenuationLinearback 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 Atten = 1/( att0 + att1 * d + att2 * d*d). This member corresponds to the att1 variable in the equation. Naturally undefined for directional lights.

mAttenuationQuadraticback 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 Atten = 1/( att0 + att1 * d + att2 * d*d). This member corresponds to the att2 variable in the equation. Naturally undefined for directional lights.

mColorAmbientback 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.

Annotations
@NativeType:struct aiColor3D
mColorDiffuseback 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.

Annotations
@NativeType:struct aiColor3D
mColorSpecularback 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.

Annotations
@NativeType:struct aiColor3D
mDirectionback 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.

Annotations
@NativeType:struct aiVector3D
mNameback 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.

Annotations
@NativeType:struct aiString
mPositionback 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.

Annotations
@NativeType:struct aiVector3D
mSizeback to summary
public AIVector2D mSize()

Size of area light source.

Annotations
@NativeType:struct aiVector2D
mTypeback to summary
public int mType()

The type of the light source. LightSource_UNDEFINED is not a valid value for this member. One of:

LightSource_DIRECTIONALLightSource_POINTLightSource_SPOTLightSource_AMBIENT
LightSource_AREA
Annotations
@NativeType:aiLightSourceType
mUpback 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.

Annotations
@NativeType:struct aiVector3D
nmAngleInnerConeback to summary
public static float nmAngleInnerCone(long struct)

Unsafe version of mAngleInnerCone.

nmAngleOuterConeback to summary
public static float nmAngleOuterCone(long struct)

Unsafe version of mAngleOuterCone.

nmAttenuationConstantback to summary
public static float nmAttenuationConstant(long struct)

Unsafe version of mAttenuationConstant.

nmAttenuationLinearback to summary
public static float nmAttenuationLinear(long struct)

Unsafe version of mAttenuationLinear.

nmAttenuationQuadraticback to summary
public static float nmAttenuationQuadratic(long struct)

Unsafe version of mAttenuationQuadratic.

nmColorAmbientback to summary
public static AIColor3D nmColorAmbient(long struct)

Unsafe version of mColorAmbient.

nmColorDiffuseback to summary
public static AIColor3D nmColorDiffuse(long struct)

Unsafe version of mColorDiffuse.

nmColorSpecularback to summary
public static AIColor3D nmColorSpecular(long struct)

Unsafe version of mColorSpecular.

nmDirectionback to summary
public static AIVector3D nmDirection(long struct)

Unsafe version of mDirection.

nmNameback to summary
public static AIString nmName(long struct)

Unsafe version of mName.

nmPositionback to summary
public static AIVector3D nmPosition(long struct)

Unsafe version of mPosition.

nmSizeback to summary
public static AIVector2D nmSize(long struct)

Unsafe version of mSize.

nmTypeback to summary
public static int nmType(long struct)

Unsafe version of mType.

nmUpback to summary
public static AIVector3D nmUp(long struct)

Unsafe version of mUp.

sizeofback to summary
public int sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Doc from org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).

Annotations
@Override
org.lwjgl.assimp back to summary

public Class AILight.Buffer

extends StructBuffer<AILight, AILight.Buffer>
Class Inheritance

An array of AILight structs.

Field Summary

Modifier and TypeField and Description
private static final AILight

Constructor Summary

AccessConstructor and Description
public
Buffer(ByteBuffer container)

Creates a new AILight.Buffer instance backed by the specified container.

public
Buffer(long address, int cap)

pack-priv
Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap)

Method Summary

Modifier and TypeMethod and Description
protected AILight
public float

Returns:

the value of the AILight#mAngleInnerCone field.
mAngleInnerCone
()

public float

Returns:

the value of the AILight#mAngleOuterCone field.
mAngleOuterCone
()

public float

Returns:

the value of the AILight#mAttenuationConstant field.
mAttenuationConstant
()

public float

Returns:

the value of the AILight#mAttenuationLinear field.
mAttenuationLinear
()

public float

Returns:

the value of the AILight#mAttenuationQuadratic field.
mAttenuationQuadratic
()

public AIColor3D

Returns:

a AIColor3D view of the AILight#mColorAmbient field.
mColorAmbient
()

public AIColor3D

Returns:

a AIColor3D view of the AILight#mColorDiffuse field.
mColorDiffuse
()

public AIColor3D

Returns:

a AIColor3D view of the AILight#mColorSpecular field.
mColorSpecular
()

public AIVector3D

Returns:

a AIVector3D view of the AILight#mDirection field.
mDirection
()

public AIString

Returns:

a AIString view of the AILight#mName field.
mName
()

public AIVector3D

Returns:

a AIVector3D view of the AILight#mPosition field.
mPosition
()

public AIVector2D

Returns:

a AIVector2D view of the AILight#mSize field.
mSize
()

public int

Returns:

the value of the AILight#mType field.
mType
()

public AIVector3D

Returns:

a AIVector3D view of the AILight#mUp field.
mUp
()

protected AILight.Buffer
Inherited from org.lwjgl.system.StructBuffer:
applyapplyforEachgetgetgetgetiteratorparallelStreamputputsizeofspliteratorstream

Field Detail

ELEMENT_FACTORYback to summary
private static final AILight ELEMENT_FACTORY

Constructor Detail

Bufferback to summary
public Buffer(ByteBuffer container)

Creates a new AILight.Buffer instance backed by the specified container.

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 AILight#SIZEOF, and its mark will be undefined.

The created buffer instance holds a strong reference to the container object.

Bufferback to summary
public Buffer(long address, int cap)
Bufferback to summary
pack-priv Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap)

Method Detail

getElementFactoryback to summary
protected AILight getElementFactory()

Implements abstract org.lwjgl.system.StructBuffer.getElementFactory.

Annotations
@Override
mAngleInnerConeback to summary
public float mAngleInnerCone()
Returns:float

the value of the AILight#mAngleInnerCone field.

mAngleOuterConeback to summary
public float mAngleOuterCone()
Returns:float

the value of the AILight#mAngleOuterCone field.

mAttenuationConstantback to summary
public float mAttenuationConstant()
Returns:float

the value of the AILight#mAttenuationConstant field.

mAttenuationLinearback to summary
public float mAttenuationLinear()
Returns:float

the value of the AILight#mAttenuationLinear field.

mAttenuationQuadraticback to summary
public float mAttenuationQuadratic()
Returns:float

the value of the AILight#mAttenuationQuadratic field.

mColorAmbientback to summary
public AIColor3D mColorAmbient()
Returns:AIColor3D

a AIColor3D view of the AILight#mColorAmbient field.

Annotations
@NativeType:struct aiColor3D
mColorDiffuseback to summary
public AIColor3D mColorDiffuse()
Returns:AIColor3D

a AIColor3D view of the AILight#mColorDiffuse field.

Annotations
@NativeType:struct aiColor3D
mColorSpecularback to summary
public AIColor3D mColorSpecular()
Returns:AIColor3D

a AIColor3D view of the AILight#mColorSpecular field.

Annotations
@NativeType:struct aiColor3D
mDirectionback to summary
public AIVector3D mDirection()
Returns:AIVector3D

a AIVector3D view of the AILight#mDirection field.

Annotations
@NativeType:struct aiVector3D
mNameback to summary
public AIString mName()
Returns:AIString

a AIString view of the AILight#mName field.

Annotations
@NativeType:struct aiString
mPositionback to summary
public AIVector3D mPosition()
Returns:AIVector3D

a AIVector3D view of the AILight#mPosition field.

Annotations
@NativeType:struct aiVector3D
mSizeback to summary
public AIVector2D mSize()
Returns:AIVector2D

a AIVector2D view of the AILight#mSize field.

Annotations
@NativeType:struct aiVector2D
mTypeback to summary
public int mType()
Returns:int

the value of the AILight#mType field.

Annotations
@NativeType:aiLightSourceType
mUpback to summary
public AIVector3D mUp()
Returns:AIVector3D

a AIVector3D view of the AILight#mUp field.

Annotations
@NativeType:struct aiVector3D
selfback to summary
protected AILight.Buffer self()

Implements abstract org.lwjgl.system.CustomBuffer.self.

Annotations
@Override