Class PSSMCamera

java.lang.Object
com.ardor3d.renderer.Camera
com.ardor3d.extension.shadow.map.PSSMCamera
All Implemented Interfaces:
Savable, Externalizable, Serializable

public class PSSMCamera extends Camera
Camera with additional pssm related functionality.
See Also:
  • Field Details

    • _splitDistances

      protected double[] _splitDistances
      The storage place for calculated split distances.
    • _lambda

      protected double _lambda
      The lambda value used in split distance calculations.
    • _corners

      protected final Vector3[] _corners
      The corners of the camera frustum.
    • _center

      protected final Vector3 _center
      The center of the camera frustum.
    • _extents

      protected final Vector3 _extents
      Temporary vector used for storing extents during corner calculations.
    • _maxFarPlaneDistance

      protected double _maxFarPlaneDistance
      The maximum far plane distance used when packing the frustum.
  • Constructor Details

    • PSSMCamera

      public PSSMCamera()
      Instantiates a new PSSM camera.
    • PSSMCamera

      public PSSMCamera(int width, int height)
      Instantiates a new PSSM camera.
      Parameters:
      width - the width
      height - the height
    • PSSMCamera

      public PSSMCamera(Camera source)
      Instantiates a new PSSM camera.
      Parameters:
      source - the source
  • Method Details

    • calculateSplitDistances

      public void calculateSplitDistances(int splitCount)
      Calculates the distances from view location for view frustum splits using the "practical split scheme".
      Parameters:
      splitCount - the split count
      See Also:
    • pack

      public void pack(BoundingVolume sceneBounds)
      Compress this camera's near and far frustum planes to be smaller if possible, using the given bounds as a measure.
      Parameters:
      sceneBounds - the scene bounds
    • updateMaxCameraFar

      public void updateMaxCameraFar()
    • calculateFrustum

      public void calculateFrustum(double fNear, double fFar)
      Calculate frustum corners and center.
      Parameters:
      fNear - the near distance
      fFar - the far distance
    • getLambda

      public double getLambda()
      Gets the lambda.
      Returns:
      the lambda
    • setLambda

      public void setLambda(double lambda)
      Sets the lambda.
      Parameters:
      lambda - the new lambda
    • getSplitDistances

      public double[] getSplitDistances()
      Gets the split distances.
      Returns:
      the split distances
    • getMaxFarPlaneDistance

      public double getMaxFarPlaneDistance()
      Gets the max far plane distance.
      Returns:
      the max far plane distance
    • setMaxFarPlaneDistance

      public void setMaxFarPlaneDistance(double maxFarPlaneDistance)
      Sets the max far plane distance.
      Parameters:
      maxFarPlaneDistance - the new max far plane distance