Skip to content

Commit 48ab662

Browse files
committed
DirectXMath 3.09
1 parent 3af6a34 commit 48ab662

11 files changed

+227
-237
lines changed

Inc/DirectXCollision.h

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@
99
// Copyright (c) Microsoft Corporation. All rights reserved.
1010
//-------------------------------------------------------------------------------------
1111

12-
#ifdef _MSC_VER
1312
#pragma once
14-
#endif
1513

1614
#include "DirectXMath.h"
1715

@@ -38,6 +36,8 @@ struct BoundingFrustum;
3836

3937
#pragma warning(push)
4038
#pragma warning(disable:4324 4820)
39+
// C4324: alignment padding warnings
40+
// C4820: Off by default noise
4141

4242
//-------------------------------------------------------------------------------------
4343
// Bounding sphere
@@ -49,8 +49,8 @@ struct BoundingSphere
4949

5050
// Creators
5151
BoundingSphere() : Center(0,0,0), Radius( 1.f ) {}
52-
BoundingSphere( _In_ const XMFLOAT3& center, _In_ float radius )
53-
: Center(center), Radius(radius) { assert( radius >= 0.f ); };
52+
XM_CONSTEXPR BoundingSphere( _In_ const XMFLOAT3& center, _In_ float radius )
53+
: Center(center), Radius(radius) {}
5454
BoundingSphere( _In_ const BoundingSphere& sp )
5555
: Center(sp.Center), Radius(sp.Radius) {}
5656

@@ -110,8 +110,8 @@ struct BoundingBox
110110

111111
// Creators
112112
BoundingBox() : Center(0,0,0), Extents( 1.f, 1.f, 1.f ) {}
113-
BoundingBox( _In_ const XMFLOAT3& center, _In_ const XMFLOAT3& extents )
114-
: Center(center), Extents(extents) { assert(extents.x >= 0 && extents.y >= 0 && extents.z >= 0); }
113+
XM_CONSTEXPR BoundingBox( _In_ const XMFLOAT3& center, _In_ const XMFLOAT3& extents )
114+
: Center(center), Extents(extents) {}
115115
BoundingBox( _In_ const BoundingBox& box ) : Center(box.Center), Extents(box.Extents) {}
116116

117117
// Methods
@@ -171,11 +171,8 @@ struct BoundingOrientedBox
171171

172172
// Creators
173173
BoundingOrientedBox() : Center(0,0,0), Extents( 1.f, 1.f, 1.f ), Orientation(0,0,0, 1.f ) {}
174-
BoundingOrientedBox( _In_ const XMFLOAT3& _Center, _In_ const XMFLOAT3& _Extents, _In_ const XMFLOAT4& _Orientation )
175-
: Center(_Center), Extents(_Extents), Orientation(_Orientation)
176-
{
177-
assert(_Extents.x >= 0 && _Extents.y >= 0 && _Extents.z >= 0);
178-
}
174+
XM_CONSTEXPR BoundingOrientedBox( _In_ const XMFLOAT3& _Center, _In_ const XMFLOAT3& _Extents, _In_ const XMFLOAT4& _Orientation )
175+
: Center(_Center), Extents(_Extents), Orientation(_Orientation) {}
179176
BoundingOrientedBox( _In_ const BoundingOrientedBox& box )
180177
: Center(box.Center), Extents(box.Extents), Orientation(box.Orientation) {}
181178

@@ -239,12 +236,12 @@ struct BoundingFrustum
239236
// Creators
240237
BoundingFrustum() : Origin(0,0,0), Orientation(0,0,0, 1.f), RightSlope( 1.f ), LeftSlope( -1.f ),
241238
TopSlope( 1.f ), BottomSlope( -1.f ), Near(0), Far( 1.f ) {}
242-
BoundingFrustum( _In_ const XMFLOAT3& _Origin, _In_ const XMFLOAT4& _Orientation,
239+
XM_CONSTEXPR BoundingFrustum( _In_ const XMFLOAT3& _Origin, _In_ const XMFLOAT4& _Orientation,
243240
_In_ float _RightSlope, _In_ float _LeftSlope, _In_ float _TopSlope, _In_ float _BottomSlope,
244241
_In_ float _Near, _In_ float _Far )
245242
: Origin(_Origin), Orientation(_Orientation),
246243
RightSlope(_RightSlope), LeftSlope(_LeftSlope), TopSlope(_TopSlope), BottomSlope(_BottomSlope),
247-
Near(_Near), Far(_Far) { assert( _Near <= _Far ); }
244+
Near(_Near), Far(_Far) {}
248245
BoundingFrustum( _In_ const BoundingFrustum& fr )
249246
: Origin(fr.Origin), Orientation(fr.Orientation), RightSlope(fr.RightSlope), LeftSlope(fr.LeftSlope),
250247
TopSlope(fr.TopSlope), BottomSlope(fr.BottomSlope), Near(fr.Near), Far(fr.Far) {}
@@ -325,7 +322,10 @@ namespace TriangleTests
325322
****************************************************************************/
326323

327324
#pragma warning(push)
328-
#pragma warning(disable : 4068 4616 6001)
325+
#pragma warning(disable : 4068 4365 4616 6001)
326+
// C4068/4616: ignore unknown pragmas
327+
// C4365: Off by default noise
328+
// C6001: False positives
329329

330330
#pragma prefast(push)
331331
#pragma prefast(disable : 25000, "FXMVECTOR is 16 bytes")

Inc/DirectXCollision.inl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@
99
// Copyright (c) Microsoft Corporation. All rights reserved.
1010
//-------------------------------------------------------------------------------------
1111

12-
#ifdef _MSC_VER
1312
#pragma once
14-
#endif
1513

1614
XMGLOBALCONST XMVECTORF32 g_BoxOffset[8] =
1715
{

Inc/DirectXColors.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@
99
// Copyright (c) Microsoft Corporation. All rights reserved.
1010
//-------------------------------------------------------------------------------------
1111

12-
#ifdef _MSC_VER
1312
#pragma once
14-
#endif
1513

1614
#include "DirectXMath.h"
1715

0 commit comments

Comments
 (0)