Sphere in three-dimensional space. More...

#include <Urho3D/Math/Sphere.h>

Collaboration diagram for Urho3D::Sphere:
[legend]

Public Member Functions

 Sphere ()
 Construct undefined.
 
 Sphere (const Sphere &sphere)
 Copy-construct from another sphere.
 
 Sphere (const Vector3 &center, float radius)
 Construct from center and radius.
 
 Sphere (const Vector3 *vertices, unsigned count)
 Construct from an array of vertices.
 
 Sphere (const BoundingBox &box)
 Construct from a bounding box.
 
 Sphere (const Frustum &frustum)
 Construct from a frustum.
 
 Sphere (const Polyhedron &poly)
 Construct from a polyhedron.
 
Sphereoperator= (const Sphere &rhs)
 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, 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.
 
float Distance (const Vector3 &point) const
 Return distance of a point to the surface, or 0 if inside.
 

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:
  • Source/Urho3D/Math/Sphere.h
  • Source/Urho3D/Math/Sphere.cpp