MCPcopy Create free account
hub / github.com/Kitware/VTK / vtkSetClampMacro

Function vtkSetClampMacro

Common/DataModel/vtkPolygon.h:264–334  ·  view source on GitHub ↗

@{ * Specify an internal tolerance for operations requiring polygon * triangulation. (For example, clipping and contouring operations proceed * by first triangulating the polygon, and then clipping/contouring the * resulting triangles.) This is a normalized tolerance value multiplied * by the diagonal length of the polygon bounding box. Is it used to * determine whether potential

Source from the content-addressed store, hash-verified

262 * determine whether potential triangulation edges intersect one another.
263 */
264 vtkSetClampMacro(Tolerance, double, 0.0, 1.0);
265 vtkGetMacro(Tolerance, double);
266 ///@}
267
268protected:
269 vtkPolygon();
270 ~vtkPolygon() override;
271
272 // Compute the interpolation functions using Mean Value Coordinate.
273 void InterpolateFunctionsUsingMVC(const double x[3], double* weights);
274
275 // variables used by instances of this class
276 double Tolerance; // Intersection tolerance set by public API
277 double Tol; // Internal tolerance set by ComputeBounds()
278 void ComputeTolerance(); // Compute the internal tolerance Tol
279
280 int SuccessfulTriangulation; // Stops recursive triangulation if necessary
281 vtkIdList* Tris; // Output triangulation placed here
282
283 // These are used for internal computation.
284 vtkTriangle* Triangle;
285 vtkQuad* Quad;
286 vtkDoubleArray* TriScalars;
287 vtkLine* Line;
288
289 // Parameter indicating whether to use Mean Value Coordinate algorithm
290 // for interpolation. The parameter is false by default.
291 bool UseMVCInterpolation;
292
293 // Helper methods for triangulation------------------------------
294 // Made public for external access
295public:
296 // Ear cut triangulation options. The order in which vertices are
297 // removed are controlled by different measures. Changing this can
298 // make subtle differences in some cases. Historically the
299 // PERIMETER2_TO_AREA_RATIO has been used.
300 enum EarCutMeasureTypes
301 {
302 PERIMETER2_TO_AREA_RATIO = 0,
303 DOT_PRODUCT = 1,
304 BEST_QUALITY = 2
305 };
306
307 ///@{
308 /**
309 * A fast triangulation method. Uses recursive divide and
310 * conquer based on plane splitting to reduce loop into triangles.
311 * The cell (e.g., triangle) is presumed properly initialized (i.e.,
312 * Points and PointIds). Ears can be removed using different measures
313 * (the measures indicate convexity plus characterize the local
314 * geometry around each vertex).
315 */
316 int EarCutTriangulation(int measure = PERIMETER2_TO_AREA_RATIO);
317 int EarCutTriangulation(vtkIdList* outTris, int measure = PERIMETER2_TO_AREA_RATIO);
318 ///@}
319
320 ///@{
321 /**

Calls

no outgoing calls

Tested by

no test coverage detected