Go to the documentation of this file.
29 #ifndef __ShadowCameraSetupFocused_H__
30 #define __ShadowCameraSetupFocused_H__
316 #endif // __ShadowCameraSetupFocused_H__
Matrix4 transformToUnitCube(const Matrix4 &m, const PointListBody &body) const
Transforms a given body to the unit cube (-1,-1,-1) / (+1,+1,+1) with a specific shadow matrix enable...
size_t getPointCount(void) const
Returns the point count.
static const Matrix4 msNormalToLightSpace
Transform to or from light space as defined by Wimmer et al.
A viewpoint from which the scene will be rendered.
Internal class holding a point list representation of a convex body.
PointListBody mPointListBodyB
This class allows you to plug in new ways to define the camera setup when rendering and projecting sh...
bool mUseAggressiveRegion
Use tighter focus region?
void setUseAggressiveFocusRegion(bool aggressive)
Sets whether or not to use the more aggressive approach to deciding on the focus region or not.
Representation of a dynamic light source in the scene.
void calculateB(const SceneManager &sm, const Camera &cam, const Light &light, const AxisAlignedBox &sceneBB, const AxisAlignedBox &receiverBB, PointListBody *out_bodyB) const
Calculates the intersection bodyB.
Vector3 getLSProjViewDir(const Matrix4 &lightSpace, const Camera &cam, const PointListBody &bodyLVS) const
Returns the projection view direction.
static const Matrix4 msLightSpaceToNormal
Implements the uniform shadow mapping algorithm in focused mode.
void addPoint(const Vector3 &point)
Adds a specific point to the body list.
const Vector3 & getPoint(size_t cnt) const
Returns a point.
Polygon::VertexList mBodyPoints
Class encapsulating a standard 4x4 homogeneous matrix.
Manages the organisation and rendering of a 'scene' i.e.
An abstraction of a viewport, i.e.
void merge(const PointListBody &plb)
Merges a second PointListBody into this one.
void calculateLVS(const SceneManager &sm, const Camera &cam, const Light &light, const AxisAlignedBox &sceneBB, PointListBody *out_LVS) const
Calculates the bodyLVS.
Holds a solid representation of a convex body.
FocusedShadowCameraSetup(void)
Default constructor.
vector< Vector3 >::type VertexList
void calculateShadowMappingMatrix(const SceneManager &sm, const Camera &cam, const Light &light, Matrix4 *out_view, Matrix4 *out_proj, Camera *out_cam) const
Calculates the standard shadow mapping matrix.
A 3D box aligned with the x/y/z axes.
void reset(void)
Resets the body.
Camera * mLightFrustumCamera
Temporary preallocated camera to set up a light frustum for clipping in FocusedShadowCameraSetup::cal...
PointListBody(const ConvexBody &body)
virtual void getShadowCamera(const SceneManager *sm, const Camera *cam, const Viewport *vp, const Light *light, Camera *texCam, size_t iteration) const
Returns a uniform shadow camera with a focused view.
A frustum represents a pyramid, capped at the near and far end which is used to represent either a vi...
Matrix4 buildViewMatrix(const Vector3 &pos, const Vector3 &dir, const Vector3 &up) const
Builds a view matrix.
Frustum * mTempFrustum
Temporary preallocated frustum to set up a projection matrix in calculateShadowMappingMatrix().
Vector3 getNearCameraPoint_ws(const Matrix4 &viewMatrix, const PointListBody &bodyLVS) const
Returns a valid near-point seen by the camera.
float Real
Software floating point type.
bool mLightFrustumCameraCalculated
void addAAB(const AxisAlignedBox &aab)
Adds all points of an AAB.
const AxisAlignedBox & getAAB(void) const
Returns the bounding box representation.
PointListBody mPointListBodyLVS
void build(const ConvexBody &body, bool filterDuplicates=true)
Builds a point list body from a 'real' body.
virtual ~FocusedShadowCameraSetup(void)
Default destructor.
bool getUseAggressiveFocusRegion() const
Standard 3-dimensional vector.
void buildAndIncludeDirection(const ConvexBody &body, Real extrudeDist, const Vector3 &dir)
Builds a PointListBody from a Body and includes all the space in a given direction.
Copyright © 2012 Torus Knot Software Ltd

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.