public static void completeColorStripper(Spatial spatial) { spatial.clearRenderState(StateType.Material); spatial.clearRenderState(StateType.Texture); spatial.clearRenderState(StateType.Shade); spatial.clearRenderState(StateType.Light); spatial.updateRenderState(); if (spatial instanceof Node && ((Node) spatial).getChildren() != null) { for (int i = 0; i < ((Node) spatial).getChildren().size(); i++) { colorStripper(((Node) spatial).getChildren().get(i)); } } }
private static RenderState doRemoveRenderState(Spatial s, StateType state) { if (s.getRenderState(state) != null) { RenderState rs = s.getRenderState(state); s.clearRenderState(state); return rs; } return null; }
private static void doWireframeApplication(Spatial s, boolean apply, WireframeState ws) { if (apply) s.setRenderState(ws); else if (s.getRenderState(StateType.Wireframe) != null) { s.clearRenderState(StateType.Wireframe); } }