40 #define AABB_STRING 64 60 inline void set (
const AABB& other) {
74 inline void setMins (
int x,
int y,
int z) {
77 inline void setMaxs (
int x,
int y,
int z) {
105 inline void set (
const AABB& trBox,
const Line& trLine) {
107 endBox.
shift(trLine.stop);
168 snprintf(str,
len,
"(%i, %i, %i) (%i, %i, %i)",
void getDiagonal(vec3_t diagonal) const
#define VectorCopy(src, dest)
void setNegativeVolume()
Sets mins and maxs to their starting points before using addPoint.
#define VectorSet(v, x, y, z)
void getCenter(vec3_t center) const
Calculates the center of the bounding box.
#define VectorScale(in, scale, out)
void setMins(const vec3_t mini)
bool contains(const vec3_t point) const
void expand(const float byVal)
expand the box in all directions, but clip them to the maximum boundaries
const float MWW
Axis-aligned bounding box.
void add(const vec3_t point)
If the point is outside the box, expand the box to accommodate it.
const vec3_t & getMaxs() const
void setMins(int x, int y, int z)
void clipToWorld()
clip the box to the maximum boundaries
void rotateAround(const vec3_t origin, const vec3_t angles)
Rotates bounding box around given origin point; note that it will expand the box unless all angles ar...
Defined CONSTANTS (Macros are elsewhere)
Byte order functions header.
bool canBeHitBy(const Line &line) const
Checks if the given line has a chance to hit our box.
void expandXY(const float byVal)
expand the box in four directions, but clip them to the maximum boundaries
bool contains(const AABB &other) const
void setMaxs(int x, int y, int z)
void setFromLittleFloat(const AABB &other)
void asIntString(char *str, size_t len)
Prints a representation of the box.
#define VectorAdd(a, b, dest)
const vec3_t & getMins() const
QGL_EXTERN GLuint GLchar GLuint * len
bool doesIntersect(const AABB &other) const
Checks if the aabb touches or intersects with the given aabb.
#define MAX_WORLD_WIDTH
-MAX_WORLD_WIDTH up tp +MAX_WORLD_WIDTH
void shift(const vec3_t shiftVec)
shove the whole box by the given vector
Cross-platform type definitions.
void setMaxs(const vec3_t maxi)
#define VectorSubtract(a, b, dest)
A simple line between two points.