Urho3D
Public Member Functions | Public Attributes | List of all members
Urho3D::Sphere Class Reference

Sphere in three-dimensional space. More...

#include </home/runner/work/urho3d-doxygen.github.io/urho3d-doxygen.github.io/urho3d_repo/Source/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 &center, float radius) noexcept
 Construct from center and radius.
 
 Sphere (const Vector3 *vertices, i32 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.
 
Sphereoperator= (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 &center, float radius)
 Define from center and radius.
 
void Define (const Vector3 *vertices, i32 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, i32 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.
 
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.
 

Detailed Description

Sphere in three-dimensional space.


The documentation for this class was generated from the following files: