41 return inOther.GetSqDistanceTo(GetCenter()) <=
Square(mRadius);
56 float radius = 0.5f * (mRadius + d);
62 center.StoreFloat3(&mCenter);
#define JPH_NAMESPACE_END
Definition Core.h:367
#define JPH_NAMESPACE_BEGIN
Definition Core.h:361
constexpr T Square(T inV)
Square a value.
Definition Math.h:52
AllocateFunction Allocate
Definition Memory.cpp:59
#define JPH_OVERRIDE_NEW_DELETE
Macro to override the new and delete functions.
Definition Memory.h:29
Axis aligned box.
Definition AABox.h:16
Class that holds 3 floats. Used as a storage class. Convert to Vec3 for calculations.
Definition Float3.h:13
bool Overlaps(const AABox &inOther) const
Check if this sphere overlaps with a box.
Definition Sphere.h:39
float GetRadius() const
Definition Sphere.h:30
JPH_OVERRIDE_NEW_DELETE Sphere()=default
Constructor.
Vec3 GetSupport(Vec3Arg inDirection) const
Calculate the support vector for this convex shape.
Definition Sphere.h:22
Vec3 GetCenter() const
Definition Sphere.h:29
bool Overlaps(const Sphere &inB) const
Test if two spheres overlap.
Definition Sphere.h:33
Sphere(Vec3Arg inCenter, float inRadius)
Definition Sphere.h:19
Sphere(const Float3 &inCenter, float inRadius)
Definition Sphere.h:18
void EncapsulatePoint(Vec3Arg inPoint)
Create the minimal sphere that encapsulates this sphere and inPoint.
Definition Sphere.h:45
JPH_INLINE float Length() const
Length of vector.
Definition Vec3.inl:669
JPH_INLINE float LengthSq() const
Squared length of vector.
Definition Vec3.inl:653
static JPH_INLINE Vec3 sLoadFloat3Unsafe(const Float3 &inV)
Load 3 floats from memory (reads 32 bits extra which it doesn't use)
Definition Vec3.inl:134