Support Forum G3D Web Page |
Public Member Functions | |
Sphere () | |
Sphere (float radius) | |
Sphere (class BinaryInput &b) | |
Sphere (const class Any &a) | |
Format is one of: More... | |
Sphere (const Point3 ¢er, float radius) | |
virtual | ~Sphere () |
float | area () const |
bool | contains (const Point3 &point) const |
Returns true if point is less than or equal to radius away from the center. More... | |
bool | contains (const Sphere &other) const |
bool | culledBy (const class Plane *plane, int numPlanes, int32 &cullingPlaneIndex, const uint32 testMask, uint32 &childMask) const |
bool | culledBy (const class Plane *plane, int numPlanes, int32 &cullingPlaneIndex=dummy, const uint32 testMask=0xFFFFFFFF) const |
bool | culledBy (const Array< Plane > &plane, int32 &cullingPlaneIndex, const uint32 testMask, uint32 &childMask) const |
See AABox::culledBy. More... | |
bool | culledBy (const Array< Plane > &plane, int32 &cullingPlaneIndex=dummy, const uint32 testMask=0xFFFFFFFF) const |
Conservative culling test that does not produce a mask for children. More... | |
void | deserialize (class BinaryInput &b) |
void | getBounds (class AABox &out) const |
size_t | hashCode () const |
bool | intersects (const Sphere &other) const |
void | merge (const Sphere &s) |
Sets this to the smallest sphere that encapsulates both. More... | |
bool | operator!= (const Sphere &other) const |
Sphere | operator+ (const Vector3 &v) const |
Translates the sphere. More... | |
Sphere | operator- (const Vector3 &v) const |
Translates the sphere. More... | |
bool | operator== (const Sphere &other) const |
Point3 | randomInteriorPoint (Random &rnd=Random::common()) const |
Uniformly distributed on the interior (includes surface) More... | |
Point3 | randomSurfacePoint (Random &rnd=Random::common()) const |
Uniformly distributed on the surface. More... | |
void | serialize (class BinaryOutput &b) const |
Any | toAny () const |
virtual String | toString () const |
float | volume () const |
Static Public Member Functions | |
static const Sphere & | inf () |
Returns the infinite sphere. More... | |
Public Attributes | |
Point3 | center |
float | radius |
|
inline |
Referenced by operator+(), and operator-().
|
inlineexplicit |
G3D::Sphere::Sphere | ( | class BinaryInput & | b | ) |
|
explicit |
Format is one of:
|
inline |
|
inlinevirtual |
float G3D::Sphere::area | ( | ) | const |
Referenced by G3D::SphereShape::area().
bool G3D::Sphere::contains | ( | const Point3 & | point | ) | const |
Returns true if point is less than or equal to radius away from the center.
Referenced by G3D::PointKDTree< T, PositionFunc, HashFunc, EqualsFunc >::Node::getIntersectingMembers().
bool G3D::Sphere::contains | ( | const Sphere & | other | ) | const |
bool G3D::Sphere::culledBy | ( | const class Plane * | plane, |
int | numPlanes, | ||
int32 & | cullingPlaneIndex, | ||
const uint32 | testMask, | ||
uint32 & | childMask | ||
) | const |
bool G3D::Sphere::culledBy | ( | const class Plane * | plane, |
int | numPlanes, | ||
int32 & | cullingPlaneIndex = dummy , |
||
const uint32 | testMask = 0xFFFFFFFF |
||
) | const |
bool G3D::Sphere::culledBy | ( | const Array< Plane > & | plane, |
int32 & | cullingPlaneIndex, | ||
const uint32 | testMask, | ||
uint32 & | childMask | ||
) | const |
See AABox::culledBy.
bool G3D::Sphere::culledBy | ( | const Array< Plane > & | plane, |
int32 & | cullingPlaneIndex = dummy , |
||
const uint32 | testMask = 0xFFFFFFFF |
||
) | const |
Conservative culling test that does not produce a mask for children.
void G3D::Sphere::deserialize | ( | class BinaryInput & | b | ) |
void G3D::Sphere::getBounds | ( | class AABox & | out | ) | const |
Referenced by G3D::SphereShape::boundingAABox(), BoundsTrait< class G3D::Sphere >::getBounds(), BoundsTrait< class G3D::Sphere * >::getBounds(), G3D::PointKDTree< T, PositionFunc, HashFunc, EqualsFunc >::getIntersectingMembers(), and G3D::KDTree< T, BoundsFunc, HashFunc, EqualsFunc >::getIntersectingMembers().
|
inline |
|
static |
Returns the infinite sphere.
bool G3D::Sphere::intersects | ( | const Sphere & | other | ) | const |
void G3D::Sphere::merge | ( | const Sphere & | s | ) |
Sets this to the smallest sphere that encapsulates both.
|
inline |
|
inline |
Point3 G3D::Sphere::randomInteriorPoint | ( | Random & | rnd = Random::common() | ) | const |
Uniformly distributed on the interior (includes surface)
Referenced by G3D::SphereShape::randomInteriorPoint().
Point3 G3D::Sphere::randomSurfacePoint | ( | Random & | rnd = Random::common() | ) | const |
Uniformly distributed on the surface.
Referenced by G3D::SphereShape::getRandomSurfacePoint().
void G3D::Sphere::serialize | ( | class BinaryOutput & | b | ) | const |
Any G3D::Sphere::toAny | ( | ) | const |
|
virtual |
float G3D::Sphere::volume | ( | ) | const |
Referenced by G3D::SphereShape::volume().
Point3 G3D::Sphere::center |
Referenced by G3D::SphereShape::center(), G3D::PointKDTree< T, PositionFunc, HashFunc, EqualsFunc >::Node::getIntersectingMembers(), G3D::FogVolumeSurface::getObjectSpaceBoundingSphere(), G3D::SphereShape::getRandomSurfacePoint(), hashCode(), HashTrait< G3D::Sphere >::hashCode(), operator!=(), operator+(), operator-(), and operator==().
float G3D::Sphere::radius |