public class AABB
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
boolean |
containsAABB(AABB other) |
static AABB |
createFromPoints(float[] points,
int stride)
Create a bounding box containing all the passed points.
|
Vector3 |
getCenter() |
float |
getExtends() |
Vector3[] |
getPoints() |
boolean |
intersectsAABB(AABB other) |
Vector3 |
intersectsRay(Ray ray,
float minDir,
float maxDir)
Calculates intersection with the given ray between a certain distance
interval.
|
void |
updateWithPoints(float[] points,
int stride) |
public Vector3 getCenter()
public float getExtends()
public Vector3[] getPoints()
public static AABB createFromPoints(float[] points, int stride)
points
- An array of the points to be contained by this boxstride
- Float length of one vertex datapublic void updateWithPoints(float[] points, int stride)
public Vector3 intersectsRay(Ray ray, float minDir, float maxDir)
ray
- incident rayminDir
- maxDir
- public boolean intersectsAABB(AABB other)
public boolean containsAABB(AABB other)