|
Rebel Fork Framework
|
#include <Urho3D/Math/Sphere.h>
Public Member Functions | |
| Sphere () noexcept | |
| Construct undefined. | |
| Sphere (const Sphere &sphere) noexcept=default | |
| Copy-construct from another sphere. | |
| Sphere (const Vector3 ¢er, float radius) noexcept | |
| Construct from center and radius. | |
| Sphere (const Vector3 *vertices, unsigned count) noexcept | |
| Construct from an array of vertices. | |
| Sphere (const BoundingBox &box) noexcept | |
| Construct from a bounding box. | |
| Sphere (const Frustum &frustum) noexcept | |
| Construct from a frustum. | |
| Sphere (const Polyhedron &poly) noexcept | |
| Construct from a polyhedron. | |
| Sphere & | operator= (const Sphere &rhs) noexcept=default |
| Assign from another sphere. | |
| bool | operator== (const Sphere &rhs) const |
| Test for equality with another sphere. | |
| bool | operator!= (const Sphere &rhs) const |
| Test for inequality with another sphere. | |
| void | Define (const Sphere &sphere) |
| Define from another sphere. | |
| void | Define (const Vector3 ¢er, float radius) |
| Define from center and radius. | |
| void | Define (const Vector3 *vertices, unsigned count) |
| Define from an array of vertices. | |
| void | Define (const BoundingBox &box) |
| Define from a bounding box. | |
| void | Define (const Frustum &frustum) |
| Define from a frustum. | |
| void | Define (const Polyhedron &poly) |
| Define from a polyhedron. | |
| void | Merge (const Vector3 &point) |
| Merge a point. | |
| void | Merge (const Vector3 *vertices, unsigned count) |
| Merge an array of vertices. | |
| void | Merge (const BoundingBox &box) |
| Merge a bounding box. | |
| void | Merge (const Frustum &frustum) |
| Merge a frustum. | |
| void | Merge (const Polyhedron &poly) |
| Merge a polyhedron. | |
| void | Merge (const Sphere &sphere) |
| Merge a sphere. | |
| void | Clear () |
| Clear to undefined state. | |
| bool | Defined () const |
| Return true if this sphere is defined via a previous call to Define() or Merge(). | |
| Intersection | IsInside (const Vector3 &point) const |
| Test if a point is inside. | |
| Intersection | IsInside (const Sphere &sphere) const |
| Test if another sphere is inside, outside or intersects. | |
| Intersection | IsInsideFast (const Sphere &sphere) const |
| Test if another sphere is (partially) inside or outside. | |
| Intersection | IsInside (const BoundingBox &box) const |
| Test if a bounding box is inside, outside or intersects. | |
| Intersection | IsInsideFast (const BoundingBox &box) const |
| Test if a bounding box is (partially) inside or outside. | |
| Circle | Intersect (const Sphere &sphere, float *distanceFromCenter=nullptr) const |
| float | Distance (const Vector3 &point) const |
| Return distance of a point to the surface, or 0 if inside. | |
| Vector3 | GetLocalPoint (float theta, float phi) const |
| Return point on the sphere relative to sphere position. | |
| Vector3 | GetPoint (float theta, float phi) const |
| Return point on the sphere. | |
Public Attributes | |
| Vector3 | center_ |
| Sphere center. | |
| float | radius_ {} |
| Sphere radius. | |
Sphere in three-dimensional space.
| Circle Urho3D::Sphere::Intersect | ( | const Sphere & | sphere, |
| float * | distanceFromCenter = nullptr |
||
| ) | const |
Intersect with another sphere. Return optional distance from the center of this sphere to intersection circle. If there's no intersection, return closest point to another sphere.