Go to the documentation of this file.
28 #ifndef __ShadowCaster_H__
29 #define __ShadowCaster_H__
163 bool extrudeVertices,
Real extrusionDistance,
unsigned long flags = 0 ) = 0;
189 size_t originalVertexCount,
const Vector4& lightPos,
Real extrudeDist);
241 Real extrudeDist)
const;
250 #endif // __ShadowCaster_H__
ShadowRenderable()
Used only if isLightCapSeparate == true.
virtual bool getCastShadows(void) const =0
Returns whether or not this object currently casts a shadow.
virtual void updateEdgeListLightFacing(EdgeData *edgeData, const Vector4 &lightPos)
Tells the caster to perform the tasks necessary to update the edge data's light listing.
@ SRF_INCLUDE_DARK_CAP
For shadow volume techniques only, generate a dark cap on the volume.
@ SRF_EXTRUDE_TO_INFINITY
For shadow volume techniques only, indicates volume is extruded to infinity.
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
void setMaterial(const MaterialPtr &mat)
Set the material to be used by the shadow, should be set by the caller before adding to a render queu...
Real getSquaredViewDepth(const Camera *) const
Returns the camera-relative squared depth of this renderable.
RenderOperation * getRenderOperationForUpdate(void)
Get the internal render operation for set up.
vector< ShadowRenderable * >::type ShadowRenderableList
A viewpoint from which the scene will be rendered.
virtual bool hasEdgeList(void)=0
Returns whether the object has a valid edge list.
const LightList & getLights(void) const
@ SRF_INCLUDE_LIGHT_CAP
For shadow volume techniques only, generate a light cap on the volume.
virtual ShadowRenderableListIterator getShadowVolumeRenderableIterator(ShadowTechnique shadowTechnique, const Light *light, HardwareIndexBufferSharedPtr *indexBuffer, size_t *indexBufferUsedSize, bool extrudeVertices, Real extrusionDistance, unsigned long flags=0)=0
Gets an iterator over the renderables required to render the shadow volume.
Class which represents the renderable aspects of a set of shadow volume faces.
This class defines the interface that must be implemented by shadow casters.
ShadowTechnique
An enumeration of broad shadow techniques.
Concrete IteratorWrapper for nonconst access to the underlying container.
Representation of a dynamic light source in the scene.
virtual void generateShadowVolume(EdgeData *edgeData, const HardwareIndexBufferSharedPtr &indexBuffer, size_t &indexBufferUsedSize, const Light *light, ShadowRenderableList &shadowRenderables, unsigned long flags)
Generates the indexes required to render a shadow volume into the index buffer which is passed in,...
bool isLightCapSeparate(void) const
Does this renderable require a separate light cap?
Shared pointer implementation used to share index buffers.
VectorIterator< ShadowRenderableList > ShadowRenderableListIterator
virtual bool isVisible(void) const
Should this ShadowRenderable be treated as visible?
void getRenderOperation(RenderOperation &op)
Gets the render operation required to send this object to the frame buffer.
ShadowRenderableFlags
A set of flags that can be used to influence ShadowRenderable creation.
virtual ~ShadowRenderable()
static void extrudeVertices(const HardwareVertexBufferSharedPtr &vertexBuffer, size_t originalVertexCount, const Vector4 &lightPos, Real extrudeDist)
Utility method for extruding vertices based on a light.
Class encapsulating a standard 4x4 homogeneous matrix.
virtual EdgeData * getEdgeList(void)=0
Returns details of the edges which might be used to determine a silhouette.
Shared pointer implementation used to share vertex buffers.
virtual Real getPointExtrusionDistance(const Light *l) const =0
Get the distance to extrude for a point/spot light.
A 3D box aligned with the x/y/z axes.
Real getExtrusionDistance(const Vector3 &objectPos, const Light *light) const
Helper method for calculating extrusion distance.
const MaterialPtr & getMaterial(void) const
Retrieves a weak reference to the material this renderable object uses.
RenderOperation mRenderOp
ShadowRenderable * getLightCapRenderable(void)
Get the light cap version of this renderable.
4-dimensional homogeneous vector.
virtual void rebindIndexBuffer(const HardwareIndexBufferSharedPtr &indexBuffer)=0
This function informs the shadow renderable that the global index buffer from the SceneManager has be...
Abstract class defining the interface all renderable objects must implement.
float Real
Software floating point type.
void getWorldTransforms(Matrix4 *xform) const =0
Gets the world transform matrix / matrices for this renderable object.
This class contains the information required to describe the edge connectivity of a given set of vert...
virtual const AxisAlignedBox & getDarkCapBounds(const Light &light, Real dirLightExtrusionDist) const =0
Gets the world space bounding box of the dark cap, as extruded using the light provided.
virtual const AxisAlignedBox & getLightCapBounds(void) const =0
Gets the world space bounding box of the light cap.
ShadowRenderable * mLightCap
virtual const AxisAlignedBox & getWorldBoundingBox(bool derive=false) const =0
Get the world bounding box of the caster.
Standard 3-dimensional vector.
'New' rendering operation using vertex buffers.
virtual void extrudeBounds(AxisAlignedBox &box, const Vector4 &lightPos, Real extrudeDist) const
Utility method for extruding a bounding box.
Copyright © 2012 Torus Knot Software Ltd

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