protected Node clone(final Node original) { Node copy = null; try { copy = original.getClass().newInstance(); } catch (final InstantiationException e) { logger.log(Level.SEVERE, "Could not access final constructor of class " + original.getClass().getCanonicalName(), e); throw new RuntimeException(e); } catch (final IllegalAccessException e) { logger.log(Level.SEVERE, "Could not access final constructor of class " + original.getClass().getCanonicalName(), e); throw new RuntimeException(e); } copy.setName(original.getName() + "_copy"); copy.getSceneHints().set(original.getSceneHints()); copy.setTransform(original.getTransform()); for (final StateType type : StateType.values()) { final RenderState state = original.getLocalRenderState(type); if (state != null) { copy.setRenderState(state); } } return copy; } }
protected Node clone(final Node original) { Node copy = null; try { copy = original.getClass().newInstance(); } catch (final InstantiationException e) { logger.log(Level.SEVERE, "Could not access final constructor of class " + original.getClass().getCanonicalName(), e); throw new RuntimeException(e); } catch (final IllegalAccessException e) { logger.log(Level.SEVERE, "Could not access final constructor of class " + original.getClass().getCanonicalName(), e); throw new RuntimeException(e); } copy.setName(original.getName() + "_copy"); copy.getSceneHints().set(original.getSceneHints()); copy.setTransform(original.getTransform()); for (final StateType type : StateType.values()) { final RenderState state = original.getLocalRenderState(type); if (state != null) { copy.setRenderState(state); } } return copy; } }
final Transform localTransform = getNodeTransforms(transforms); node.setTransform(localTransform); if (jointChildNode != null) { jointChildNode.setSceneNode(node);