|
|
@ -45,6 +45,8 @@ import com.jme3.renderer.RenderManager; |
|
|
|
import com.jme3.renderer.ViewPort; |
|
|
|
import com.jme3.renderer.ViewPort; |
|
|
|
import com.jme3.renderer.queue.RenderQueue; |
|
|
|
import com.jme3.renderer.queue.RenderQueue; |
|
|
|
import com.jme3.texture.FrameBuffer; |
|
|
|
import com.jme3.texture.FrameBuffer; |
|
|
|
|
|
|
|
import com.jme3.util.clone.Cloner; |
|
|
|
|
|
|
|
import com.jme3.util.clone.JmeCloneable; |
|
|
|
|
|
|
|
|
|
|
|
import java.io.IOException; |
|
|
|
import java.io.IOException; |
|
|
|
|
|
|
|
|
|
|
@ -55,7 +57,8 @@ import java.io.IOException; |
|
|
|
* |
|
|
|
* |
|
|
|
* @author Rémy Bouquet aka Nehon |
|
|
|
* @author Rémy Bouquet aka Nehon |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public abstract class AbstractShadowFilter<T extends AbstractShadowRenderer> extends Filter { |
|
|
|
public abstract class AbstractShadowFilter<T extends AbstractShadowRenderer> extends Filter implements Cloneable, |
|
|
|
|
|
|
|
JmeCloneable { |
|
|
|
|
|
|
|
|
|
|
|
protected T shadowRenderer; |
|
|
|
protected T shadowRenderer; |
|
|
|
protected ViewPort viewPort; |
|
|
|
protected ViewPort viewPort; |
|
|
@ -314,6 +317,21 @@ public abstract class AbstractShadowFilter<T extends AbstractShadowRenderer> ext |
|
|
|
public void read(JmeImporter im) throws IOException { |
|
|
|
public void read(JmeImporter im) throws IOException { |
|
|
|
super.read(im); |
|
|
|
super.read(im); |
|
|
|
InputCapsule ic = im.getCapsule(this); |
|
|
|
InputCapsule ic = im.getCapsule(this); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public AbstractShadowFilter<T> jmeClone() { |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
return (AbstractShadowFilter<T>) super.clone(); |
|
|
|
|
|
|
|
} catch (final CloneNotSupportedException e) { |
|
|
|
|
|
|
|
throw new RuntimeException(e); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void cloneFields(final Cloner cloner, final Object original) { |
|
|
|
|
|
|
|
material = cloner.clone(material); |
|
|
|
|
|
|
|
shadowRenderer = cloner.clone(shadowRenderer); |
|
|
|
|
|
|
|
shadowRenderer.setPostShadowMaterial(material); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|