Celeritas  0.5.0-86+4a8eea4
Public Member Functions | List of all members
celeritas::SurfaceClipper Class Reference

Truncate a bounding zone using a convex quadric surface. More...

#include <SurfaceClipper.hh>

Public Member Functions

 SurfaceClipper (BBox *interior, BBox *exterior)
 Construct with interior and exterior bounding boxes.
 
template<Axis T>
void operator() (PlaneAligned< T > const &) const
 Clip the bounding boxes to an axis-aligned plane.
 
template<Axis T>
void operator() (CylCentered< T > const &) const
 Clip the bounding boxes to an axis-aligned cylinder.
 
void operator() (SphereCentered const &) const
 Clip the bounding boxes to a centered sphere.
 
template<Axis T>
void operator() (CylAligned< T > const &) const
 Clip the bounding boxes to a cylinder.
 
void operator() (Plane const &) const
 Clip the bounding boxes to a plane. More...
 
void operator() (Sphere const &) const
 Clip the bounding boxes to a sphere.
 
template<Axis T>
void operator() (ConeAligned< T > const &) const
 Clip the bounding boxes to a cone.
 
void operator() (SimpleQuadric const &) const
 Clip the bounding boxes to a simple quadric.
 
void operator() (GeneralQuadric const &) const
 Clip the bounding boxes to a general quadric.
 
void operator() (Involute const &) const
 Clip the bounding boxes to an involute.
 
void operator() (VariantSurface const &surf) const
 Clip a variant surface.
 

Detailed Description

Truncate a bounding zone using a convex quadric surface.

Convex surfaces are planes, spheroids, cylinders, parabolic cylinders, and paraboloids. All but the spheroids are infinite in at least one direction.

This reduces the size of inner and outer bounding boxes to fit a surface. The interior bounding box is modified to be entirely inside the surface, and the exterior is modified to be entirely outside. Axes that cannot be determined inside or out are left unchanged.

Even though most quadric surfaces are infinite, their intersection with a bounding box may be a smaller bounding box. Accounting for the current bounding box's size when considering further truncation is not yet implemented.

Shrinking bounding boxes will accelerate "distance to in" and "distance to out" calculations.

TODO: move to orangeinp/detail, use BZone, combine with NegatedSurfaceClipper.

Member Function Documentation

◆ operator()()

void celeritas::SurfaceClipper::operator() ( Plane const &  ) const

Clip the bounding boxes to a plane.

Todo:
Check for being in an axial plane and leave the orthogonal plane's extents intact.

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