From: <re...@us...> - 2005-05-13 18:50:22
|
Update of /cvsroot/crystal/CS/plugins/engine/renderloop/shadow/stencil In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10163/plugins/engine/renderloop/shadow/stencil Modified Files: stencil.cpp stencil.h Log Message: res applied a patch from Seth Yastrov <sya...@gm...> to augment the iRenderStepContainer interface with get, delete, and find methods. Index: stencil.cpp =================================================================== RCS file: /cvsroot/crystal/CS/plugins/engine/renderloop/shadow/stencil/stencil.cpp,v retrieving revision 1.46 retrieving revision 1.47 diff -u -d -r1.46 -r1.47 --- stencil.cpp 24 Apr 2005 22:01:11 -0000 1.46 +++ stencil.cpp 13 May 2005 18:49:37 -0000 1.47 @@ -689,7 +689,28 @@ return steps.Push (lrs); } -size_t csStencilShadowStep::GetStepCount () +bool csStencilShadowStep::DeleteStep (iRenderStep* step) +{ + csRef<iLightRenderStep> lrs = + SCF_QUERY_INTERFACE (step, iLightRenderStep); + if (!lrs) return false; + return steps.Delete(lrs); +} + +iRenderStep* csStencilShadowStep::GetStep (size_t n) const +{ + return (iRenderStep*) steps.Get(n); +} + +size_t csStencilShadowStep::Find (iRenderStep* step) const +{ + csRef<iLightRenderStep> lrs = + SCF_QUERY_INTERFACE (step, iLightRenderStep); + if (!lrs) return csArrayItemNotFound; + return steps.Find(lrs); +} + +size_t csStencilShadowStep::GetStepCount () const { return steps.Length(); } Index: stencil.h =================================================================== RCS file: /cvsroot/crystal/CS/plugins/engine/renderloop/shadow/stencil/stencil.h,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- stencil.h 2 May 2005 19:53:50 -0000 1.25 +++ stencil.h 13 May 2005 18:49:37 -0000 1.26 @@ -149,7 +149,10 @@ csShaderVarStack &stacks); virtual size_t AddStep (iRenderStep* step); - virtual size_t GetStepCount (); + virtual bool DeleteStep (iRenderStep* step); + virtual iRenderStep* GetStep (size_t n) const; + virtual size_t Find (iRenderStep* step) const; + virtual size_t GetStepCount () const; struct ShadowDrawVisCallback : public iVisibilityCullerListener { |