/** * Sets the minimum coordinate of this bounding box. * * @param min the minimum coordinates for this bounding box. Not modified. * @throws RuntimeException if any of the minimum coordinates is strictly greater than the maximum * coordinate on the same axis. */ default void setMin(double[] min) { getMinPoint().set(min); checkBounds(); }
/** * Sets the maximum coordinate of this bounding box. * * @param max the maximum coordinate for this bounding box. Not modified. * @throws RuntimeException if any of the minimum coordinates is strictly greater than the maximum * coordinate on the same axis. */ default void setMax(Point2DReadOnly max) { getMaxPoint().set(max); checkBounds(); }
/** * Sets the maximum coordinate of this bounding box. * * @param maxX the new maximum x-coordinate for this bounding box. * @param maxY the new maximum y-coordinate for this bounding box. * @throws RuntimeException if any of the minimum coordinates is strictly greater than the maximum * coordinate on the same axis. */ default void setMax(double maxX, double maxY) { getMaxPoint().set(maxX, maxY); checkBounds(); }
/** * Sets the minimum coordinate of this bounding box. * * @param min the minimum coordinate for this bounding box. Not modified. * @throws RuntimeException if any of the minimum coordinates is strictly greater than the maximum * coordinate on the same axis. */ default void setMin(Point2DReadOnly min) { getMinPoint().set(min); checkBounds(); }
/** * Sets the maximum coordinate of this bounding box. * * @param max the maximum coordinates for this bounding box. Not modified. * @throws RuntimeException if any of the minimum coordinates is strictly greater than the maximum * coordinate on the same axis. */ default void setMax(double[] max) { getMaxPoint().set(max); checkBounds(); }
/** * Sets the minimum coordinate of this bounding box. * * @param minX the new minimum x-coordinate for this bounding box. * @param minY the new minimum y-coordinate for this bounding box. * @throws RuntimeException if any of the minimum coordinates is strictly greater than the maximum * coordinate on the same axis. */ default void setMin(double minX, double minY) { getMinPoint().set(minX, minY); checkBounds(); }
/** * Redefines this bounding box with new minimum and maximum coordinates. * * @param min the new minimum coordinates for this bounding box. Not modified. * @param max the new maximum coordinates for this bounding box. Not modified. * @throws RuntimeException if any of the minimum coordinates is strictly greater than the maximum * coordinate on the same axis. */ default void set(Point2DReadOnly min, Point2DReadOnly max) { getMinPoint().set(min); getMaxPoint().set(max); checkBounds(); }
/** * Redefines this bounding box with new minimum and maximum coordinates. * * @param min the new minimum coordinates for this bounding box. Not modified. * @param max the new maximum coordinates for this bounding box. Not modified. * @throws RuntimeException if any of the minimum coordinates is strictly greater than the maximum * coordinate on the same axis. */ default void set(double[] min, double[] max) { getMinPoint().set(min); getMaxPoint().set(max); checkBounds(); }
/** * Redefines this bounding box given its {@code center} location and half its size along each axis * {@code halfSize}. * * @param center the new center location of this bounding box. Not modified. * @param halfSize half the size of this bounding box. Not modified. */ default void set(Point2DReadOnly center, Vector2DReadOnly halfSize) { getMinPoint().sub(center, halfSize); getMaxPoint().add(center, halfSize); checkBounds(); }
/** * Redefines this bounding box with new minimum and maximum coordinates. * * @param minX the new minimum x-coordinate for this bounding box. * @param minY the new minimum y-coordinate for this bounding box. * @param maxX the new maximum x-coordinates for this bounding box. * @param maxY the new maximum y-coordinates for this bounding box. * @throws RuntimeException if any of the minimum coordinates is strictly greater than the maximum * coordinate on the same axis. */ default void set(double minX, double minY, double maxX, double maxY) { getMinPoint().set(minX, minY); getMaxPoint().set(maxX, maxY); checkBounds(); }