Skip to main content

AABB

class AABB

AABB Represents the dimensions and limits of a 3d model, through AABB you can know the maximum/minimum limit coordinates that extend a 3d model, beyond its center.


public class AABB

— Constructors (5) —

ConstructorDescription
AABB()Creates a new AABB.
AABB(float x, float y, float z, float xn, float yn, float zn)Creates a new AABB passing the maximum vector to be "x", "y", "z" arguments, and minimum vector to be "xn", "yn", and "zn" arguments.
AABB(float x, float y, float z, float xn, float yn, float zn, float cx, float cy, float cz)Creates a new AABB passing the maximum vector to be "x", "y" and "z" arguments, minimum vector to be "xn", "yn" and "zn" arguments, and central vector to be "cx", "cy" and "cz" arguments.
AABB(Vector3 min, Vector3 max)Creates a new AABB with its minimum vector defined to be "min" argument, and maximum to be "max" argument.
AABB(Vector3 min, Vector3 center, Vector3 max)Creates a new AABB with its minimum vector defined to be "min" argument, center to be "center" argument, and maximum to be "max" argument.

— Methods (24) —

NameDescription
Vector3 getMin()Return a vector informing the minimum limit of the model.
void setMin(Vector3 value)Sets the minimum vector of AABB.
Vector3 getMax()Return a vector informing the maximum limit of the model.
void setMax(Vector3 value)Sets the maximum vector of AABB.
float getX()Return the maximum limit X.
void setX(float value)Set the maximum limit X.
float getY()Return the maximum limit Y.
void setY(float value)Set the maximum limit Y.
float getZ()Return the maximum limit Z.
void setZ(float value)Set the maximum limit Z.
float getXN()Return the minimum limit X.
void setXN(float value)Set the minimum limit X.
float getYN()Return the minimum limit Y.
void setYN(float value)Set the minimum limit Y.
float getZN()Return the minimum limit Z.
void setZN(float value)Set the minimum limit Z.
float lengthMax()Return the maximum length of the. vector
float lengthMin()Return the minimum vector length.
float getlengthMax()Return the maximum length of the vector.
float getLengthMin()Return the minimum vector length.
float maxDistanceFromCenter()Return the longest bounds length from the center, can be used for SphericalCollision calculations.
boolean isInside(Vector3 point)Returns true if the Vector defined to be the argument is within the AABB limit, returns false if not.
Vector3 getCenter()Return a vector indicating the center position.
AABB copy()Return a copy of the AABB class.