/** * <code>clone</code> creates a new Box object containing the same data as this one. * * @return the new Box */ @Override public Box clone() { return new Box(getName() + "_clone", _center.clone(), _xExtent, _yExtent, _zExtent); }
/** * <code>clone</code> creates a new Box object containing the same data as this one. * * @return the new Box */ @Override public Box clone() { return new Box(getName() + "_clone", _center.clone(), _xExtent, _yExtent, _zExtent); }
protected void createDefaultHandle(final double extent) { final Box grip = new Box("grip", Vector3.ZERO, extent, extent, extent); grip.updateModelBound(); _handle.attachChild(grip); // setup some colors, just at the corner of the primitives since we will use flat shading. grip.setSolidColor(ColorRGBA.WHITE); final FloatBuffer colors = grip.getMeshData().getColorBuffer(); BufferUtils.setInBuffer(ColorRGBA.MAGENTA, colors, 0); BufferUtils.setInBuffer(ColorRGBA.CYAN, colors, 4); BufferUtils.setInBuffer(ColorRGBA.MAGENTA, colors, 8); BufferUtils.setInBuffer(ColorRGBA.CYAN, colors, 12); BufferUtils.setInBuffer(ColorRGBA.YELLOW, colors, 16); BufferUtils.setInBuffer(ColorRGBA.YELLOW, colors, 20); }