9 #ifndef Navigation_Box3f_H
10 #define Navigation_Box3f_H
46 bool operator!=(
const Box3f& other)
const {
return !operator==(other); }
52 KY_INLINE
void Clear()
61 KY_INLINE
void Set(
const Vec3f& min_,
const Vec3f& max_)
141 return operand1 * operand2 * operand3 * operand4 * operand5 * operand6 > 0.f;
153 return operand1 * operand2 * operand3 * operand4 > 0.f;
167 SwapEndianness(e,
self.m_min);
168 SwapEndianness(e,
self.m_max);
bool IsPoint3DInside(const Vec3f &p) const
Returns true if the specified position is contained within the extents of the bounding box...
Definition: box3f.h:142
#define KyFloat32MAXVAL
The maximum value that can be stored in the KyFloat32 variable type.
Definition: types.h:227
KyFloat32 z
The size of the vector along the Z axis.
Definition: vec3f.h:229
bool IsPoint2DInside(const Vec2f &p) const
Returns true if the (X,Y) coordinates of the specified position are contained within the (X...
Definition: box3f.h:156
void Set(KyFloat32 _x, KyFloat32 _y, KyFloat32 _z)
Sets the coordinates.
Definition: vec3f.h:52
KyFloat32 x
The size of the vector along the X axis.
Definition: vec2f.h:169
Vec3f Center() const
Retrieves the coordinates of the exact center of the box.
Definition: box3f.h:87
Vec3f m_max
The maxima of the bounding box.
Definition: box3f.h:174
void ExpandByBox3(const Box3f &box)
Enlarges the extents of the bounding box to include the area covered by the specified bounding box...
Definition: box3f.h:120
T Min(const T &a, const T &b)
Returns the lesser of the two specified values.
Definition: fastmath.h:113
void Clear()
Clears all information maintained by this object.
Definition: box3f.h:62
KyFloat32 SizeZ() const
Retrieves the extents of the box along the Z axis.
Definition: box3f.h:84
KyFloat32 y
The size of the vector along the Y axis.
Definition: vec3f.h:228
Box3f()
Creates a new Box3f with invalid extents: you must call Set() before using it.
Definition: box3f.h:38
Target
Enumerates the possible endianness types relative to the current platform.
Definition: endianness.h:35
This class represents a three-dimensional axis-aligned bounding box whose dimensions are stored using...
Definition: box3f.h:25
KyFloat32 x
The size of the vector along the X axis.
Definition: vec3f.h:227
This class defines a two-dimensional vector whose coordinates are stored using floating-point numbers...
Definition: vec2f.h:24
void Translate(const Vec3f &v)
Moves the bounding box by the specified vector.
Definition: box3f.h:96
T Max(const T &a, const T &b)
Returns the greater of the two specified values.
Definition: fastmath.h:121
KyFloat32 Radius() const
Retrieves the distance between the diagonally opposite corners of the box.
Definition: box3f.h:90
KyFloat32 SizeY() const
Retrieves the extents of the box along the Y axis.
Definition: box3f.h:81
Definition: gamekitcrowddispersion.h:20
void Enlarge(KyFloat32 enlargement)
Enlarges the extents of the bounding box by the specified amount in all directions.
Definition: box3f.h:131
void Set(const Vec3f &min_, const Vec3f &max_)
Sets the extents of the bounding box to the specified values.
Definition: box3f.h:71
#define KY_DEFINE_NEW_DELETE_OPERATORS(MemStat)
This macro defines new and delete operators.
Definition: memory.h:137
KyFloat32 SizeX() const
Retrieves the extents of the box along the X axis.
Definition: box3f.h:78
Vec3f m_min
The minima of the bounding box.
Definition: box3f.h:173
void ExpandByVec3(const Vec3f &pos)
Enlarges the extents of the bounding box to include the specified three-dimensional point...
Definition: box3f.h:105
float KyFloat32
Type used internally to represent a 32-bit floating-point number.
Definition: types.h:43
This class defines a three-dimensional vector whose coordinates are stored using floating-point numbe...
Definition: vec3f.h:23
KyFloat32 y
The size of the vector along the Y axis.
Definition: vec2f.h:170
KyFloat32 Fsel(KyFloat32 cmp, KyFloat32 v1, KyFloat32 v2)
Ifcmp is greater than 0, returnsv1. Otherwise, returnsv2.
Definition: fastmath.h:58