Public Member Functions

  • Sphere ()
  • Sphere (const vec3 &center, float radius)
  • float
    getRadius () const
  • setRadius (float radius)
  • vec3
    getCenter () const
  • setCenter (const vec3 &center)
  • bool
    intersects (const AxisAlignedBox &box) const
  • bool
    intersects (const Ray &ray) const
  • int
    intersect (const Ray &ray, float *intersection) const
  • int
    intersect (const Ray &ray, float *min, float *max) const

Static Public Member Functions

  • calculateBoundingSphere (const std::vector< vec3 > &points)
  • calculateBoundingSphere (const vec3 *points, size_t numPoints)

Protected Attributes

  • vec3
    mCenter
  • float
    mRadius