#include <OgreShadowCaster.h>
Inheritance diagram for Ogre::ShadowCaster:
Public Types | |
typedef std::vector< ShadowRenderable * > | ShadowRenderableList |
typedef VectorIterator< ShadowRenderableList > | ShadowRenderableListIterator |
Public Methods | |
virtual bool | getCastShadows (void) const=0 |
Returns whether or not this object currently casts a shadow. | |
virtual EdgeData * | getEdgeList (void)=0 |
Returns details of the edges which might be used to determine a silhouette. | |
virtual const AxisAlignedBox & | getWorldBoundingBox (bool derive=false) const=0 |
Get the world bounding box of the caster. | |
virtual const AxisAlignedBox & | getLightCapBounds (void) const=0 |
Gets the world space bounding box of the light cap. | |
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 ShadowRenderableListIterator | getShadowVolumeRenderableIterator (ShadowTechnique shadowTechnique, const Light *light, HardwareIndexBufferSharedPtr *indexBuffer, bool extrudeVertices, Real extrusionDistance, unsigned long flags=0)=0 |
Gets an iterator over the renderables required to render the shadow volume. | |
virtual ShadowRenderableListIterator | getLastShadowVolumeRenderableIterator (void)=0 |
Return the last calculated shadow renderables. | |
virtual Real | getPointExtrusionDistance (const Light *l) const=0 |
Get the distance to extrude for a point/spot light. | |
Static Public Methods | |
void | extrudeVertices (HardwareVertexBufferSharedPtr vertexBuffer, size_t originalVertexCount, const Vector4 &lightPos, Real extrudeDist) |
Utility method for extruding vertices based on a light. | |
Protected Methods | |
Real | getExtrusionDistance (const Vector3 &objectPos, const Light *light) const |
Helper moethod for calculating extrusion distance. | |
virtual void | updateEdgeListLightFacing (EdgeData *edgeData, const Vector4 &lightPos) |
Tells the caster to perform the tasks necessary to update the edge data's light listing. | |
virtual void | generateShadowVolume (EdgeData *edgeData, HardwareIndexBufferSharedPtr indexBuffer, 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, and updates shadow renderables to use it. | |
virtual void | extrudeBounds (AxisAlignedBox &box, const Vector4 &lightPos, Real extrudeDist) const |
Utility method for extruding a bounding box. |
Definition at line 109 of file OgreShadowCaster.h.
|
Definition at line 125 of file OgreShadowCaster.h. |
|
Definition at line 126 of file OgreShadowCaster.h. Referenced by Ogre::Entity::getLastShadowVolumeRenderableIterator(). |
|
Utility method for extruding a bounding box.
Definition at line 275 of file OgreShadowCaster.cpp. References Ogre::AxisAlignedBox::getAllCorners(), Ogre::AxisAlignedBox::getMaximum(), Ogre::AxisAlignedBox::getMinimum(), Ogre::Vector3::makeCeil(), Ogre::Vector3::makeFloor(), Ogre::Vector3::normalise(), Ogre::Real, Ogre::AxisAlignedBox::setExtents(), Ogre::Vector4::w, Ogre::Vector4::x, Ogre::Vector3::x, Ogre::Vector4::y, Ogre::Vector3::y, Ogre::Vector4::z, and Ogre::Vector3::z. Referenced by Ogre::MovableObject::getDarkCapBounds(). |
|
Utility method for extruding vertices based on a light.
Definition at line 236 of file OgreShadowCaster.cpp. References Ogre::Vector3::normalise(), Ogre::Real, Ogre::Vector4::w, Ogre::Vector3::x, Ogre::Vector4::x, Ogre::Vector3::y, Ogre::Vector4::y, Ogre::Vector3::z, and Ogre::Vector4::z. Referenced by Ogre::Entity::getShadowVolumeRenderableIterator(). |
|
Generates the indexes required to render a shadow volume into the index buffer which is passed in, and updates shadow renderables to use it.
Definition at line 37 of file OgreShadowCaster.cpp. References Ogre::EdgeData::Edge::degenerate, Ogre::EdgeData::edgeGroups, Ogre::EdgeData::EdgeGroup::edges, Ogre::ShadowRenderable::getLightCapRenderable(), Ogre::ShadowRenderable::getRenderOperationForUpdate(), Ogre::Light::getType(), Ogre::IndexData::indexCount, Ogre::RenderOperation::indexData, Ogre::IndexData::indexStart, Ogre::EdgeData::Triangle::lightFacing, Ogre::SRF_EXTRUDE_TO_INFINITY, Ogre::SRF_INCLUDE_DARK_CAP, Ogre::SRF_INCLUDE_LIGHT_CAP, Ogre::EdgeData::triangles, Ogre::EdgeData::Edge::triIndex, Ogre::VertexData::vertexCount, Ogre::EdgeData::EdgeGroup::vertexData, Ogre::EdgeData::EdgeGroup::vertexSet, Ogre::EdgeData::Triangle::vertexSet, Ogre::EdgeData::Triangle::vertIndex, and Ogre::EdgeData::Edge::vertIndex. Referenced by Ogre::Entity::getShadowVolumeRenderableIterator(). |
|
Returns whether or not this object currently casts a shadow.
Implemented in Ogre::MovableObject. |
|
Gets the world space bounding box of the dark cap, as extruded using the light provided.
Implemented in Ogre::MovableObject. Referenced by Ogre::SceneManager::renderShadowVolumesToStencil(). |
|
Returns details of the edges which might be used to determine a silhouette.
Implemented in Ogre::Entity, and Ogre::MovableObject. |
|
Helper moethod for calculating extrusion distance.
Definition at line 321 of file OgreShadowCaster.cpp. References Ogre::Light::getAttenuationRange(), Ogre::Light::getDerivedPosition(), Ogre::Vector3::length(), and Ogre::Real. Referenced by Ogre::MovableObject::getPointExtrusionDistance(). |
|
Return the last calculated shadow renderables.
Implemented in Ogre::Entity, and Ogre::MovableObject. Referenced by Ogre::SceneManager::renderShadowVolumesToStencil(). |
|
Gets the world space bounding box of the light cap.
Implemented in Ogre::MovableObject. Referenced by Ogre::SceneManager::renderShadowVolumesToStencil(). |
|
Get the distance to extrude for a point/spot light.
Implemented in Ogre::MovableObject. Referenced by Ogre::SceneManager::renderShadowVolumesToStencil(). |
|
Gets an iterator over the renderables required to render the shadow volume.
Implemented in Ogre::Entity, and Ogre::MovableObject. Referenced by Ogre::SceneManager::renderShadowVolumesToStencil(). |
|
Get the world bounding box of the caster.
Implemented in Ogre::MovableObject. Referenced by Ogre::SceneManager::renderShadowVolumesToStencil(). |
|
Tells the caster to perform the tasks necessary to update the edge data's light listing. Can be overridden if the subclass needs to do additional things.
Definition at line 31 of file OgreShadowCaster.cpp. References Ogre::EdgeData::updateTriangleLightFacing(). Referenced by Ogre::Entity::getShadowVolumeRenderableIterator(). |
Copyright © 2002-2003 by The OGRE Team
Last modified Sun Nov 28 19:51:38 2004