29 #ifndef __ShadowCameraSetupLiSPSM_H__
30 #define __ShadowCameraSetupLiSPSM_H__
A 3D box aligned with the x/y/z axes.
A viewpoint from which the scene will be rendered.
Wrapper class which indicates a given angle value is in Degrees.
Internal class holding a point list representation of a convex body.
Implements the uniform shadow mapping algorithm in focused mode.
Implements the Light Space Perspective Shadow Mapping Algorithm.
Real calculateNOpt(const Matrix4 &lightSpace, const AxisAlignedBox &bodyBABB_ls, const PointListBody &bodyLVS, const Camera &cam) const
Calculates the distance between camera position and near clipping plane.
Matrix4 buildFrustumProjection(Real left, Real right, Real bottom, Real top, Real near, Real far) const
Builds a frustum matrix.
bool mUseSimpleNOpt
Use simple nopt derivation?
Matrix4 calculateLiSPSM(const Matrix4 &lightSpace, const PointListBody &bodyB, const PointListBody &bodyLVS, const SceneManager &sm, const Camera &cam, const Light &light) const
Calculates the LiSPSM projection matrix P.
virtual void setCameraLightDirectionThreshold(Degree angle)
Sets the threshold between the camera and the light direction below which the LiSPSM projection is 'f...
Vector3 calculateZ0_ls(const Matrix4 &lightSpace, const Vector3 &e, Real bodyB_zMax_ls, const Camera &cam) const
Calculates the visible point on the near plane for the n_opt calculation.
Real mCosCamLightDirThreshold
Threshold (cos angle) within which to start increasing the opt adjust as camera direction approaches ...
Real mOptAdjustFactorTweak
Extra calculated warp factor.
LiSPSMShadowCameraSetup(void)
Default constructor.
virtual Real getOptimalAdjustFactor() const
Get the parameter n used to produce optimal shadows.
virtual void getShadowCamera(const SceneManager *sm, const Camera *cam, const Viewport *vp, const Light *light, Camera *texCam, size_t iteration) const
Returns a LiSPSM shadow camera.
virtual void setOptimalAdjustFactor(Real n)
Adjusts the parameter n to produce optimal shadows.
virtual ~LiSPSMShadowCameraSetup(void)
Default destructor.
Real mOptAdjustFactor
Warp factor adjustment.
virtual Degree getCameraLightDirectionThreshold() const
Sets the threshold between the camera and the light direction below which the LiSPSM projection is 'f...
virtual bool getUseSimpleOptimalAdjust() const
Gets whether or not to use a slightly simpler version of the camera near point derivation (default is...
Real calculateNOptSimple(const PointListBody &bodyLVS, const Camera &cam) const
Calculates a simpler version than the one above.
virtual void setUseSimpleOptimalAdjust(bool s)
Sets whether or not to use a slightly simpler version of the camera near point derivation (default is...
Representation of a dynamic light source in the scene.
Class encapsulating a standard 4x4 homogeneous matrix.
Manages the organisation and rendering of a 'scene' i.e.
Standard 3-dimensional vector.
An abstraction of a viewport, i.e.
float Real
Software floating point type.