public class BoundingBox3d extends Object
Constructor and Description |
---|
BoundingBox3d()
Initialize a BoundingBox by calling its reset method, leaving the box in
an inconsitent state, with minimums = Float.MAX_VALUE and maximums =
-Float.MAX_VALUE.
|
BoundingBox3d(BoundingBox3d box) |
BoundingBox3d(Coord3d center,
float edgeLength) |
BoundingBox3d(float xmin,
float xmax,
float ymin,
float ymax,
float zmin,
float zmax)
Initialize a BoundingBox with raw values.
|
BoundingBox3d(List<Coord3d> coords) |
BoundingBox3d(Polygon polygon) |
BoundingBox3d(Range xRange,
Range yRange,
Range zRange) |
Modifier and Type | Method and Description |
---|---|
void |
add(BoundingBox3d b)
Add a BoundingBox3d volume to the current one.
|
void |
add(Coord3d c)
Add a Coord3d to the BoundingBox3d.
|
void |
add(float x,
float y,
float z)
Adds an x,y,z point to the bounding box, and enlarge the bounding box if
this points lies outside of it.
|
void |
add(List<Point> pts) |
void |
add(Point p)
Add a Point3d to the BoundingBox3d.
|
void |
add(Polygon p)
Add the points of a Polygon to the BoundingBox3d.
|
BoundingBox3d |
clone() |
boolean |
contains(BoundingBox3d b2)
Return true if b2 is contained by this.
|
boolean |
contains(Coord3d c) |
boolean |
equals(Object obj) |
Coord3d |
getCenter()
Compute and return the center point of the BoundingBox3d
|
double |
getRadius()
Return the radius of the Sphere containing the Bounding Box, i.e., the
distance between the center and the point (xmin, ymin, zmin).
|
Coord3d |
getTransformedCenter(SpaceTransformer transformers) |
double |
getTransformedRadius(SpaceTransformer transformers) |
List<Coord3d> |
getVertices() |
float |
getXmax() |
float |
getXmin() |
Range |
getXRange() |
float |
getYmax() |
float |
getYmin() |
Range |
getYRange() |
float |
getZmax() |
float |
getZmin() |
Range |
getZRange() |
int |
hashCode() |
boolean |
intersect(BoundingBox3d b2)
Return true if intersect b2.
|
boolean |
isReset() |
BoundingBox3d |
margin(float margin) |
static BoundingBox3d |
newBoundsAtOrigin() |
void |
reset()
Initialize the bounding box with Float.MAX_VALUE as minimum value, and
-Float.MAX_VALUE as maximum value for each dimension.
|
BoundingBox3d |
scale(Coord3d scale)
Return a copy of the current bounding box after scaling.
|
BoundingBox3d |
selfMargin(float margin) |
void |
setXmax(float value) |
void |
setXmin(float value) |
void |
setYmax(float value) |
void |
setYmin(float value) |
void |
setZmax(float value) |
void |
setZmin(float value) |
BoundingBox3d |
shift(Coord3d offset) |
String |
toString() |
String |
toString(int depth) |
boolean |
valid() |
public BoundingBox3d()
public BoundingBox3d(Polygon polygon)
public BoundingBox3d(Coord3d center, float edgeLength)
public BoundingBox3d(BoundingBox3d box)
public BoundingBox3d(float xmin, float xmax, float ymin, float ymax, float zmin, float zmax)
public void reset()
public boolean isReset()
public boolean valid()
public void add(float x, float y, float z)
x
- y
- z
- public void add(Coord3d c)
add(c.x, c.y, c.z);
p
- public void add(Point p)
add(p.x, p.y, p.z);
p
- public void add(Polygon p)
p
- public void add(BoundingBox3d b)
add(b.xmin, b.ymin, b.zmin);
add(b.xmax, b.ymax, b.zmax);
p
- public Coord3d getCenter()
public Coord3d getTransformedCenter(SpaceTransformer transformers)
public double getRadius()
public double getTransformedRadius(SpaceTransformer transformers)
public BoundingBox3d scale(Coord3d scale)
public BoundingBox3d shift(Coord3d offset)
public boolean contains(BoundingBox3d b2)
public boolean contains(Coord3d c)
public boolean intersect(BoundingBox3d b2)
public BoundingBox3d margin(float margin)
public BoundingBox3d selfMargin(float margin)
public Range getXRange()
public Range getYRange()
public Range getZRange()
public float getXmin()
public void setXmin(float value)
public float getXmax()
public void setXmax(float value)
public float getYmin()
public void setYmin(float value)
public float getYmax()
public void setYmax(float value)
public float getZmin()
public void setZmin(float value)
public float getZmax()
public void setZmax(float value)
public static BoundingBox3d newBoundsAtOrigin()
public String toString(int depth)
public BoundingBox3d clone()
Copyright © 2016. All rights reserved.