Files Classes Functions Hierarchy
#include <d3clipping.h>
Public Member Functions | |
| d3clipping (d3tess &tess_, partitionspace< pt3, double > const &H_) | |
| Clip the tessellation against the line. | |
| void | eval () |
| Clip the tessellation against the partition. | |
Public Attributes | |
| vector< bool > | bv |
| Short for black value it is true if the associated point is black in color. | |
| double | zero |
| Client configures zero for isOnBoundary routine. | |
The partition is used to find the intersection between the mesh and itself. It then clips the mesh. So the partition is subtracted from the mesh.
The algorithm works by classifying points as either white or black. Points with all white points are discarded and points with all black points are accepted.
Triangles with white and black points are reclassified as a black point on the boundary is different from a black point not one the boundary. For example two white points and one black on the boundary is discarded as it is equivalent to three white points.
#include <point.h> #include <d3tess.h> #include <d3clipping.h> ... <TODO>
Definition at line 38 of file d3clipping.h.
| d3clipping::d3clipping | ( | d3tess & | tess_, | |
| partitionspace< pt3, double > const & | H_ | |||
| ) |
| void d3clipping::eval | ( | ) |
Clip the tessellation against the partition.
Definition at line 243 of file d3clipping.cpp.
References bv, and partitionspace< PT >::isInside().
00244 { 00245 uint ptsz = pt.size(); 00246 bv.resize(ptsz); 00247 // Ignore the first element as point 0 is defined as no point. 00248 bv[0]=true; 00249 // Because the partition H is subtracting from the mesh its 00250 // balls are white. So the H.isInside function has to be 00251 // inverted. If the point is on H's boundary there is a possibiliby 00252 // that it could be classified wrongly. In this case I believe 00253 // the algorithm is robust enough to handle it by re interpreting any 00254 // 2 black 1 white cases to 3 black again because such cases are 00255 // re processed anyway. 00256 for (uint i=1; i<ptsz; ++i) 00257 bv[i] = ! H.isInside( pt[i] ); 00258 00259 for (uint i=1; i<vi.size(); ++i ) 00260 processSimplex(i); 00261 }
| vector<bool> d3clipping::bv |
Short for black value it is true if the associated point is black in color.
Definition at line 85 of file d3clipping.h.
Referenced by eval().
| double d3clipping::zero |
Client configures zero for isOnBoundary routine.
eg zero = 1.0e-10
Definition at line 99 of file d3clipping.h.
Referenced by test01obj< P, PD >::test01obj().
1.5.8