Add constructor to BoundingBox for single point empty box construction

This commit is contained in:
Wojtek Figat
2021-03-18 21:50:05 +01:00
parent 544a11562c
commit 8ef8b89fd5
25 changed files with 39 additions and 29 deletions

View File

@@ -6,7 +6,7 @@
#include "../Types/String.h"
const BoundingBox BoundingBox::Empty(Vector3(MAX_float), Vector3(MIN_float));
const BoundingBox BoundingBox::Zero(Vector3(0.0f), Vector3(0.0f));
const BoundingBox BoundingBox::Zero(Vector3(0.0f));
String BoundingBox::ToString() const
{

View File

@@ -45,6 +45,16 @@ public:
{
}
/// <summary>
/// Initializes a new instance of the <see cref="BoundingBox"/> struct.
/// </summary>
/// <param name="point">The location of the empty bounding box.</param>
BoundingBox(const Vector3& point)
: Minimum(point)
, Maximum(point)
{
}
/// <summary>
/// Initializes a new instance of the <see cref="BoundingBox"/> struct.
/// </summary>