@Override public int attachChild(final Spatial child) { return _targetScene.attachChild(child); }
public MovePlanarWidget withHandle(final Spatial handle) { _handle.attachChild(handle); return this; }
@Override public int attachChild(final Spatial child) { return _targetScene.attachChild(child); }
@Override public int attachChild(final Spatial child) { if (!(child instanceof TextMesh)) { throw new IllegalArgumentException("Must be a TextMesh!"); } return super.attachChild(child); }
@Override public int attachChild(final Spatial child) { if (!(child instanceof TextMesh)) { throw new IllegalArgumentException("Must be a TextMesh!"); } return super.attachChild(child); }
private MoveWidget verifyMoveWidget() { MoveWidget moveWidget = (MoveWidget) _widgets.get(CompoundInteractWidget.MOVE_KEY); if (moveWidget == null) { moveWidget = new MoveWidget(_filters); _widgets.put(CompoundInteractWidget.MOVE_KEY, moveWidget); _handle.attachChild(moveWidget.getHandle()); } return moveWidget; }
private RotateWidget verifyRotateWidget() { RotateWidget rotateWidget = (RotateWidget) _widgets.get(CompoundInteractWidget.ROTATE_KEY); if (rotateWidget == null) { rotateWidget = new RotateWidget(_filters); _widgets.put(CompoundInteractWidget.ROTATE_KEY, rotateWidget); _handle.attachChild(rotateWidget.getHandle()); } return rotateWidget; }
public void reattachAttachments(final Node scene) { for (final AttachmentPoint point : _dataCache.getAttachmentPoints().values()) { scene.attachChild(point.getAttachment()); } } }
public CompoundInteractWidget withMultiPlanarHandle() { MoveMultiPlanarWidget widget = (MoveMultiPlanarWidget) _widgets .get(CompoundInteractWidget.MOVE_MULTIPLANAR_KEY); if (widget != null) { widget.getHandle().removeFromParent(); } widget = new MoveMultiPlanarWidget(_filters); _widgets.put(CompoundInteractWidget.MOVE_MULTIPLANAR_KEY, widget); _handle.attachChild(widget.getHandle()); return this; }
public CompoundInteractWidget withMultiPlanarHandle(final double extent) { MoveMultiPlanarWidget widget = (MoveMultiPlanarWidget) _widgets .get(CompoundInteractWidget.MOVE_MULTIPLANAR_KEY); if (widget != null) { widget.getHandle().removeFromParent(); } widget = new MoveMultiPlanarWidget(_filters, extent); _widgets.put(CompoundInteractWidget.MOVE_MULTIPLANAR_KEY, widget); _handle.attachChild(widget.getHandle()); return this; }
private static Spatial makeCopy(final Spatial source, final Spatial parent, final CopyLogic logic) { final AtomicBoolean recurse = new AtomicBoolean(); final Spatial result = logic.copy(source, recurse); if (recurse.get() && source instanceof Node && result instanceof Node && ((Node) source).getNumberOfChildren() > 0) { for (final Spatial child : ((Node) source).getChildren()) { final Spatial copy = makeCopy(child, result, logic); if (copy != null) { ((Node) result).attachChild(copy); } } } return result; }
@Override public Node makeInstanced() { // get copy of basic spatial info final Node node = (Node) super.makeInstanced(); // add copy of children for (final Spatial child : getChildren()) { final Spatial copy = child.makeInstanced(); node.attachChild(copy); } return node; }
@Override public Node makeCopy(final boolean shareGeometricData) { // get copy of basic spatial info final Node node = (Node) super.makeCopy(shareGeometricData); // add copy of children for (final Spatial child : getChildren()) { final Spatial copy = child.makeCopy(shareGeometricData); node.attachChild(copy); } // return return node; }
@Override public Node makeInstanced() { // get copy of basic spatial info final Node node = (Node) super.makeInstanced(); // add copy of children for (final Spatial child : getChildren()) { final Spatial copy = child.makeInstanced(); node.attachChild(copy); } return node; }
@Override public Node makeCopy(final boolean shareGeometricData) { // get copy of basic spatial info final Node node = (Node) super.makeCopy(shareGeometricData); // add copy of children for (final Spatial child : getChildren()) { final Spatial copy = child.makeCopy(shareGeometricData); node.attachChild(copy); } // return return node; }
public CompoundInteractWidget withPlanarHandle(final MovePlane plane, final ReadOnlyColorRGBA color) { MovePlanarWidget widget = (MovePlanarWidget) _widgets.get(CompoundInteractWidget.MOVE_PLANAR_KEY); if (widget != null) { widget.getHandle().removeFromParent(); } widget = new MovePlanarWidget(_filters).withPlane(plane).withDefaultHandle(.5, .25, color); _widgets.put(CompoundInteractWidget.MOVE_PLANAR_KEY, widget); _handle.attachChild(widget.getHandle()); return this; }
public CompoundInteractWidget withPlanarHandle(final MovePlane plane, final double radius, final double height, final ReadOnlyColorRGBA color) { MovePlanarWidget widget = (MovePlanarWidget) _widgets.get(CompoundInteractWidget.MOVE_PLANAR_KEY); if (widget != null) { widget.getHandle().removeFromParent(); } widget = new MovePlanarWidget(_filters).withPlane(plane).withDefaultHandle(radius, height, color); _widgets.put(CompoundInteractWidget.MOVE_PLANAR_KEY, widget); _handle.attachChild(widget.getHandle()); return this; }
public MoveWidget withZAxis(final ReadOnlyColorRGBA color, final double scale, final double width, final double lengthGap, final double tipGap) { if (_zArrow != null) { _zArrow.removeFromParent(); } _zColor.set(color); _zArrow = new InteractArrow("zMoveArrow", scale, width, lengthGap, tipGap); _zArrow.setDefaultColor(color); _handle.attachChild(_zArrow); return this; }
public RotateWidget withZAxis(final ReadOnlyColorRGBA color, final float scale, final float width) { if (_zRing != null) { _zRing.removeFromParent(); } _zRing = new InteractRing("zRotRing", 4, 32, scale, width); _zRing.setDefaultColor(color); _handle.attachChild(_zRing); final BlendState blend = new BlendState(); blend.setBlendEnabled(true); _zRing.setRenderState(blend); return this; }
public MoveWidget withXAxis(final ReadOnlyColorRGBA color, final double scale, final double width, final double lengthGap, final double tipGap) { if (_xArrow != null) { _xArrow.removeFromParent(); } _xColor.set(color); _xArrow = new InteractArrow("xMoveArrow", scale, width, lengthGap, tipGap); _xArrow.setDefaultColor(color); final Quaternion rotate = new Quaternion().fromAngleAxis(MathUtils.HALF_PI, Vector3.UNIT_Y); _xArrow.setRotation(rotate); _handle.attachChild(_xArrow); return this; }