From b0d92f10909028cbf35d09fa3efc602b42b08daf Mon Sep 17 00:00:00 2001 From: ffelini Date: Thu, 20 Sep 2012 13:40:10 +0300 Subject: [PATCH] Update src/alternativa/engine3d/shadows/DirectionalLightShadow.as removeCaster methods added --- .../engine3d/shadows/DirectionalLightShadow.as | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/alternativa/engine3d/shadows/DirectionalLightShadow.as b/src/alternativa/engine3d/shadows/DirectionalLightShadow.as index 5c47afe..fbc04c9 100644 --- a/src/alternativa/engine3d/shadows/DirectionalLightShadow.as +++ b/src/alternativa/engine3d/shadows/DirectionalLightShadow.as @@ -819,6 +819,15 @@ package alternativa.engine3d.shadows { } } + /** + * Removes given object from shadow casters list. + * @param object Object which should be removed from shadow casters list. + */ + public function removeCaster(object:Object3D):void { + var index:int = _casters.indexOf(object); + if (index < 0) throw new Error("Caster not found"); + _casters[index] = _casters.pop(); + } /** * Clears the list of objects, which cast shadow. */