Class AILight

    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • MNAME, MTYPE, MPOSITION, MDIRECTION, MUP, MATTENUATIONCONSTANT, MATTENUATIONLINEAR, MATTENUATIONQUADRATIC, MCOLORDIFFUSE, MCOLORSPECULAR, MCOLORAMBIENT, MANGLEINNERCONE, MANGLEOUTERCONE, MSIZE

        The struct member offsets.
    • Constructor Detail

      • AILight

        public AILight​(java.nio.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

      • sizeof

        public int sizeof()
        Specified by:
        sizeof in class org.lwjgl.system.Struct
      • mName

        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

        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.
      • mDirection

        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.
      • mUp

        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.
      • mAttenuationConstant

        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.
      • mAttenuationLinear

        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.
      • mAttenuationQuadratic

        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.
      • mColorDiffuse

        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

        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.
      • mColorAmbient

        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.
      • mAngleInnerCone

        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

        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.
      • mSize

        public AIVector2D mSize()
        Size of area light source.
      • create

        public static AILight create​(long address)
        Returns a new AILight instance for the specified memory address.
      • createSafe

        @Nullable
        public static AILight createSafe​(long address)
        Like create, but returns null if address is NULL.
      • create

        public static AILight.Buffer create​(long address,
                                            int capacity)
        Create a AILight.Buffer instance at the specified memory.
        Parameters:
        address - the memory address
        capacity - the buffer capacity
      • createSafe

        @Nullable
        public static AILight.Buffer createSafe​(long address,
                                                int capacity)
        Like create, but returns null if address is NULL.
      • nmName

        public static AIString nmName​(long struct)
        Unsafe version of mName().
      • nmType

        public static int nmType​(long struct)
        Unsafe version of mType().
      • nmUp

        public static AIVector3D nmUp​(long struct)
        Unsafe version of mUp().
      • nmAttenuationConstant

        public static float nmAttenuationConstant​(long struct)
        Unsafe version of mAttenuationConstant().
      • nmAttenuationLinear

        public static float nmAttenuationLinear​(long struct)
        Unsafe version of mAttenuationLinear().
      • nmAttenuationQuadratic

        public static float nmAttenuationQuadratic​(long struct)
        Unsafe version of mAttenuationQuadratic().
      • nmAngleInnerCone

        public static float nmAngleInnerCone​(long struct)
        Unsafe version of mAngleInnerCone().
      • nmAngleOuterCone

        public static float nmAngleOuterCone​(long struct)
        Unsafe version of mAngleOuterCone().
      • nmSize

        public static AIVector2D nmSize​(long struct)
        Unsafe version of mSize().