Class ShadowLight


  • public class ShadowLight
    extends Object
    Represents a shadow light in the scene. This light does not light objects up, just creating a show behind the objects.
    Author:
    Darius Dinger
    • Constructor Detail

      • ShadowLight

        public ShadowLight()
        Creating new shadow light. Create shadow map fbo and recreating every window resize
    • Method Detail

      • setQuality

        public void setQuality​(float quality)
        Setting the quality of the shadows
        Parameters:
        quality - New shadow quality
      • getLightsView

        public Camera getLightsView()
        Getting the view camera of the shadow light
        Returns:
        Read/Writeable camera of the lights view
      • updateVpMat

        public void updateVpMat()
        Updating shadow maps view projection matrix
      • getVpMat

        public javax.vecmath.Matrix4f getVpMat()
        Returns:
        View projection matrix of the shadow light
      • getShadowMap

        public FrameBufferObject getShadowMap()
        Returns:
        Fbo that stores the actual shadow map from lights position
      • setDimension

        public void setDimension​(float w,
                                 float h,
                                 float f)
        Changes the dimension of the shadow lights view frustum
        Parameters:
        w - Width of the frustum
        h - Height of the frustum
        f - Far plane/Length of the frustum