/** * Changes the data of the box so that its center is <code>center</code> and it extends in the x, y, and z * directions by the given extent. Note that the actual sides will be 2x the given extent values because the box * extends in + & - from the center for each extent. * * @param center * The center of the box. * @param xExtent * x extent of the box, in both directions. * @param yExtent * y extent of the box, in both directions. * @param zExtent * z extent of the box, in both directions. */ public void setData(final Vector3 center, final double xExtent, final double yExtent, final double zExtent) { if (center != null) { _center.set(center); } _xExtent = xExtent; _yExtent = yExtent; _zExtent = zExtent; setVertexData(); setNormalData(); setTextureData(); setIndexData(); }
/** * Changes the data of the box so that its center is <code>center</code> and it extends in the x, y, and z * directions by the given extent. Note that the actual sides will be 2x the given extent values because the box * extends in + & - from the center for each extent. * * @param center * The center of the box. * @param xExtent * x extent of the box, in both directions. * @param yExtent * y extent of the box, in both directions. * @param zExtent * z extent of the box, in both directions. */ public void setData(final Vector3 center, final double xExtent, final double yExtent, final double zExtent) { if (center != null) { _center.set(center); } _xExtent = xExtent; _yExtent = yExtent; _zExtent = zExtent; setVertexData(); setNormalData(); setTextureData(); setIndexData(); }