84 void cCuboid::Expand(
int a_SubMinX,
int a_AddMaxX,
int a_SubMinY,
int a_AddMaxY,
int a_SubMinZ,
int a_AddMaxZ)
208 if (a_Point.
x <
p1.
x)
212 else if (a_Point.
x >
p2.
x)
217 if (a_Point.
y <
p1.
y)
221 else if (a_Point.
y >
p2.
y)
226 if (a_Point.
z <
p1.
z)
230 else if (a_Point.
z >
p2.
z)
void Expand(int a_SubMinX, int a_AddMaxX, int a_SubMinY, int a_AddMaxY, int a_SubMinZ, int a_AddMaxZ)
Expands the cuboid by the specified amount in each direction.
void ClampSize(Vector3i a_MaxSize)
Clamps this cuboid's p2 so that the cuboid's size doesn't exceed the specified max size.
int GetVolume(void) const
Returns the volume of the cuboid, in blocks.
void Assign(Vector3i a_Point1, Vector3i a_Point2)
void ClampX(int a_MinX, int a_MaxX)
Clamps both X coords to the specified range.
bool IsSorted(void) const
Returns true if the coords are properly sorted (lesser in p1, greater in p2)
void Clamp(const cCuboid &a_Limits)
Clamps this cuboid, so that it doesn't reach outside of a_Limits in any direction.
void ClampZ(int a_MinZ, int a_MaxZ)
Clamps both Z coords to the specified range.
void Move(Vector3i a_Offset)
Moves the cuboid by the specified offset.
void Engulf(Vector3i a_Point)
If needed, expands the cuboid so that it contains the specified point.
bool IsCompletelyInside(const cCuboid &a_Outer) const
Returns true if this cuboid is completely inside the specified cuboid (in all 6 coords).
void ClampY(int a_MinY, int a_MaxY)
Clamps both Y coords to the specified range.
void Move(T a_X, T a_Y, T a_Z)