40 #define AABB_STRING 64
74 inline void setMins (
int x,
int y,
int z) {
77 inline void setMaxs (
int x,
int y,
int z) {
168 snprintf(str, len,
"(%i, %i, %i) (%i, %i, %i)",
169 (
int)
mins[0], (
int) mins[1], (
int) mins[2],
170 (
int)
maxs[0], (
int) maxs[1], (
int) maxs[2] );
#define VectorCopy(src, dest)
void setNegativeVolume()
Sets mins and maxs to their starting points before using addPoint.
void set(const vec3_t mini, const vec3_t maxi)
#define VectorSet(v, x, y, z)
bool canBeHitBy(const Line &line) const
Checks if the given line has a chance to hit our box.
bool doesIntersect(const AABB &other) const
Checks if the aabb touches or intersects with the given aabb.
void set(const AABB &trBox, const Line &trLine)
Set from another box and a (trace)Line.
void set(const AABB &other)
Copies the values from the given aabb.
#define VectorScale(in, scale, out)
void setMins(const vec3_t mini)
void getDiagonal(vec3_t diagonal) 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.
void setMins(int x, int y, int z)
void clipToWorld()
clip the box to the maximum boundaries
bool contains(const vec3_t point) const
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 contains(const AABB &other) const
void getCenter(vec3_t center) const
Calculates the center of the bounding box.
void expandXY(const float byVal)
expand the box in four directions, but clip them to the maximum boundaries
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
#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)
const vec3_t & getMaxs() const
#define VectorSubtract(a, b, dest)
A simple line between two points.