Class JoGLLight

  • All Implemented Interfaces:
    Light

    public class JoGLLight
    extends java.lang.Object
    implements Light
    Author:
    Pierre Lando
    • Constructor Detail

      • JoGLLight

        public JoGLLight​(com.jogamp.opengl.GL2 gl,
                         int index)
        Default constructor.
        Parameters:
        gl - the gl context.
        index - the light index.
    • Method Detail

      • reload

        public void reload​(com.jogamp.opengl.GL2 gl)
        Reload this light.
        Parameters:
        gl - the gl context.
      • isEnable

        public boolean isEnable()
        Description copied from interface: Light
        Return the status of this light.
        Specified by:
        isEnable in interface Light
        Returns:
        the status of this light.
      • setEnable

        public void setEnable​(boolean enable)
        Description copied from interface: Light
        Set the status of this light.
        Specified by:
        setEnable in interface Light
        Parameters:
        enable - the new status of this light.
      • getAmbientColor

        public Color getAmbientColor()
        Description copied from interface: Light
        Return the ambient color of this light;
        Specified by:
        getAmbientColor in interface Light
        Returns:
        the ambient color of this light;
      • setAmbientColor

        public void setAmbientColor​(Color color)
        Description copied from interface: Light
        Set the ambient color of this light.
        Specified by:
        setAmbientColor in interface Light
        Parameters:
        color - the new ambient color of this light.
      • getDiffuseColor

        public Color getDiffuseColor()
        Description copied from interface: Light
        Return the diffuse color of this light;
        Specified by:
        getDiffuseColor in interface Light
        Returns:
        the diffuse color of this light;
      • setDiffuseColor

        public void setDiffuseColor​(Color color)
        Description copied from interface: Light
        Set the diffuse color of this light.
        Specified by:
        setDiffuseColor in interface Light
        Parameters:
        color - the new diffuse color of this light.
      • getSpecularColor

        public Color getSpecularColor()
        Description copied from interface: Light
        Return the specular color of this light;
        Specified by:
        getSpecularColor in interface Light
        Returns:
        the specular color of this light;
      • setSpecularColor

        public void setSpecularColor​(Color color)
        Description copied from interface: Light
        Set the specular color of this light.
        Specified by:
        setSpecularColor in interface Light
        Parameters:
        color - the new specular color of this light.
      • getPosition

        public Vector3d getPosition()
        Description copied from interface: Light
        Return the light position.
        Specified by:
        getPosition in interface Light
        Returns:
        the light position.
      • setPosition

        public void setPosition​(Vector3d position)
        Description copied from interface: Light
        Set the light position.
        Specified by:
        setPosition in interface Light
        Parameters:
        position - the new position.
      • getSpotDirection

        public Vector3d getSpotDirection()
        Description copied from interface: Light
        Return the spot direction.
        Specified by:
        getSpotDirection in interface Light
        Returns:
        the spot direction.
      • setSpotDirection

        public void setSpotDirection​(Vector3d spotDirection)
        Description copied from interface: Light
        Set the spot direction.
        Specified by:
        setSpotDirection in interface Light
        Parameters:
        spotDirection - the new spot direction.
      • getSpotAngle

        public float getSpotAngle()
        Description copied from interface: Light
        Return the spot angle.
        Specified by:
        getSpotAngle in interface Light
        Returns:
        the spot angle.
      • setSpotAngle

        public void setSpotAngle​(float angle)
        Description copied from interface: Light
        Set the spot angle.
        Specified by:
        setSpotAngle in interface Light
        Parameters:
        angle - the new spot angle.
      • getIndex

        public int getIndex()
        Description copied from interface: Light
        Return the light index.
        Specified by:
        getIndex in interface Light
        Returns:
        the light index.