- decreased default infinity value from 10000.0f to 1000.0f.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4327 dfc29bdd-3216-0410-991c-e03cc46cb475
master
Nadro 2012-10-15 21:12:53 +00:00
parent 40933b9ef6
commit b6f902f13f
3 changed files with 6 additions and 4 deletions

View File

@ -255,7 +255,7 @@ int main()
anode->setAnimationSpeed(15);
// add shadow
anode->addShadowVolumeSceneNode(0, -1, true, 400.0f); // workaround for infinity matrix problem
anode->addShadowVolumeSceneNode();
smgr->setShadowColor(video::SColor(150,0,0,0));
// make the model a little bit bigger and normalize its normals

View File

@ -98,12 +98,14 @@ namespace scene
\param zfailmethod: If set to true, the shadow will use the
zfail method, if not, zpass is used.
\param infinity: Value used by the shadow volume algorithm to
scale the shadow volume.
scale the shadow volume (for zfail shadow volume we support only
finite shadows, so camera zfar must be larger than shadow back cap,
which is depend on infinity parameter).
\return Pointer to the created shadow scene node. This pointer
should not be dropped. See IReferenceCounted::drop() for more
information. */
virtual IShadowVolumeSceneNode* addShadowVolumeSceneNode(const IMesh* shadowMesh=0,
s32 id=-1, bool zfailmethod=true, f32 infinity=10000.0f) = 0;
s32 id=-1, bool zfailmethod=true, f32 infinity=1000.0f) = 0;
//! Get a pointer to a joint in the mesh (if the mesh is a bone based mesh).

View File

@ -79,7 +79,7 @@ namespace scene
//! Creates shadow volume scene node as child of this node
//! and returns a pointer to it.
virtual IShadowVolumeSceneNode* addShadowVolumeSceneNode(const IMesh* shadowMesh,
s32 id, bool zfailmethod=true, f32 infinity=10000.0f);
s32 id, bool zfailmethod=true, f32 infinity=1000.0f);
//! Returns a pointer to a child node, which has the same transformation as
//! the corrsesponding joint, if the mesh in this scene node is a skinned mesh.