MAIA bb96820c
Multiphysics at AIA
Loading...
Searching...
No Matches
GeometryIntersection< nDim_ >::Csg Class Reference
Collaboration diagram for GeometryIntersection< nDim_ >::Csg:
[legend]

Public Member Functions

 Csg ()
 
 Csg (std::vector< CsgPolygon > _polygons)
 
 ~Csg ()=default
 
std::vector< CsgPolygontoPolygons ()
 
std::vector< CsgPolygonintersect (Csg csg)
 
void inverse ()
 

Public Attributes

std::vector< CsgPolygonpolygons
 

Detailed Description

template<MInt nDim_>
class GeometryIntersection< nDim_ >::Csg

Definition at line 871 of file geometryintersection.h.

Constructor & Destructor Documentation

◆ Csg() [1/2]

template<MInt nDim_>
GeometryIntersection< nDim_ >::Csg::Csg ( )
inline

Definition at line 875 of file geometryintersection.h.

875{ polygons.clear(); }
std::vector< CsgPolygon > polygons

◆ Csg() [2/2]

template<MInt nDim_>
GeometryIntersection< nDim_ >::Csg::Csg ( std::vector< CsgPolygon _polygons)
inlineexplicit

Definition at line 877 of file geometryintersection.h.

877 {
878 for(MInt i = 0; (unsigned)i < _polygons.size(); i++) {
879 polygons.push_back(_polygons[i].clone());
880 }
881 }
int32_t MInt
Definition: maiatypes.h:62

◆ ~Csg()

template<MInt nDim_>
GeometryIntersection< nDim_ >::Csg::~Csg ( )
default

Member Function Documentation

◆ intersect()

template<MInt nDim_>
std::vector< CsgPolygon > GeometryIntersection< nDim_ >::Csg::intersect ( Csg  csg)
inline

Definition at line 891 of file geometryintersection.h.

891 {
892 CsgNode a(this->polygons);
893 CsgNode b(csg.polygons);
894
895 b.invert();
896 b.clipTo(a);
897 b.invert();
898 a.clipTo(b);
899 b.clipTo(a);
900 a.build(b.allPolygons());
901
902 return a.allPolygons();
903 }
Definition: contexttypes.h:19

◆ inverse()

template<MInt nDim_>
void GeometryIntersection< nDim_ >::Csg::inverse ( )
inline

Definition at line 923 of file geometryintersection.h.

923 {
924 for(MInt i = 0; (unsigned)i < this->polygons.size(); i++)
925 this->polygons[i].flip();
926 }

◆ toPolygons()

template<MInt nDim_>
std::vector< CsgPolygon > GeometryIntersection< nDim_ >::Csg::toPolygons ( )
inline

Definition at line 885 of file geometryintersection.h.

885 {
886 std::vector<CsgPolygon> _polygons(this->polygons);
887 return _polygons;
888 }

Member Data Documentation

◆ polygons

template<MInt nDim_>
std::vector<CsgPolygon> GeometryIntersection< nDim_ >::Csg::polygons

Definition at line 873 of file geometryintersection.h.


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