CSGRegions creates an internal representation of a CSG region, which can refer to an intersection, union, complement, or half-space. More...
#include <CSGRegion.h>
Public Types | |
| enum | RegionType { RegionType::EMPTY = 0, RegionType::HALFSPACE = 1, RegionType::COMPLEMENT = 2, RegionType::INTERSECTION = 3, RegionType::UNION = 4 } |
| Enum for representing region types, defined to match _region_type MooseEnum. More... | |
Public Member Functions | |
| CSGRegion () | |
| Default Constructor. More... | |
| CSGRegion (const CSGSurface &surf, const CSGSurface::Halfspace halfspace) | |
| Constructor for half-space of a surface. More... | |
| CSGRegion (const CSGRegion ®ion_a, const CSGRegion ®ion_b, const std::string ®ion_type) | |
| Constructor for union and intersection. More... | |
| CSGRegion (const CSGRegion ®ion, const std::string ®ion_type) | |
| Constructor for complement or empty region (clear the region) More... | |
| virtual | ~CSGRegion ()=default |
| Destructor. More... | |
| const std::string & | toString () const |
| gets the string representation of the region More... | |
| RegionType | getRegionType () const |
| Get the region type. More... | |
| const std::string | getRegionTypeString () const |
| Get the region type as a string. More... | |
| const std::vector< std::reference_wrapper< const CSGSurface > > & | getSurfaces () const |
| Get the list of surfaces associated with the region. More... | |
| CSGRegion & | operator &= (const CSGRegion &other_region) |
| Operator overload for &= which creates an intersection between the current region and the other_region. More... | |
| CSGRegion & | operator|= (const CSGRegion &other_region) |
| Operator overload for |= which creates a union of the current region with the other_region. More... | |
| bool | operator== (const CSGRegion &other) const |
| Operator overload for checking if two CSGRegion objects are equal. More... | |
| bool | operator!= (const CSGRegion &other) const |
| Operator overload for checking if two CSGRegion objects are not equal. More... | |
Protected Attributes | |
| std::string | _region_str |
| String representation of region - defaults to empty string. More... | |
| MooseEnum | _region_type {"EMPTY=0 HALFSPACE=1 COMPLEMENT=2 INTERSECTION=3 UNION=4"} |
| An enum for type of type of operation that defines region. More... | |
| std::vector< std::reference_wrapper< const CSGSurface > > | _surfaces |
| Surface list associated with the region. More... | |
CSGRegions creates an internal representation of a CSG region, which can refer to an intersection, union, complement, or half-space.
Definition at line 21 of file CSGRegion.h.
|
strong |
Enum for representing region types, defined to match _region_type MooseEnum.
| Enumerator | |
|---|---|
| EMPTY | |
| HALFSPACE | |
| COMPLEMENT | |
| INTERSECTION | |
| UNION | |
Definition at line 25 of file CSGRegion.h.
| CSG::CSGRegion::CSGRegion | ( | ) |
Default Constructor.
Definition at line 15 of file CSGRegion.C.
Referenced by operator|=().
| CSG::CSGRegion::CSGRegion | ( | const CSGSurface & | surf, |
| const CSGSurface::Halfspace | halfspace | ||
| ) |
Constructor for half-space of a surface.
| surf | referance to surface used to define the half-space |
| halfspace | half-space to apply to surface (POSITIVE or NEGATIVE) |
Definition at line 22 of file CSGRegion.C.
| CSG::CSGRegion::CSGRegion | ( | const CSGRegion & | region_a, |
| const CSGRegion & | region_b, | ||
| const std::string & | region_type | ||
| ) |
Constructor for union and intersection.
| region_a | reference to first region to union or intersect |
| region_b | reference to second region to union or intersect |
| region_type | type of region operation (UNION or INTERSECTION) |
Definition at line 30 of file CSGRegion.C.
| CSG::CSGRegion::CSGRegion | ( | const CSGRegion & | region, |
| const std::string & | region_type | ||
| ) |
Constructor for complement or empty region (clear the region)
| region | reference to region to apply complement |
| region_type | type of region to apply (COMPLEMENT or EMPTY) |
Definition at line 54 of file CSGRegion.C.
|
virtualdefault |
Destructor.
|
inline |
Get the region type.
Definition at line 83 of file CSGRegion.h.
Referenced by CSGRegion(), and operator==().
|
inline |
Get the region type as a string.
Definition at line 90 of file CSGRegion.h.
Referenced by CSGRegion().
|
inline |
Get the list of surfaces associated with the region.
Definition at line 97 of file CSGRegion.h.
Referenced by CSG::CSGBase::checkRegionSurfaces(), CSGRegion(), and operator==().
Operator overload for &= which creates an intersection between the current region and the other_region.
| bool CSG::CSGRegion::operator!= | ( | const CSGRegion & | other | ) | const |
Operator overload for checking if two CSGRegion objects are not equal.
Definition at line 188 of file CSGRegion.C.
| bool CSG::CSGRegion::operator== | ( | const CSGRegion & | other | ) | const |
Operator overload for checking if two CSGRegion objects are equal.
Definition at line 164 of file CSGRegion.C.
Operator overload for |= which creates a union of the current region with the other_region.
Definition at line 83 of file CSGRegion.C.
|
inline |
gets the string representation of the region
Definition at line 76 of file CSGRegion.h.
Referenced by CSGRegion(), CSG::CSGCell::getRegionAsString(), and operator==().
|
protected |
String representation of region - defaults to empty string.
Definition at line 116 of file CSGRegion.h.
Referenced by CSGRegion(), and toString().
|
protected |
An enum for type of type of operation that defines region.
Definition at line 119 of file CSGRegion.h.
Referenced by CSGRegion(), getRegionType(), and getRegionTypeString().
|
protected |
Surface list associated with the region.
Definition at line 122 of file CSGRegion.h.
Referenced by CSGRegion(), and getSurfaces().
1.8.14