gr::HyperSphere< Point, _dim, Scalar > Class Template Reference

#include <intersectionPrimitive.h>

+ Collaboration diagram for gr::HyperSphere< Point, _dim, Scalar >:

Public Types

enum  { Dim = _dim }
 

Public Member Functions

const Point & center () const
 
 HyperSphere (const Point &center, Scalar radius)
 
 HyperSphere (const HyperSphere< Point, _dim, Scalar > &other)
 
bool intersect (const Point &nodeCenter, Scalar halfEdgeLength) const
 
bool intersectFast (const Point &nodeCenter, Scalar halfEdgeLength) const
 intersectFast Fast but inacurate intersection test More...
 
bool intersectPoint (const Point &pos, Scalar epsilon) const
 
 operator Point () const
 Implicit conversion operator to Eigen vectors. More...
 
bool operator< (const HyperSphere< Point, _dim, Scalar > &other) const
 Comparison operator comparing first the radius then the position. More...
 
HyperSphere< Point, _dim, Scalarquantified (Scalar eps) const
 Construct a copy of the instance with a quantified radius and pos. More...
 
const Scalarradius () const
 
Scalarradius ()
 

Static Public Member Functions

static bool intersectPoint (const Point &pos, Scalar epsilon, const Point &center, const Scalar &radius)
 

Member Enumeration Documentation

template<class Point , int _dim, typename Scalar >
anonymous enum
Enumerator
Dim 

Constructor & Destructor Documentation

template<class Point , int _dim, typename Scalar >
gr::HyperSphere< Point, _dim, Scalar >::HyperSphere ( const Point &  center,
Scalar  radius 
)
inline
template<class Point , int _dim, typename Scalar >
gr::HyperSphere< Point, _dim, Scalar >::HyperSphere ( const HyperSphere< Point, _dim, Scalar > &  other)
inline

Member Function Documentation

template<class Point , int _dim, typename Scalar >
const Point& gr::HyperSphere< Point, _dim, Scalar >::center ( ) const
inline
template<class Point , int _dim, typename Scalar >
bool gr::HyperSphere< Point, _dim, Scalar >::intersect ( const Point &  nodeCenter,
Scalar  halfEdgeLength 
) const
inline

, James, A Simple Method for Box-Sphere Intersection Testing, Graphics Gems, p. 335-339, code: p. 730-732, BoxSphere.c.

template<class Point , int _dim, typename Scalar >
bool gr::HyperSphere< Point, _dim, Scalar >::intersectFast ( const Point &  nodeCenter,
Scalar  halfEdgeLength 
) const
inline

intersectFast Fast but inacurate intersection test

Parameters
nodeCenter
halfEdgeLength
Returns

Check if the node center is inside the Hypersphere (radius grown by halfEdgeLength.

template<class Point , int _dim, typename Scalar >
bool gr::HyperSphere< Point, _dim, Scalar >::intersectPoint ( const Point &  pos,
Scalar  epsilon 
) const
inline
template<class Point , int _dim, typename Scalar >
static bool gr::HyperSphere< Point, _dim, Scalar >::intersectPoint ( const Point &  pos,
Scalar  epsilon,
const Point &  center,
const Scalar radius 
)
inlinestatic
template<class Point , int _dim, typename Scalar >
gr::HyperSphere< Point, _dim, Scalar >::operator Point ( ) const
inline

Implicit conversion operator to Eigen vectors.

template<class Point , int _dim, typename Scalar >
bool gr::HyperSphere< Point, _dim, Scalar >::operator< ( const HyperSphere< Point, _dim, Scalar > &  other) const
inline

Comparison operator comparing first the radius then the position.

template<class Point , int _dim, typename Scalar >
HyperSphere<Point, _dim, Scalar> gr::HyperSphere< Point, _dim, Scalar >::quantified ( Scalar  eps) const
inline

Construct a copy of the instance with a quantified radius and pos.

template<class Point , int _dim, typename Scalar >
const Scalar& gr::HyperSphere< Point, _dim, Scalar >::radius ( ) const
inline
template<class Point , int _dim, typename Scalar >
Scalar& gr::HyperSphere< Point, _dim, Scalar >::radius ( )
inline

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