ug4
ug::Sphere< vector_t > Class Template Reference

#include <shapes.h>

Public Member Functions

bool contains_point (const vector_t &point) const
 returns true if the point lies inside or on the bounds of the rectangle More...
 
bool intersects (const Sphere &sphere) const
 returns true if the specified sphere touches or intersects this sphere. More...
 
 Sphere ()
 
 Sphere (const vector_t &nCenter, number nRadius)
 

Public Attributes

vector_t center
 
number radius
 

Constructor & Destructor Documentation

◆ Sphere() [1/2]

template<class vector_t >
ug::Sphere< vector_t >::Sphere ( )
inline

◆ Sphere() [2/2]

template<class vector_t >
ug::Sphere< vector_t >::Sphere ( const vector_t &  nCenter,
number  nRadius 
)
inline

Member Function Documentation

◆ contains_point()

template<class vector_t >
bool ug::Sphere< vector_t >::contains_point ( const vector_t &  point) const

returns true if the point lies inside or on the bounds of the rectangle

References p, ug::sq(), and ug::VecDistanceSq().

◆ intersects()

template<class vector_t >
bool ug::Sphere< vector_t >::intersects ( const Sphere< vector_t > &  sphere) const

returns true if the specified sphere touches or intersects this sphere.

References ug::Sphere< vector_t >::center, ug::Sphere< vector_t >::radius, ug::sq(), and ug::VecDistanceSq().

Member Data Documentation

◆ center

template<class vector_t >
vector_t ug::Sphere< vector_t >::center

◆ radius

template<class vector_t >
number ug::Sphere< vector_t >::radius

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