com.aspose.threed

Interfaces

Classes

Enums

Exceptions

com.aspose.threed

Class Light

  • All Implemented Interfaces:
    IOrientable


    public class Light
    extends Frustum
    The light illuminates the scene.

    The formula to calculate the total attenuation of light is: A = ConstantAttenuation + (Dist * LinearAttenuation) + ((Dist^2) * QuadraticAttenuation)

    • Constructor Detail

      • Light

        public Light()
        Initializes a new instance of the Light class.
      • Light

        public Light(String name)
        Initializes a new instance of the Light class.
        Parameters:
        name - Name
      • Light

        public Light(String name,
                     LightType type)
        Initializes a new instance of the Light class.
        Parameters:
        name - Name
        type - New light's type
    • Method Detail

      • getColor

        public Vector3 getColor()
        Gets the light's color
      • setColor

        public void setColor(Vector3 value)
        Sets the light's color
        Parameters:
        value - New value
      • getLightType

        public LightType getLightType()
        Gets the light's type
      • setLightType

        public void setLightType(LightType value)
        Sets the light's type
        Parameters:
        value - New value
      • getCastLight

        public boolean getCastLight()
        Gets if the current light instance can illuminate other objects.
      • setCastLight

        public void setCastLight(boolean value)
        Sets if the current light instance can illuminate other objects.
        Parameters:
        value - New value
      • getIntensity

        public double getIntensity()
        Gets the light's intensity, default value is 100
      • setIntensity

        public void setIntensity(double value)
        Sets the light's intensity, default value is 100
        Parameters:
        value - New value
      • getHotSpot

        public double getHotSpot()
        Gets the hot spot cone angle(in degrees).
      • setHotSpot

        public void setHotSpot(double value)
        Sets the hot spot cone angle(in degrees).
        Parameters:
        value - New value
      • getFalloff

        public double getFalloff()
        Gets the falloff cone angle (in degrees).
      • setFalloff

        public void setFalloff(double value)
        Sets the falloff cone angle (in degrees).
        Parameters:
        value - New value
      • getConstantAttenuation

        public double getConstantAttenuation()
        Gets the constant attenuation to calculate the total attenuation of the light
      • setConstantAttenuation

        public void setConstantAttenuation(double value)
        Sets the constant attenuation to calculate the total attenuation of the light
        Parameters:
        value - New value
      • getLinearAttenuation

        public double getLinearAttenuation()
        Gets the linear attenuation to calculate the total attenuation of the light
      • setLinearAttenuation

        public void setLinearAttenuation(double value)
        Sets the linear attenuation to calculate the total attenuation of the light
        Parameters:
        value - New value
      • getQuadraticAttenuation

        public double getQuadraticAttenuation()
        Gets the quadratic attenuation to calculate the total attenuation of the light
      • setQuadraticAttenuation

        public void setQuadraticAttenuation(double value)
        Sets the quadratic attenuation to calculate the total attenuation of the light
        Parameters:
        value - New value
      • getCastShadows

        public boolean getCastShadows()
        Gets if the light can cast shadows on other objects.
      • setCastShadows

        public void setCastShadows(boolean value)
        Sets if the light can cast shadows on other objects.
        Parameters:
        value - New value
      • getShadowColor

        public Vector3 getShadowColor()
        Gets the shadow's color.
      • setShadowColor

        public void setShadowColor(Vector3 value)
        Sets the shadow's color.
        Parameters:
        value - New value