Skip to content

Commit

Permalink
A few more cases of constexpr
Browse files Browse the repository at this point in the history
  • Loading branch information
walbourn committed Jan 18, 2022
1 parent 73db2f1 commit 611e486
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Inc/DirectXCollision.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ namespace DirectX
_In_ GXMVECTOR Plane3, _In_ HXMVECTOR Plane4, _In_ HXMVECTOR Plane5) const noexcept;
// Test sphere against six planes (see BoundingFrustum::GetPlanes)

// Static methods
// Static methods
static void CreateMerged(_Out_ BoundingSphere& Out, _In_ const BoundingSphere& S1, _In_ const BoundingSphere& S2) noexcept;

static void CreateFromBoundingBox(_Out_ BoundingSphere& Out, _In_ const BoundingBox& box) noexcept;
Expand All @@ -106,7 +106,7 @@ namespace DirectX
//-------------------------------------------------------------------------------------
struct BoundingBox
{
static const size_t CORNER_COUNT = 8;
static constexpr size_t CORNER_COUNT = 8;

XMFLOAT3 Center; // Center of the box.
XMFLOAT3 Extents; // Distance from the center to each side.
Expand Down Expand Up @@ -155,7 +155,7 @@ namespace DirectX
_In_ GXMVECTOR Plane3, _In_ HXMVECTOR Plane4, _In_ HXMVECTOR Plane5) const noexcept;
// Test box against six planes (see BoundingFrustum::GetPlanes)

// Static methods
// Static methods
static void CreateMerged(_Out_ BoundingBox& Out, _In_ const BoundingBox& b1, _In_ const BoundingBox& b2) noexcept;

static void CreateFromSphere(_Out_ BoundingBox& Out, _In_ const BoundingSphere& sh) noexcept;
Expand All @@ -170,7 +170,7 @@ namespace DirectX
//-------------------------------------------------------------------------------------
struct BoundingOrientedBox
{
static const size_t CORNER_COUNT = 8;
static constexpr size_t CORNER_COUNT = 8;

XMFLOAT3 Center; // Center of the box.
XMFLOAT3 Extents; // Distance from the center to each side.
Expand Down Expand Up @@ -220,7 +220,7 @@ namespace DirectX
_In_ GXMVECTOR Plane3, _In_ HXMVECTOR Plane4, _In_ HXMVECTOR Plane5) const noexcept;
// Test OrientedBox against six planes (see BoundingFrustum::GetPlanes)

// Static methods
// Static methods
static void CreateFromBoundingBox(_Out_ BoundingOrientedBox& Out, _In_ const BoundingBox& box) noexcept;

static void CreateFromPoints(_Out_ BoundingOrientedBox& Out, _In_ size_t Count,
Expand All @@ -232,7 +232,7 @@ namespace DirectX
//-------------------------------------------------------------------------------------
struct BoundingFrustum
{
static const size_t CORNER_COUNT = 8;
static constexpr size_t CORNER_COUNT = 8;

XMFLOAT3 Origin; // Origin of the frustum (and projection).
XMFLOAT4 Orientation; // Quaternion representing rotation.
Expand Down Expand Up @@ -299,7 +299,7 @@ namespace DirectX
_Out_opt_ XMVECTOR* LeftPlane, _Out_opt_ XMVECTOR* TopPlane, _Out_opt_ XMVECTOR* BottomPlane) const noexcept;
// Create 6 Planes representation of Frustum

// Static methods
// Static methods
static void XM_CALLCONV CreateFromMatrix(_Out_ BoundingFrustum& Out, _In_ FXMMATRIX Projection, bool rhcoords = false) noexcept;
};

Expand Down

0 comments on commit 611e486

Please sign in to comment.