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)",
const float MWW
Axis-aligned bounding box.
Byte order functions header.
void expandXY(const float byVal)
expand the box in four directions, but clip them to the maximum boundaries
void set(const AABB &trBox, const Line &trLine)
Set from another box and a (trace)Line.
const vec3_t & getMaxs() const
void asIntString(char *str, size_t len)
Prints a representation of the box.
void setMaxs(const vec3_t maxi)
void setNegativeVolume()
Sets mins and maxs to their starting points before using addPoint.
void clipToWorld()
clip the box to the maximum boundaries
void getDiagonal(vec3_t diagonal) const
void getCenter(vec3_t center) const
Calculates the center of the bounding box.
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...
void setFromLittleFloat(const AABB &other)
const vec3_t & getMins() const
void setMaxs(int x, int y, int z)
bool canBeHitBy(const Line &line) const
Checks if the given line has a chance to hit our box.
bool contains(const AABB &other) const
void set(const AABB &other)
Copies the values from the given aabb.
void shift(const vec3_t shiftVec)
shove the whole box by the given vector
void add(const vec3_t point)
If the point is outside the box, expand the box to accommodate it.
bool contains(const vec3_t point) const
void set(const vec3_t mini, const vec3_t maxi)
void setMins(int x, int y, int z)
void expand(const float byVal)
expand the box in all directions, but clip them to the maximum boundaries
void setMins(const vec3_t mini)
bool doesIntersect(const AABB &other) const
Checks if the aabb touches or intersects with the given aabb.
Defined CONSTANTS (Macros are elsewhere).
#define MAX_WORLD_WIDTH
-MAX_WORLD_WIDTH up tp +MAX_WORLD_WIDTH
A simple line between two points.
QGL_EXTERN GLuint GLchar GLuint * len
static ipos3_t shift
The shift array is used for random map assemblies (RMA) to shift the mins/maxs and stuff like that.
Cross-platform type definitions.
#define VectorSubtract(a, b, dest)
#define VectorCopy(src, dest)
#define VectorAdd(a, b, dest)
#define VectorSet(v, x, y, z)
#define VectorScale(in, scale, out)