9 #ifndef Navigation_Box2f_H
10 #define Navigation_Box2f_H
33 m_min(_min), m_max(_max) {}
41 m_min(min_x, min_y), m_max(max_x, max_y) {}
47 bool operator==(
const Box2f& other)
const {
return m_min == other.m_min && m_max == other.m_max; }
54 KY_INLINE
void Clear()
63 return m_min.
x <= m_max.
x && m_min.
y <= m_max.
y;
138 m_min.
x -= enlargement;
139 m_max.
x += enlargement;
140 m_min.
y -= enlargement;
141 m_max.
y += enlargement;
150 return operand1 * operand2 * operand3 * operand4 > 0.f;
161 return operand1 * operand2 * operand3 * operand4 > 0.f;
173 SwapEndianness(e,
self.m_min);
174 SwapEndianness(e,
self.m_max);
void Enlarge(KyFloat32 enlargement)
Enlarges the extents of the bounding box by the specified amount in all directions.
Definition: box2f.h:145
void ExpandByVec2(const Vec2f &pos)
Enlarges the extents of the bounding box to include the specified two-dimensional point...
Definition: box2f.h:100
This class represents a two-dimensional axis-aligned bounding box whose dimensions are stored using f...
Definition: box2f.h:19
#define KyFloat32MAXVAL
The maximum value that can be stored in the KyFloat32 variable type.
Definition: types.h:227
bool IsPoint3DInside(const Vec3f &p) const
Indicates whether or not the (X,Y) coordinates of the specified three-dimensional point are inside th...
Definition: box2f.h:164
Box2f()
Creates a new Box2f with invalid extents: you must call Set() before using it.
Definition: box2f.h:32
KyFloat32 SizeY()
Retrieves the extents of the box along the Y axis.
Definition: box2f.h:96
KyFloat32 x
The size of the vector along the X axis.
Definition: vec2f.h:169
void Set(const Vec2f &min_, const Vec2f &max_)
Sets the extents of the bounding box to the specified values.
Definition: box2f.h:78
Vec3f m_max
The maxima of the bounding box.
Definition: box3f.h:174
void Set(KyFloat32 _x, KyFloat32 _y)
Sets the coordinates of the vector.
Definition: vec2f.h:47
T Min(const T &a, const T &b)
Returns the lesser of the two specified values.
Definition: fastmath.h:113
KyFloat32 y
The size of the vector along the Y axis.
Definition: vec3f.h:228
bool IsValid()
Return true if m_min.x <= m_max.x="" &&="" m_min.y="">=><= m_max.y.="">=>
Definition: box2f.h:70
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
void ExpandByBox3(const Box3f &box)
Enlarges the extents of the bounding box to include the area covered by the specified bounding box on...
Definition: box2f.h:136
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
bool IsPoint2DInside(const Vec2f &p) const
Indicates whether or not the specified two-dimensional point is inside the area covered by the boundi...
Definition: box2f.h:154
void ExpandByVec3(const Vec3f &pos)
Enlarges the extents of the bounding box to include the (X,Y) coordinates of the specified three-dime...
Definition: box2f.h:113
T Max(const T &a, const T &b)
Returns the greater of the two specified values.
Definition: fastmath.h:121
Definition: gamekitcrowddispersion.h:20
void Clear()
Clears all information maintained by this object.
Definition: box2f.h:63
#define KY_DEFINE_NEW_DELETE_OPERATORS(MemStat)
This macro defines new and delete operators.
Definition: memory.h:137
void ExpandByBox2(const Box2f &box)
Enlarges the extents of the bounding box to include the area covered by the specified bounding box...
Definition: box2f.h:125
Vec3f m_min
The minima of the bounding box.
Definition: box3f.h:173
bool operator==(const Box2f &other) const
Returns true if both the minima and maxima of other are the same as the minima and maxima of this obj...
Definition: box2f.h:56
bool operator!=(const Box2f &other) const
Returns true if either the minima and maxima of other is different from the minima or maxima of this ...
Definition: box2f.h:59
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
KyFloat32 SizeX()
Retrieves the extents of the box along the X axis.
Definition: box2f.h:93