public final class Box extends java.lang.Object implements IVolume<Box>
| Modifier and Type | Method and Description |
|---|---|
Box |
addScale(Box current,
Box next,
float t) |
Box |
clone() |
boolean |
collideWith(Sphere bs)
A Box-Sphere Intersection Test
http://www.gamasutra.com/features/19991018/Gomez_4.htm
|
Box |
concatenate(Box other)
Concatenate this volume with other in a new
IVolume object |
float |
distanceToPlane(Plane plane,
boolean min_) |
static Box |
empty()
Create an empty Box.
|
Vec3 |
getCenter(Vec3 center) |
Vec3 |
getMax() |
Vec3 |
getMin() |
Vec3 |
getSize(Vec3 size) |
float |
getVolume() |
boolean |
insideFrustum(Frustum frustum)
AABB
|
Box |
interpolate(Box current,
Box next,
float t)
Interpolate
this bounding box with bb
and return the new interpolated bounding box. |
IntersectTest |
intersectTest(Box box)
Collision
|
IntersectTest |
intersectTest(Frustum frustum)
Test the intersection between this
IVolume and the specified Frustum. |
IntersectTest |
intersectTest(Plane plane)
Test the intersection between this
IVolume and the specified Frustum. |
Vec3 |
limitInVolume(Vec3 dst,
Vec3 src)
Limit a point in this volume.
|
static Box |
max()
Create a bounding box with
-Float.MAX_VALUE as min and Float.MAX_VALUE as max. |
static Box |
notInitialized()
Create a bounding box with
Float.MAX_VALUE as min and -Float.MAX_VALUE as max. |
Box |
set(Box bb) |
Box |
setCenterAndSize(Vec3 center,
Vec3 size) |
void |
setMax(Vec3 max) |
void |
setMin(Vec3 min) |
Box |
subtract(Box bv1,
Box bv2) |
java.lang.String |
toString() |
Box |
transform(Box bb,
Mat4x4 matrix) |
public static Box notInitialized()
Float.MAX_VALUE as min and -Float.MAX_VALUE as max.public static Box max()
-Float.MAX_VALUE as min and Float.MAX_VALUE as max.public static Box empty()
public final java.lang.String toString()
toString in class java.lang.Objectpublic final Box clone()
public final Box set(Box bb)
set in interface IValueCopy<Box>public final Box setCenterAndSize(Vec3 center, Vec3 size)
center - center of the bounding boxsize - size of the bounding boxpublic final float getVolume()
getVolume in interface IVolume<Box>IBoundable, in unit^3public final Box concatenate(Box other)
IVolumeIVolume objectconcatenate in interface IVolume<Box>other - a IVolumeVolumes.concatenate(IVolume, IVolume)public final Box interpolate(Box current, Box next, float t)
this bounding box with bb
and return the new interpolated bounding box.interpolate in interface IInterpolable<Box>interpolate in interface IData<Box>interpolate in interface IVolume<Box>current - next - t - value in the range [0.; 1.]public IntersectTest intersectTest(Box box)
intersectTest in interface IVolume<Box>box - another volumepublic final boolean collideWith(Sphere bs)
public final Vec3 limitInVolume(Vec3 dst, Vec3 src)
IVolumelimitInVolume in interface IVolume<Box>dst - destination vector to store the resultsrc - source pointpublic final boolean insideFrustum(Frustum frustum)
insideFrustum in interface IVolume<Box>public final IntersectTest intersectTest(Frustum frustum)
IVolumeIVolume and the specified Frustum.intersectTest in interface IVolume<Box>VolumeIntersection.Intersect if inside and intersect.VolumeIntersection.Inside if inside but not intersect.VolumeIntersection.Outisde if outside.IntersectTest,
IVolume.insideFrustum(Frustum)public final IntersectTest intersectTest(Plane plane)
IVolumeIVolume and the specified Frustum.intersectTest in interface IVolume<Box>VolumeIntersection.Intersect if inside and intersect.VolumeIntersection.Inside if inside but not intersect.VolumeIntersection.Outisde if outside.IntersectTest,
IVolume.insideFrustum(Frustum)public final float distanceToPlane(Plane plane, boolean min_)
distanceToPlane in interface IVolume<Box>plane - a Planemin_ - true: minimum distancepublic final Vec3 getMin()
public final void setMin(Vec3 min)
public final Vec3 getMax()
public final void setMax(Vec3 max)
Bonzai Engine 1.4.1-20200831 - A Java OpenGL engine and tools for Windows/Mac/Linux/Android
Copyright © 2007-2019 Jérôme Jouvie bonzaiengine.com contact@bonzaiengine.com