#include <TSphere.h>
Definition at line 7 of file TSphere.h.
◆ TSphere() [1/5]
◆ TSphere() [2/5]
TSphere::TSphere |
( |
const TVector4 & | a_rSphereData | ) |
|
|
inlineconstexpr |
Definition at line 12 of file TSphere.h.
13 : m_Origin( a_rSphereData.
AsVector3() ), m_fRadius( a_rSphereData.
w )
14 {}
◆ TSphere() [3/5]
Definition at line 16 of file TSphere.h.
17 : m_Origin( a_rOrigin ), m_fRadius( a_fRadius )
18 {}
◆ TSphere() [4/5]
Definition at line 20 of file TSphere.h.
21 : m_Origin( a_fOriginX, a_fOriginY, a_fOriginZ ), m_fRadius( a_fRadius )
22 {}
◆ TSphere() [5/5]
TSphere::TSphere |
( |
const TSphere & | a_rSphere | ) |
|
|
inlineconstexpr |
Definition at line 24 of file TSphere.h.
25 : m_Origin( a_rSphere.m_Origin ), m_fRadius( a_rSphere.m_fRadius )
26 {}
◆ AsVector4() [1/2]
Definition at line 111 of file TSphere.h.
#define TREINTERPRETCAST(TYPE, VALUE)
◆ AsVector4() [2/2]
◆ ComparePlane()
Definition at line 76 of file TSphere.h.
77 {
79
80 if ( m_fRadius < fDist )
82
83 if ( fDist < -m_fRadius )
85
87 }
@ PlaneComparison_Intersects
@ PlaneComparison_InFront
TFORCEINLINE constexpr TFLOAT GetD() const
TFORCEINLINE constexpr const TVector3 & GetNormal() const
static constexpr TFLOAT DotProduct(const TVector3 &vec1, const TVector3 &vec2)
◆ GetOrigin() [1/2]
Definition at line 96 of file TSphere.h.
97 {
98 return m_Origin;
99 }
◆ GetOrigin() [2/2]
Definition at line 101 of file TSphere.h.
102 {
103 return m_Origin;
104 }
◆ GetRadius()
Definition at line 106 of file TSphere.h.
107 {
108 return m_fRadius;
109 }
◆ operator=()
Definition at line 89 of file TSphere.h.
90 {
91 m_Origin = a_rSphere.m_Origin;
92 m_fRadius = a_rSphere.m_fRadius;
93 return *this;
94 }
◆ Set() [1/4]
void TSphere::Set |
( |
const TSphere & | a_rSphere | ) |
|
|
inlineconstexpr |
Definition at line 46 of file TSphere.h.
47 {
48 m_Origin = a_rSphere.m_Origin;
49 m_fRadius = a_rSphere.m_fRadius;
50 }
◆ Set() [2/4]
Definition at line 34 of file TSphere.h.
35 {
36 m_Origin = a_rOrigin;
37 m_fRadius = a_fRadius;
38 }
◆ Set() [3/4]
void TSphere::Set |
( |
const TVector4 & | a_rSphereData | ) |
|
|
inlineconstexpr |
Definition at line 28 of file TSphere.h.
29 {
31 m_fRadius = a_rSphereData.
w;
32 }
◆ Set() [4/4]
Definition at line 40 of file TSphere.h.
41 {
42 m_Origin.Set( a_fOriginX, a_fOriginY, a_fOriginZ );
43 m_fRadius = a_fRadius;
44 }
◆ Union()
void TSphere::Union |
( |
const TSphere & | a_rSphere1, |
|
|
const TSphere & | a_rSphere2 ) |
|
inline |
Definition at line 52 of file TSphere.h.
53 {
54 TVector3 diff = a_rSphere2.m_Origin - a_rSphere1.m_Origin;
55
57 TFLOAT fRadDiff = a_rSphere2.m_fRadius - a_rSphere1.m_fRadius;
58
59 if ( fRadDiff <= 0.0f )
60 {
61 if ( fMag < fRadDiff * fRadDiff )
63 }
64 else if ( fMag < fRadDiff * fRadDiff )
65 {
67 }
68 else
69 {
70 m_fRadius = ( a_rSphere1.m_fRadius + a_rSphere2.m_fRadius +
TMath::Sqrt( fMag ) ) * 0.5f;
72 m_Origin.Add( a_rSphere1.m_Origin, diff );
73 }
74 }
TFORCEINLINE TFLOAT Sqrt(TFLOAT a_fX)
constexpr void Set(const TVector4 &a_rSphereData)
constexpr void Multiply(const TVector3 &vec)
constexpr TFLOAT MagnitudeSq() const
The documentation for this class was generated from the following file:
- D:/_dev/OpenBarnyard/Source/Toshi/Source/Math/TSphere.h