53#ifndef LASS_GUARDIAN_OF_INCLUSION_PRIM_SPHERE_3D_H
54#define LASS_GUARDIAN_OF_INCLUSION_PRIM_SPHERE_3D_H
79 typedef Sphere3D<T> TSelf;
82 typedef typename TPoint::TVector TVector;
84 typedef typename TPoint::TValue TValue;
85 typedef typename TPoint::TParam TParam;
86 typedef typename TPoint::TReference TReference;
87 typedef typename TPoint::TConstReference TConstReference;
88 typedef typename TPoint::TNumTraits TNumTraits;
90 enum { dimension = TPoint::dimension };
92 template <
typename U>
struct Rebind
94 typedef Sphere3D<U> Type;
98 Sphere3D(
const Point3D<T>& iCenter, TParam iRadius);
100 const TPoint& center()
const;
103 TConstReference radius()
const;
116 const TValue
equation(
const TPoint& iPoint, TParam iRelativeTolerance)
const;
117 const TValue
signedDistance(
const TPoint& iPoint, TParam iRelativeTolerance)
const;
119 bool contains(
const TPoint& iPoint, TParam iRelativeTolerance)
const;
134template <
typename T,
typename ForwardIterator>
Sphere3D<T> boundingSphere(ForwardIterator first, ForwardIterator last);
136template <
typename T> std::ostream& operator<<(std::ostream& oOStream,
const Sphere3D<T>& iB);
145#ifdef LASS_GUARDIAN_OF_INCLUSION_PRIM_AABB_3D_H
149#ifdef LASS_GUARDIAN_OF_INCLUSION_PRIM_DISK_3D_H
153#ifdef LASS_GUARDIAN_OF_INCLUSION_PRIM_RAY_3D_H
157#ifdef LASS_GUARDIAN_OF_INCLUSION_PRIM_TRIANGLE_MESH_3D_H
Output stream for writing a selection of geometric primitives to XML files.
const TValue area() const
return area of surface of sphere
const TValue signedDistance(const TPoint &iPoint) const
return signed distance of point to surface of sphere.
const TValue squaredDistance(const TPoint &iPoint) const
return squared distance of point to surface of sphere.
const TValue equation(const TPoint &iPoint, TParam iRelativeTolerance) const
(P - C)² - r²
bool isValid() const
return true if sphere has a non-negative radius
const TValue squaredDistance(const TPoint &iPoint, TParam iRelativeTolerance) const
return squared distance of point to surface of sphere.
Side classify(const TPoint &iPoint, TParam iRelativeTolerance) const
Classify a point and tell and what side of the sphere surface it is.
bool contains(const TPoint &iPoint, TParam iRelativeTolerance) const
returns if point is on inside or on surface
const TValue volume() const
return volume of sphere
bool contains(const TPoint &iPoint) const
returns if point is on inside or on surface
Side classify(const TPoint &iPoint) const
Classify a point and tell and what side of the sphere surface it is.
const TValue equation(const TPoint &iPoint) const
(P - C)² - r²
const TValue signedDistance(const TPoint &iPoint, TParam iRelativeTolerance) const
return signed distance of point to surface of sphere.
#define LASS_SIMD_ALIGN
if LASS_SIMD_ALIGNMENT is set, use LASS_SIMD_ALIGN to align some structures on SIMD alignment boundar...
set of geometrical primitives
Side
Different sides of a surface.
Library for Assembled Shared Sources.