public class BoundingBox extends BoundingObject
| Modifier and Type | Field and Description |
|---|---|
protected Vector3f |
extents |
center, checkPlane| Constructor and Description |
|---|
BoundingBox(BoundingBox copy) |
BoundingBox(Vector3f center,
float x,
float y,
float z) |
BoundingBox(Vector3f center,
Vector3f extents) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(Vector3f point) |
BoundingBox |
copy(BoundingBox copy) |
boolean |
equals(Object obj) |
BoundingBox |
fromPoints(List<Vector3f> vectors)
Calculates a BoundingBox from list of points (Vector3f s).
|
BoundingBox |
fromPoints(List<Vector3f> vectors,
float padding)
Calculates a BoundingBox from list of points (Vector3f s).
|
BoundingBox |
fromVertices(Vertex[] vertices)
Calculates a BoundingBox from Vertex Array.
|
BoundingBox |
fromVertices(Vertex[] vertices,
float padding)
Calculates a BoundingBox from Vertex Array.
|
boolean |
intersects(BoundingBox bb) |
boolean |
intersects(BoundingObject bo) |
Node |
makeNode() |
static Node |
makeNode(BoundingBox bb) |
BoundingBox |
merge(BoundingBox bb) |
BoundingObject |
merge(BoundingObject other) |
List<Vector3f> |
toPoints() |
String |
toString() |
Vertex[] |
toVertexArray() |
clone, distanceTo, getCenterprotected Vector3f extents
public BoundingBox(Vector3f center, float x, float y, float z)
public BoundingBox(BoundingBox copy)
public static Node makeNode(BoundingBox bb)
public BoundingBox copy(BoundingBox copy)
public BoundingBox fromVertices(Vertex[] vertices)
vertices - Vertex Array. Positions are required onlypublic BoundingBox fromVertices(Vertex[] vertices, float padding)
vertices - Vertex Array. Positions are required onlypadding - Will get added to all sides (extends, after the calculation) should be 0 in most casespublic BoundingBox fromPoints(List<Vector3f> vectors)
fromPoints in class BoundingObjectvectors - List of vectors to be contained by this boundingboxpublic BoundingBox fromPoints(List<Vector3f> vectors, float padding)
vectors - List of vectors to be contained by this boundingboxpadding - Will get added to all sides (extends, after the calculation) should be 0 in most casespublic BoundingObject merge(BoundingObject other)
merge in class BoundingObjectpublic BoundingBox merge(BoundingBox bb)
public boolean intersects(BoundingObject bo)
intersects in class BoundingObjectpublic boolean intersects(BoundingBox bb)
public boolean contains(Vector3f point)
contains in class BoundingObjectpublic Node makeNode()
public Vertex[] toVertexArray()
Copyright © 2014. All rights reserved.