HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GU_PolyDelaunay.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: GU_PolyDelaunay.h
7  *
8  */
9 
10 #ifndef __GU_PolyDelaunay_h__
11 #define __GU_PolyDelaunay_h__
12 
13 #include "GU_API.h"
14 #include <UT/UT_FastRandom.h>
16 #include <UT/UT_Map.h>
17 #include <UT/UT_StringStream.h>
18 
19 #include <GEO/GEO_HedgeInterface.h>
20 
21 #define DELAUNAY_TINY_AREA_TOLERANCE (std::numeric_limits<fpreal>::min())
22 
23 class GU_Detail;
24 class GA_EdgeGroup;
25 class GA_PrimitiveGroup;
26 class GA_PointGroup;
27 
28 
29 /// Delaunay triangulation (and refinement) of a set of 2D points.
30 ///
31 /// The Delaunay triangulation algorithm used is the randomized incremental
32 /// algorithm, as presented in
33 /// de Berg, van Kreveld, Overmars and Schwarzkopf.
34 /// "Computational Geometry", 2nd edition, 1999,
35 /// in turn adapated from:
36 /// Guibas, Knuth and Sharir. "Randomized incremental construction of
37 /// Delaunay and Voronoi diagrams." Algorithmica, 7:381-413, 1992.
38 ///
39 /// Most ideas are present in the earlier paper:
40 /// Guibas and Stolfi. "Primitives for the Manipulation of General
41 /// Subdivisions and the Computation of Voronoi Diagrams", ACM Transactions
42 /// on Graphics, 4(2):74-123, April 1985.
43 /// except for the point location DAG.
44 ///
45 /// Constraint enforcement is done through removal of edges that intersect
46 /// constraints and retriangulating the resulting poligons. The code closely
47 /// follows the appraoch of Shewchuk in his Triangle package.
48 ///
49 /// After triangulation is complete, an optional Delaunay refinement
50 /// process is applied. This follows
51 /// Shewchuk. "Delaunay Refinement Algorithms for Triangular Mesh
52 /// Generation". Computational Geometry: Theory and Applications
53 /// 22(1-3):21-74, May 2002.
54 /// http://www.cs.berkeley.edu/~jrs/papers/2dj.ps
55 ///
56 /// A good resource for quick lookup is Shewchuk's presentation slides on
57 /// this subject:
58 /// http://www.cs.berkeley.edu/~jrs/papers/imrtalk.pdf
59 ///
60 
62 {
63 public:
64 
65  /// Some local typedefs for our helper classes to avoid having to fully
66  /// qualify the names everywhere.
67 
68  explicit GU_PolyDelaunay(GU_Detail *gdp,
69  uint32 rand_seed = 5678U);
70 
71  virtual ~GU_PolyDelaunay();
72 
73  /// Set the plane where triangulation happens.
74  void setPlane(const UT_Vector3 &normal, fpreal distance);
75 
76  /// Fit a plane to the input points. Returns true if it succeeded.
77  bool fitPlane(const GA_PointGroup *ptgrp = 0,
78  UT_Vector3 *out_normal = 0,
79  fpreal *out_distance = 0,
80  UT_Vector3 *out_center = 0);
81 
83  { myRemoveDuplicatePoints = value; }
84 
85  /// This one is mostly here for debugging - if enabled, we don't
86  /// delete the bounding triangle that's added during construction.
88  { myKeepBoundingTriangle = value; }
89 
91  {
92  REMOVE_NONE = 0,
94  REMOVE_IF_OUT_BUT_NOT_IN
95  };
96 
98  { myRemoveFromConvexHull = value; }
99 
100  /// If enabled, delete all edges that are outside the constrained
101  /// edges.
102  void setRemoveOutside(bool value,
103  bool skip_if_also_inside = false);
104 
105 
106  /// Allow new points - e.g., constraint edges are split to maintain
107  /// the Delaunay property.
109  { myCanSplitConstraints = enabled; }
110 
111  // if the new point group is set by setConstraintNewPointGroup, then
112  // setting the group name is ignored
114  { myConstraintNewPointGroupName.harden(name); }
115 
117  { myConstraintNewPointGroup = new_pt_grp; }
118 
119  /// Allow refinement.
121  { myDoRefinement = enabled; }
122 
123  /// Cap the maximum allowed number of new ponts
124  void setMaxNewPoints(int maxNewPoints)
125  { myMaxNewPoints = maxNewPoints; }
126 
127  /// Whether to keep the triangulation on the projection plane or
128  /// backproject it back to the original point positions
130  { myRestorePositions = val; }
131 
132  /// Set refinement maximum area criterion. Any triangle with larger area
133  /// than this is subdivided. To disable, set to <= 0.0.
134  void setMaxArea(fpreal max_area);
135 
136  /// Set refinement minmum angle. Any triangle with an angle less than
137  /// this is subdivided (modulo satisfying Miller-Pav-Walkington rule)
138  /// The argument angle is in radians. To disable this test, set to <= 0.0.
139  ///
140  /// IMPORTANT: Large minimum angle values drive the refinement to infinity,
141  /// or until the maximum allowed number of points is reached. If minimum
142  /// required angle is <= 21 degrees, the algorithm provably terminates.
143  /// In practice, the algorithm almost always terminates for minimum
144  /// angles of up to about 33 degrees. Beyond that, the algorithm almost
145  /// surely goes on for ever or until it hits the set limit.
146  void setMinAngle(fpreal min_angle);
147  void setMinEdgeLength(fpreal min_edge_length);
148 
149  /// Perform the triangulation
150  void triangulate(const GA_PointGroup *point_group,
151  const GA_PrimitiveGroup *constraint_prims,
152  const GA_EdgeGroup *constraint_edges);
153 
154  void copyTriangles(bool updatePointNormals = true,
155  GA_PrimitiveGroup *out_grp = NULL);
156 
158  { return myWarningMessage.str().toStdString(); }
159 
160  void getBoundingSquareCorners(UT_Vector3 *corners);
161  bool setPositionAttribute(const char *attrib);
162 
163  void getProjectedConstrainedEdges(
164  UT_Array<UT_Vector3> &endpoints);
165 
166  void getEnforcedEdges(GA_EdgeGroup &edge_group);
167 
168  /// Query whether or not the triangulation consolidated some duplicate
169  /// points.
171  { return myDuplicateMap.size() != 0; }
172 
173  /// Query how the triangulation consolidated duplicate points.
174  void getDuplicatePointMapForInput(
175  UT_Map<GA_Offset, GA_Offset> &map) const;
176 
177 private:
178 
179  typedef UT_Array<GEO_Hedge> GEO_HedgeArray;
180 
181  bool verifyMarks();
182 
183  template <class T>
184  struct MultiQueue
185  {
186  MultiQueue(int num_queues = 1, int rand_seed = -1, int init_size = -1);
187  void append(const T &t, int queue_idx = 0);
188  T pick();
189  int entries() { return myEntries; }
190  public:
191  typedef UT_Array<T> SingleQueue;
192 
193  int myPickQueueIdx;
194  int myEntries;
195  bool myShuffle;
196  UT_Array<SingleQueue> myQueues;
197  UT_FastRandom myRand;
198  };
199 
200  struct PinnedEdge
201  {
202  PinnedEdge(GEO_Hedge e, GA_Offset src, GA_Offset dst) :
203  myHedge(e), mySrc(src), myDst(dst) {}
204  GEO_Hedge myHedge;
205  GA_Offset mySrc;
206  GA_Offset myDst;
207  };
208 
209  PinnedEdge pinEdge(GEO_Hedge e);
210  bool isPresent(PinnedEdge &se);
211 
212  struct PinnedFace
213  {
214  PinnedFace(GA_Offset face, GA_Offset p0, GA_Offset p1, GA_Offset p2) :
215  myFace(face), myP0(p0), myP1(p1), myP2(p2) {}
216 
217  GA_Offset myFace;
218  GA_Offset myP0;
219  GA_Offset myP1;
220  GA_Offset myP2;
221 
222  bool operator==(const PinnedFace &other)
223  {
224  return myFace == other.myFace &&
225  ((myP0 == other.myP0 && myP1 == other.myP1 &&
226  myP2 == other.myP2) ||
227  (myP0 == other.myP1 && myP1 == other.myP2 &&
228  myP2 == other.myP0) ||
229  (myP0 == other.myP2 && myP1 == other.myP0 &&
230  myP2 == other.myP1));
231  }
232  };
233 
234  PinnedFace pinFace(GA_Offset face);
235  bool isPresent(PinnedFace &sf);
236 
237  typedef MultiQueue<PinnedEdge> EdgeQueue;
238  typedef MultiQueue<PinnedFace> FaceQueue;
239 
240  // Container class used for the set of constrained edges
241  // Each element is a pair of point offsets (possibly with an optional
242  // primitive (used for removing holes) if it is a boundary edge
243  struct Constraint
244  {
245  Constraint(const GA_Edge &e, bool h) { edge = e; is_boundary = h; }
246 
247  GA_Edge edge;
248  bool is_boundary;
249  };
250 
251  struct LocatorNode
252  {
253  enum
254  {
255  NSUCCESSORS = 3
256  };
257  // associated mesh face; 0 for sinks and deleted faces.
258  GA_Offset myFaceOffset;
259  GA_Offset myPointOffset[3]; // 3 points of the covered triangle
260  int myRefCount; // number of nodes pointing to this
261  int mySuccessors[NSUCCESSORS]; // non-NULLs at the start
262  int myParent; // one of immediate ancestors
263  };
264 
265 
266  // Methods to manipulate the Point Location DAG:
267  int newLocatorNode();
268  void freeLocatorNode(int idx);
269  void attachLocatorNodeToFace(int idx, GA_Offset faceoff);
270  void detachLocatorNodeFromFace(int idx);
271  void setLocatorNodeSuccessors(int idx, int s1, int s2,
272  int s3);
273 
274  void splitLocatorNode(int idx, GA_Offset f0, GA_Offset f1,
276 
277  UT_Vector3 signedDistance(const UT_Vector2 &pos, int node_idx);
278 
279  inline UT_Vector2 barycentricCoordinates(const UT_Vector2 &x,
280  UT_Vector2 &a, UT_Vector2 &b);
281 
282  inline UT_Vector3 barycentricCoordinates(const UT_Vector2 &x,
283  GA_Offset faceoff, GA_Offset &aoff,
284  GA_Offset &boff, GA_Offset &coff);
285 
286  GA_Offset resolveDuplicate(GA_Offset ptoff);
287  GA_Edge resolveDuplicate(GA_Edge edge);
288  void mapDuplicate(GA_Offset frompt, GA_Offset topt);
289 
290  /// Project 3D point onto plane.
291  UT_Vector2 make2D(const UT_Vector3 &pos) const;
292  UT_Vector3 make3D(const UT_Vector2 &pos) const;
293 
294  inline GA_Offset getConcentricShellCenter(GA_Offset p);
295  inline void setConcentricShellCenter(GA_Offset p, GA_Offset c);
296 
297  inline int getLocatorNodeIndex(GA_Offset faceoff);
298 
299  /// Find a leaf node with a triangle that encloses the given point.
300  /// Returns the node, and if the point falls on an edge or a vertex of the
301  /// triangle, returns those as well.
302 
303  GA_Offset locateUsingLocatorDAG(const UT_Vector2 &pos,
304  GEO_Hedge &on_edge, GA_Offset &on_point);
305 
306  int locateInSuccessors(int dnode_idx,
307  const UT_Vector2 &pos, UT_Vector3 &sd);
308 
309  GA_Offset locateByWalking(const UT_Vector2 &searchpoint,
310  GA_Offset searchface, GEO_Hedge &on_edge,
311  GA_Offset &on_point);
312 
313 
314  inline fpreal counterclockwise(const UT_Vector2 &a,
315  const UT_Vector2 &b, const UT_Vector2 &c)
316  { return UT_GeometryPredicate::orient2d(b, a, c); }
317 
318  inline fpreal counterclockwise( GA_Offset pa, GA_Offset pb,
319  GA_Offset pc);
320 
321  inline fpreal incircle(GA_Offset pa, GA_Offset pb, GA_Offset pc,
322  GA_Offset pd);
323 
324  fpreal exactDot(const UT_Vector2 &u, const UT_Vector2 &v);
325 
326  UT_Vector2 circumcenter(GA_Offset pa, GA_Offset pb, GA_Offset pc);
327 
328 
329  GA_Offset appendPoint();
330  void deletePoint(GA_Offset pt,
331  bool from_input_only = false);
332 
333  void removeFace(GA_Offset faceoff);
334 
335  // Subdivide an edge by inserting a new point along it and dividing
336  // the triangles on its two sides. The effect on input edge and the
337  // the returned edge are as in divideEdge(). If a valid ptoff is
338  // supplied the new point will have that offset and the corresponding
339  // index in myPointList. The faces to the left and right of e before
340  // splitting stay those the left and right of it afterwards.
341  GEO_Hedge splitEdge(GEO_Hedge e, fpreal bias,
342  GA_Offset ptoff = GA_INVALID_OFFSET);
343 
344  void collapseEdge(GEO_Hedge e);
345  GEO_Hedge findEdge(GA_Offset p0, GA_Offset p1);
346 
347  /// A journal of events during a point insertion. It is used to allow
348  /// the point insertion to be undone.
349  struct Journal
350  {
351  Journal() : myOldFace(GA_INVALID_OFFSET),
352  myOldEdge(GEO_INVALID_HEDGE), myNewEdge(GEO_INVALID_HEDGE),
353  myNewPoint(GA_INVALID_OFFSET), myRecording(false) {}
354 
355  void reset()
356  {
357  myOldFace = GA_INVALID_OFFSET;
358  myOldEdge = GEO_INVALID_HEDGE;
359  myNewEdge = GEO_INVALID_HEDGE;
360  myNewPoint = GA_INVALID_OFFSET;
361  myFlippedEdges.entries(0);
362  }
363 
364  void startRecording() { myRecording = true; }
365  void stopRecording() { myRecording = false; }
366  bool isRecording() { return myRecording; }
367 
368  GEO_HedgeArray myFlippedEdges;
369  GA_Offset myOldFace;
370  GEO_Hedge myOldEdge;
371  GEO_Hedge myNewEdge;
372  GA_Offset myNewPoint;
373  bool myRecording;
374  };
375 
376  bool maxNewPointsReached();
377 
378  GA_Offset inputDetailPoint(GA_Offset ptoff) const;
379  GA_Offset workDetailPoint(GA_Offset ptoff) const;
380 
381  GA_Offset importInputDetailPoint(GA_Offset inptoff);
382  GA_Offset exportWorkDetailPoint(GA_Offset ptoff);
383 
384  void importInputPoints(const GA_PointGroup *pts);
385  void importInputConstraints(const GA_PrimitiveGroup *prims,
386  const GA_EdgeGroup *constraint_edges);
387 
388  void insertInputPoints(const GA_PointGroup *point_group,
389  GA_PointGroup *duplicate_grp);
390 
391  void cleanUp(GA_PointGroup *duplicate_grp,
392  const GA_PrimitiveGroup *constraint_prims);
393 
394  /// Set up the bounding triangle, myGqd, and the locating DAG.
395  void setup();
396  void retireLocatorDAG();
397 
398  /// Set up my*Transform member variables from the plane
399  /// normal/distance.
400  void calcTransforms(const UT_Vector3 &normal,
401  fpreal distance);
402 
403  enum InsertStatus
404  {
405  INSERTED_IN_FACE, INSERTED_ON_EDGE, DUPLICATE, OUTSIDE
406  };
407 
408  GEO_Hedge insertOnEdge(GA_Offset pt, GEO_Hedge e);
409  void insertInFace(GA_Offset pt, GA_Offset f);
410 
411  /// Insert a new point into the existing triangulation.
412  InsertStatus insertPoint(GA_Offset ptoff,
413  GEO_Hedge on_edge = GEO_INVALID_HEDGE,
414  bool delaunize = true,
415  GEO_Hedge *out_edge = NULL,
416  GA_Offset walk_from_face = GA_INVALID_OFFSET);
417 
418  /// Undo an insertion.
419  void undoInsertPoint();
420 
421  /// Flip a single edge. Does not update the point location data structure.
422  void flipEdge(GEO_Hedge edge);
423  void unflipEdge(GEO_Hedge edge);
424 
425  void delaunizePointLink(GA_Offset pt);
426 
427  /// Part of the core triangulation algorithm. Parameter point has just
428  /// been inserted, and edge is being tested to see if it's legal
429  /// according to the Delaunay criterion; if not, the edge is flipped
430  /// and we recurse.
431  void delaunizeEdge(GA_Offset point, GEO_Hedge edge);
432 
433  enum ConstraintStatus
434  {
435  ENFORCED, PENDING, BLOCKED
436  };
437 
438  void intersectConstraints(GEO_Hedge &esplit, GA_Offset p1);
439  int turnToFace(GEO_Hedge &esearch, GA_Offset p);
440  ConstraintStatus trackConstraint(GEO_Hedge &esearch, GA_Offset p1,
441  bool is_boundary);
442 
443  void delaunayFixup(GEO_Hedge efixup, bool leftside);
444  ConstraintStatus enforceConstraint(GEO_Hedge estart, GA_Offset p1,
445  bool is_boundary);
446 
447  void enforceInputConstraints();
448 
449  /// Remove the bounding triangle
450  void removeBoundingTriangle();
451  /// Remove outside edges that aren't in the given group.
452  void removeOutside();
453  /// Remove edges that are inside holes.
454  void removeHoles();
455 
456  void propagateGroup(GA_PrimitiveGroup *grp, GA_Offset face);
457  void propagateRemoved(GA_Offset face, bool is_seed = false);
458 
459  /// Insert new points to satisfy refinement criteria.
460  void refine();
461 
462  /// Test if a given face is "bad" - i.e., excessive area, or too small
463  /// an angle and add it to the bad triangles pile if so.
464  void testTriangle(GA_Offset face);
465 
466  // Test if a given edge is encroached and add it to the encroached edges
467  // pile if so.
468  void testEdge(GEO_Hedge edge, bool on_left_only = false);
469 
470  /// Test if the given edge is "encroached" - i.e., if a triangles on
471  /// some side has an obtuse angle opposite to the edge.
472  bool isEncroached(GEO_Hedge edge,
473  bool on_left_only = false);
474 
475  /// Insert a point to split an non/existing edge at the given fraction
476  /// along its length. Returns the edge along the old edge with origin
477  /// equal to its midpoint.
478  GEO_Hedge insertSplitPoint(GEO_Hedge on_edge, fpreal bias,
479  bool delaunize = true);
480 
481  /// Split an existing edge at somewhere-near-the-midpoint.
482  GEO_Hedge concentricShellSplit(GEO_Hedge edge);
483 
484  void splitEncroachedEdges(bool check_for_bad_faces);
485  void testLinkEdges(GA_Offset pt);
486  void testIncidentTriangles(GA_Offset pt);
487 
488  void markEnforced(GEO_Hedge edge, bool enforced = true);
489  bool isEnforced(GEO_Hedge edge);
490  void markBoundary(GEO_Hedge edge, bool boundary = true);
491  bool isBoundary(const GEO_Hedge edge);
492 
493  bool isBoundingTrianglePoint(GA_Offset ptoff);
494  bool isBoundingTriangleHedge(GEO_Hedge edge);
495 
496  void remove(GA_Offset primoff);
497  bool isRemoved(GA_Offset primoff);
498 
499  void markInputPoint(GA_Offset ptoff);
500  bool isInputPoint(GA_Offset ptoff);
501  void markFirstSplit(GA_Offset ptoff);
502  bool isFirstSplit(GA_Offset ptoff);
503 
504  // Some notation simplification
505 
506  inline GA_Offset src(GEO_Hedge e) const
507  { return myHi->srcPoint(e); }
508 
509  inline GA_Offset dst(GEO_Hedge e) const
510  { return myHi->dstPoint(e); }
511 
512  inline GA_Offset apx(GEO_Hedge e) const
513  { return myHi->preSrcPoint(e); }
514 
515  inline GEO_Hedge sym(GEO_Hedge e) const
516  { return myHi->nextEquivalentHedge(e); }
517 
518  inline GEO_Hedge lnext(GEO_Hedge e) const
519  { return myHi->lnext(e); }
520 
521  inline GEO_Hedge onext(GEO_Hedge e) const
522  { return myHi->onext(e); }
523 
524  inline GEO_Hedge lprev(GEO_Hedge e) const
525  { return myHi->lprev(e); }
526 
527  inline GEO_Hedge oprev(GEO_Hedge e) const
528  { return myHi->oprev(e); }
529 
530  inline UT_Vector2 getPos2(GA_Offset ptoff) const
531  { return myPos2.get(ptoff); }
532 
533  inline bool isValid(GEO_Hedge e) const
534  { return myHi->isValidHedge(e); }
535 
536  inline bool isPrimary(GEO_Hedge e) const
537  { return myHi->isPrimary(e); }
538 
540  GA_Offset right(GEO_Hedge e);
541  GEO_Hedge hedge(GA_Offset faceoff);
542 
543 
544  typedef UT_Array<Constraint> ConstraintArray;
545  typedef UT_Map<GA_Offset, GA_Offset> OffsetMap;
546 
547  // Locator DAG
548  typedef UT_Array<LocatorNode> LocatorNodeArray;
549 
550  LocatorNodeArray myLocatorNodes;
551  UT_IntArray myLocatorNodesFreeIndices;
552  int myLocatorRootIndex;
553 
554  // Transform matrices between 2d and 3d
555  UT_Matrix4 my3to2Transform;
556  UT_Matrix4 my2to3Transform;
557 
558  // Flags
559  bool myHasClosedConstraints: 1;
560  bool myHasConflictingConstraints: 1;
561  bool myCanSplitConstraints: 1;
562  bool myRestorePositions: 1;
563  bool myDoRefinement: 1;
564  bool myRemoveDuplicatePoints: 1;
565  bool myKeepBoundingTriangle: 1;
566  bool myMapDuplicates: 1;
567  bool myWrangleAttributes: 1;
568 
569 
570  bool myRemoveFromConvexHull;
571  RemoveOutsidePolicy myRemoveOutsidePolicy;
572 
573  int myMaxNewPoints;
574  int myNumNewPoints;
575  fpreal myMinEdgeLengthSqr;
576  fpreal myMaxArea, myMaxAngleCosSqr;
577 
578 
579  UT_String myConstraintNewPointGroupName;
580 
581  GU_Detail *mySrcGdp;
582  GU_Detail *myGdp;
583  GEO_HedgeInterface *myHi;
584  GA_PointWrangler *myWrangler;
585 
586  bool myUsePos2Attrib;
587  UT_String myPos2AttribName;
588  GA_RWHandleV2 myPos2;
589 
590  ConstraintArray myInputConstraints;
591  OffsetMap myDuplicateMap;
592 
593  // Points and hedges of the bounding triangle
594  GA_Offset myBoundingTrianglePoints[3];
595  GEO_Hedge myBoundingTriangleHedges[3];
596 
597  // 3d positions of the bounding square (to help draw guide)
598  UT_Vector3 myBoundingSquareCorners[4];
599 
600  // Point group accumulating constraint split points
601  GA_PointGroup *myConstraintNewPointGroup;
602 
603  // Journal for tracking changes during the last insertion to allow undo
604  Journal myJournal;
605 
606  EdgeQueue myEncroachedEdges;
607  FaceQueue myBadTriangles;
608 
609  int myRandSeed;
610 
611  UT_StringStream myWarningMessage;
612 
613  fpreal myTollerance;
614 
615  GA_VertexGroup *myEnforcedHedges;
616  GA_VertexGroup *myBoundaryHedges;
617 
618  GA_PrimitiveGroup *myRemovedFaces;
619 
620  GA_PointGroup *myInputPoints;
621  GA_PointGroup *myFirstSplitPoints;
622 
623  GA_RWHandleI myShellCenter;
624  GA_RWHandleI myLocatorIndex;
625  GA_RWHandleI myInputDetailPoint;
626  GA_RWHandleI myWorkDetailPoint;
627 };
628 
629 #endif
png_voidp s1
Definition: png.h:2193
GLint left
Definition: glcorearb.h:2004
void setKeepBoundingTriangle(bool value)
const GLdouble * v
Definition: glcorearb.h:836
GLsizei const GLchar *const * string
Definition: glcorearb.h:813
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1221
void setRestorePositions(bool val)
GLenum GLenum GLsizei const GLuint GLboolean enabled
Definition: glcorearb.h:2538
#define GEO_INVALID_HEDGE
An invalid hedge is sometimes returned if an operation is unsuccessful.
Definition: GEO_Hedge.h:32
#define GA_INVALID_OFFSET
Definition: GA_Types.h:654
void setRemoveFromConvexHull(bool value)
GA_Size GA_Offset
Definition: GA_Types.h:617
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
GLfloat f
Definition: glcorearb.h:1925
T distance(const UT_Vector4T< T > &v1, const UT_Vector4T< T > &v2)
Definition: UT_Vector4.h:698
GEO_Hedge encapsulates a half-edge (hedge) which is the restriction of.
Definition: GEO_Hedge.h:47
void enableRefinement(bool enabled)
Allow refinement.
An bi-directional stream object that owns its own string buffer storage.
void setRemoveDuplicatePoints(bool value)
bool hasNonEmptyDuplicatePointMap() const
#define GU_API
Definition: GU_API.h:12
GLuint const GLchar * name
Definition: glcorearb.h:785
GLboolean GLboolean GLboolean b
Definition: glcorearb.h:1221
void setMaxNewPoints(int maxNewPoints)
Cap the maximum allowed number of new ponts.
GLfloat GLfloat GLfloat GLfloat h
Definition: glcorearb.h:2001
GLenum GLenum dst
Definition: glcorearb.h:1792
GLsizei const GLfloat * value
Definition: glcorearb.h:823
double fpreal
Definition: SYS_Types.h:270
png_voidp png_voidp s2
Definition: png.h:2193
png_infop png_sPLT_tpp entries
Definition: png.h:2481
SYS_FORCE_INLINE REAL incircle(const REAL pa[2], const REAL pb[2], const REAL pc[2], const REAL pd[2])
GLint GLenum GLint x
Definition: glcorearb.h:408
GLuint GLfloat * val
Definition: glcorearb.h:1607
void allowConstraintSplit(bool enabled)
void setConstraintSplitPointGroupName(const UT_String &name)
void setConstraintSplitPointGroup(GA_PointGroup *new_pt_grp)
SYS_FORCE_INLINE REAL orient2d(const REAL pa[2], const REAL pb[2], const REAL pc[2])
const std::string getWarningMessage()
GLenum src
Definition: glcorearb.h:1792
unsigned int uint32
Definition: SYS_Types.h:36