36 explicit Sphere(
float radius) : radius(radius) {}
61 return (center == other.
center) && (radius == other.
radius);
65 return !((center == other.
center) && (radius == other.
radius));
80 const class Plane* plane,
82 int32& cullingPlaneIndex,
90 const class Plane* plane,
92 int32& cullingPlaneIndex = dummy,
93 const uint32 testMask = 0xFFFFFFFF)
const;
100 int32& cullingPlaneIndex,
109 int32& cullingPlaneIndex = dummy,
110 const uint32 testMask = 0xFFFFFFFF)
const;
112 virtual std::string
toString()
const;
134 return Sphere(center + v, radius);
139 return Sphere(center - v, radius);
bool intersects(const Sphere &other) const
Definition: Sphere.cpp:91
virtual ~Sphere()
Definition: Sphere.h:55
float volume() const
Definition: Sphere.cpp:242
bool operator!=(const Sphere &other) const
Definition: Sphere.h:64
static const Sphere & inf()
Definition: Sphere.cpp:67
Sphere operator+(const Vector3 &v) const
Definition: Sphere.h:133
float radius
Definition: Sphere.h:31
Definition: HashTrait.h:105
Dynamic 1D array tuned for performance.
Definition: Array.h:95
Sphere()
Definition: Sphere.h:33
void merge(const Sphere &s)
Definition: Sphere.cpp:96
bool operator==(const Sphere &other) const
Definition: Sphere.h:60
void getBounds(class AABox &out) const
Definition: Sphere.cpp:252
virtual std::string toString() const
Definition: Sphere.cpp:73
Point3 randomSurfacePoint() const
Definition: Sphere.cpp:225
Sphere(float radius)
Definition: Sphere.h:36
Easy loading and saving of human-readable configuration files.
Definition: Any.h:184
size_t hashCode() const
Definition: Vector3.cpp:155
static int32 dummy
Definition: Sphere.h:27
Sphere operator-(const Vector3 &v) const
Definition: Sphere.h:138
Point3 randomInteriorPoint() const
Definition: Sphere.cpp:230
Any toAny() const
Definition: Sphere.cpp:39
bool culledBy(const class Plane *plane, int numPlanes, int32 &cullingPlaneIndex, const uint32 testMask, uint32 &childMask) const
bool contains(const Point3 &point) const
Definition: Sphere.cpp:79
float area() const
Definition: Sphere.cpp:247
static size_t hashCode(const G3D::Sphere &key)
Definition: Sphere.h:149
Point3 center
Definition: Sphere.h:30
static unorm16 zero()
Definition: unorm16.h:82
Definition: BinaryOutput.h:52
int32_t int32
Definition: g3dmath.h:167
uint32_t uint32
Definition: g3dmath.h:168
void serialize(class BinaryOutput &b) const
Definition: Sphere.cpp:55
void deserialize(class BinaryInput &b)
Definition: Sphere.cpp:61