13 : m_Origin( a_rSphereData.AsVector3() ), m_fRadius( a_rSphereData.w )
17 : m_Origin( a_rOrigin ), m_fRadius( a_fRadius )
21 : m_Origin( a_fOriginX, a_fOriginY, a_fOriginZ ), m_fRadius( a_fRadius )
25 : m_Origin( a_rSphere.m_Origin ), m_fRadius( a_rSphere.m_fRadius )
31 m_fRadius = a_rSphereData.
w;
37 m_fRadius = a_fRadius;
42 m_Origin.Set( a_fOriginX, a_fOriginY, a_fOriginZ );
43 m_fRadius = a_fRadius;
48 m_Origin = a_rSphere.m_Origin;
49 m_fRadius = a_rSphere.m_fRadius;
54 TVector3 diff = a_rSphere2.m_Origin - a_rSphere1.m_Origin;
57 TFLOAT fRadDiff = a_rSphere2.m_fRadius - a_rSphere1.m_fRadius;
59 if ( fRadDiff <= 0.0f )
61 if ( fMag < fRadDiff * fRadDiff )
64 else if ( fMag < fRadDiff * fRadDiff )
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 );
80 if ( m_fRadius < fDist )
83 if ( fDist < -m_fRadius )
91 m_Origin = a_rSphere.m_Origin;
92 m_fRadius = a_rSphere.m_fRadius;
#define TREINTERPRETCAST(TYPE, VALUE)
#define TOSHI_NAMESPACE_START
#define TOSHI_NAMESPACE_END
TFORCEINLINE TFLOAT Sqrt(TFLOAT a_fX)
@ PlaneComparison_Intersects
@ PlaneComparison_InFront
TFORCEINLINE constexpr TFLOAT GetD() const
TFORCEINLINE constexpr const TVector3 & GetNormal() const
constexpr void Set(const TSphere &a_rSphere)
constexpr TSphere(const TVector4 &a_rSphereData)
constexpr void Set(const TVector4 &a_rSphereData)
constexpr TSphere(const TVector3 &a_rOrigin, TFLOAT a_fRadius)
constexpr TSphere(const TSphere &a_rSphere)
constexpr void Set(TFLOAT a_fOriginX, TFLOAT a_fOriginY, TFLOAT a_fOriginZ, TFLOAT a_fRadius)
constexpr TSphere()=default
TFORCEINLINE TVector4 & AsVector4()
constexpr TFORCEINLINE TFLOAT GetRadius() const
constexpr TSphere(TFLOAT a_fOriginX, TFLOAT a_fOriginY, TFLOAT a_fOriginZ, TFLOAT a_fRadius)
TFORCEINLINE const TVector4 & AsVector4() const
constexpr TPlane::PlaneComparison ComparePlane(const TPlane &a_rPlane)
constexpr void Set(const TVector3 &a_rOrigin, TFLOAT a_fRadius)
constexpr TSphere & operator=(const TSphere &a_rSphere)
constexpr TFORCEINLINE TVector3 & GetOrigin()
void Union(const TSphere &a_rSphere1, const TSphere &a_rSphere2)
constexpr TFORCEINLINE const TVector3 & GetOrigin() const
constexpr void Multiply(const TVector3 &vec)
constexpr TFLOAT MagnitudeSq() const
static constexpr TFLOAT DotProduct(const TVector3 &vec1, const TVector3 &vec2)