Plasma Engine  2.0
Loading...
Searching...
No Matches
SimdBBoxSphere.h
1#pragma once
2
3#include <Foundation/SimdMath/SimdBBox.h>
4
5class PL_FOUNDATION_DLL plSimdBBoxSphere
6{
7public:
8 PL_DECLARE_POD_TYPE();
9
11 plSimdBBoxSphere(); // [tested]
12
14 [[deprecated("Use MakeFromCenterExtents() instead.")]] plSimdBBoxSphere(const plSimdVec4f& vCenter, const plSimdVec4f& vBoxHalfExtents, const plSimdFloat& fSphereRadius); // [tested]
15
17 [[deprecated("Use MakeFromBoxAndSphere() instead.")]] plSimdBBoxSphere(const plSimdBBox& box, const plSimdBSphere& sphere); // [tested]
18
20 plSimdBBoxSphere(const plSimdBBox& box); // [tested]
21
23 plSimdBBoxSphere(const plSimdBSphere& sphere); // [tested]
24
26 [[nodiscard]] static plSimdBBoxSphere MakeZero();
27
29 [[nodiscard]] static plSimdBBoxSphere MakeInvalid(); // [tested]
30
32 [[nodiscard]] static plSimdBBoxSphere MakeFromCenterExtents(const plSimdVec4f& vCenter, const plSimdVec4f& vBoxHalfExtents, const plSimdFloat& fSphereRadius);
33
35 [[nodiscard]] static plSimdBBoxSphere MakeFromPoints(const plSimdVec4f* pPoints, plUInt32 uiNumPoints, plUInt32 uiStride = sizeof(plSimdVec4f));
36
38 [[nodiscard]] static plSimdBBoxSphere MakeFromBox(const plSimdBBox& box);
39
41 [[nodiscard]] static plSimdBBoxSphere MakeFromSphere(const plSimdBSphere& sphere);
42
44 [[nodiscard]] static plSimdBBoxSphere MakeFromBoxAndSphere(const plSimdBBox& box, const plSimdBSphere& sphere);
45
46
47public:
49 [[deprecated("Use MakeInvalid() instead.")]] void SetInvalid(); // [tested]
50
52 bool IsValid() const; // [tested]
53
55 bool IsNaN() const; // [tested]
56
58 [[deprecated("Use MakeFromPoints() instead.")]] void SetFromPoints(const plSimdVec4f* pPoints, plUInt32 uiNumPoints, plUInt32 uiStride = sizeof(plSimdVec4f)); // [tested]
59
61 plSimdBBox GetBox() const; // [tested]
62
64 plSimdBSphere GetSphere() const; // [tested]
65
67 void ExpandToInclude(const plSimdBBoxSphere& rhs); // [tested]
68
70 void Transform(const plSimdTransform& t); // [tested]
71
73 void Transform(const plSimdMat4f& mMat); // [tested]
74
75 [[nodiscard]] bool operator==(const plSimdBBoxSphere& rhs) const; // [tested]
76 [[nodiscard]] bool operator!=(const plSimdBBoxSphere& rhs) const; // [tested]
77
78public:
79 plSimdVec4f m_CenterAndRadius;
80 plSimdVec4f m_BoxHalfExtents;
81};
82
83#include <Foundation/SimdMath/Implementation/SimdBBoxSphere_inl.h>
Definition SimdBBox.h:6
Definition SimdBBoxSphere.h:6
plSimdBBoxSphere()
Default constructor does not initialize anything.
Definition SimdBSphere.h:6
Definition SimdFloat.h:7
A 4x4 matrix class.
Definition SimdMat4f.h:7
Definition SimdTransform.h:6
A 4-component SIMD vector class.
Definition SimdVec4f.h:8