19 bool operator()(plb::plint x, plb::plint y, plb::plint z)
const override {
20 return plb::contained(x, y, z,
box);
59 bool operator()(plb::plint x, plb::plint y, plb::plint z)
const override {
63 return (dx*dx)/(
rx*
rx) + (dy*dy)/(
ry*
ry) + (dz*dz)/(
rz*
rz) < 1;
81class Union :
public plb::DomainFunctional3D {
83 Union(std::initializer_list<std::reference_wrapper<plb::DomainFunctional3D>>
89 bool operator()(plb::plint x, plb::plint y, plb::plint z)
const override {
90 auto predicate = [x, y, z](
const plb::DomainFunctional3D &domain) {
91 return domain(x, y, z);
99 std::vector<std::reference_wrapper<plb::DomainFunctional3D>>
domains;
111 std::initializer_list<std::reference_wrapper<plb::DomainFunctional3D>>
domains)
115 bool operator()(plb::plint x, plb::plint y, plb::plint z)
const override {
123 auto predicate = [x, y, z](
const plb::DomainFunctional3D& domain) {
124 return domain(x, y, z);
126 return std::none_of(std::next(
domains.begin()),
domains.end(), predicate);
132 std::vector<std::reference_wrapper<plb::DomainFunctional3D>>
domains;
143 std::initializer_list<std::reference_wrapper<plb::DomainFunctional3D>>
148 bool operator()(plb::plint x, plb::plint y, plb::plint z)
const override {
154 auto predicate = [x, y, z](
const plb::DomainFunctional3D &domain) {
155 return domain(x, y, z);
163 std::vector<std::reference_wrapper<plb::DomainFunctional3D>>
domains;
A domain functional indicating true inside a rectangular box. The BoxDomain functional evaluates to t...
Definition geometry.h:14
plb::Box3D box
Definition geometry.h:28
const plb::Box3D & bounding_box() const
The relevant bounding box of the BoxDomain functional is known.
Definition geometry.h:24
BoxDomain(plb::Box3D box)
Definition geometry.h:16
BoxDomain * clone() const override
Definition geometry.h:26
bool operator()(plb::plint x, plb::plint y, plb::plint z) const override
Returns true inside the rectangular box (inclusive edges).
Definition geometry.h:19
Create the boolean difference of the first and subsequent domains. This creates the boolean differenc...
Definition geometry.h:108
Difference * clone() const override
Definition geometry.h:129
bool operator()(plb::plint x, plb::plint y, plb::plint z) const override
Return true if the first domain is true and none of the others.
Definition geometry.h:115
std::vector< std::reference_wrapper< plb::DomainFunctional3D > > domains
Definition geometry.h:132
Difference(std::initializer_list< std::reference_wrapper< plb::DomainFunctional3D > > domains)
Definition geometry.h:110
An ellipsoidal domain functional returning true inside the ellipsoid. The EllipseDomain represents an...
Definition geometry.h:36
EllipseDomain(double x, double y, double rx, double ry)
Definition geometry.h:42
double rz
Definition geometry.h:74
bool operator()(plb::plint x, plb::plint y, plb::plint z) const override
Definition geometry.h:59
double cz
Definition geometry.h:71
double ry
Definition geometry.h:73
double cx
Definition geometry.h:69
double cy
Definition geometry.h:70
EllipseDomain(double cx, double cy, double cz, double rx, double ry, double rz)
Default constructor specifying the x, y, z coordinates and radii.
Definition geometry.h:47
EllipseDomain * clone() const override
Definition geometry.h:66
double rx
Definition geometry.h:72
The boolean intersection of a number of domain functionals. This creates the boolean intersection bet...
Definition geometry.h:140
Intersection * clone() const override
Definition geometry.h:160
bool operator()(plb::plint x, plb::plint y, plb::plint z) const override
Returns true only if all domains are true.
Definition geometry.h:148
std::vector< std::reference_wrapper< plb::DomainFunctional3D > > domains
Definition geometry.h:163
Intersection(std::initializer_list< std::reference_wrapper< plb::DomainFunctional3D > > domains)
Definition geometry.h:142
The union of multiple domain functionals. This domain functional builds the union of any number of do...
Definition geometry.h:81
bool operator()(plb::plint x, plb::plint y, plb::plint z) const override
Return true if any of the included domains is true.
Definition geometry.h:89
std::vector< std::reference_wrapper< plb::DomainFunctional3D > > domains
Definition geometry.h:99
Union(std::initializer_list< std::reference_wrapper< plb::DomainFunctional3D > > domains)
Definition geometry.h:83
Union * clone() const override
Definition geometry.h:96