Visual Computing Library
Loading...
Searching...
No Matches
vcl::Sphere< Scalar > Class Template Reference

Public Types

using ScalarType = Scalar
 
using PointType = Point3< Scalar >
 
using BoxType = Box3< Scalar >
 

Public Member Functions

 Sphere (const Point3< Scalar > &center, Scalar radius)
 
const Point3< Scalar > & center () const
 
Point3< Scalar > & center ()
 
const Scalar & radius () const
 
Scalar & radius ()
 
template<typename S >
auto cast () const
 
Scalar diameter () const
 
Scalar circumference () const
 
Scalar surfaceArea () const
 
Scalar volume () const
 
bool isInside (const Point3< Scalar > &p) const
 
bool intersects (const Box3< Scalar > &b) const
 Checks if a sphere intersects with a Box.
 

Private Attributes

Point3< Scalar > mCenter
 
Scalar mRadius
 

Member Function Documentation

◆ intersects()

template<typename Scalar >
bool vcl::Sphere< Scalar >::intersects ( const Box3< Scalar > &  b) const
inline

Checks if a sphere intersects with a Box.

Parameters
b
Returns

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