Celeritas
0.5.0-56+6b053cd
|
Build a region of intersecting surfaces as a CSG node. More...
#include <IntersectSurfaceBuilder.hh>
Public Types | |
using | State = detail::IntersectSurfaceState |
using | UnitBuilder = detail::CsgUnitBuilder |
using | VecNode = std::vector< NodeId > |
Types | |
using | Tol = Tolerance<> |
Public Member Functions | |
Tol const & | tol () const |
Get the construction tolerance. | |
template<class S > | |
void | operator() (S const &surf) |
Add a surface with negative quadric value being "inside". | |
template<class S > | |
void | operator() (Sense sense, S const &surf) |
Add a surface with a sense. More... | |
template<class S > | |
void | operator() (Sense sense, S const &surf, std::string &&face_name) |
Add a surface with a sense. More... | |
void | operator() (Sense sense, BBox const &bbox) |
Promise that all bounding surfaces are inside/outside this bbox. More... | |
IntersectSurfaceBuilder (UnitBuilder *ub, State *state) | |
Construct with persistent unit builder and less persistent state. More... | |
Build a region of intersecting surfaces as a CSG node.
This is the building block for constructing shapes, solids, and so forth. The result of this class is:
Internally, this class uses:
SurfaceClipper
to update bounding boxes for closed quadric surfaces (axis aligned cylinders, spheres, planes)apply_transform
(which calls detail::SurfaceTransformer
and its siblings) to generate new surfaces based on the local transformed coordinate systemRecursiveSimplifier
to take transformed or user-input surfaces and reduce them to more compact quadric representations celeritas::orangeinp::IntersectSurfaceBuilder::IntersectSurfaceBuilder | ( | UnitBuilder * | ub, |
State * | state | ||
) |
Construct with persistent unit builder and less persistent state.
Both arguments must have lifetimes that exceed the surface builder, but the "unit builder" will have a duration of the whole unit construction, whereas the state just has the duration of the surface set being built.
|
inline |
Promise that all bounding surfaces are inside/outside this bbox.
"inside" will shrink the exterior bbox, and "outside" will grow the interior bbox. All bounding surfaces within the region must be inside the exterior region and outside the interior region.
void celeritas::orangeinp::IntersectSurfaceBuilder::operator() | ( | Sense | sense, |
S const & | surf | ||
) |
Add a surface with a sense.
The resulting surface MUST result in a intersect region.
void celeritas::orangeinp::IntersectSurfaceBuilder::operator() | ( | Sense | sense, |
S const & | surf, | ||
std::string && | name | ||
) |
Add a surface with a sense.
The resulting surface MUST result in a intersect region.