HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GD_TrimBezClip.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: Geometry Library (C++)
7  *
8  * COMMENTS:
9  * This handles bezier clipping of trim pieces, allowing fast
10  * point in tests.
11  *
12  */
13 
14 #ifndef __GD_TrimBezClip_h_
15 #define __GD_TrimBezClip_h_
16 
17 #include "GD_API.h"
18 #include <UT/UT_VectorTypes.h>
19 #include <GA/GA_Defines.h>
21 
23 {
30 };
31 
32 
34 {
35 public:
36  // Initialize for point in tests:
38  ~GD_TrimBezClip();
39 
40  int getIsectParity(const GD_TrimPieceRBezCurve &curve,
41  const UT_Vector2 &pt, float tol = 1E-4F);
42 
43 private:
44  // Intializes CV for order.
45  GD_TrimBezClip(int order);
46 
47  // If left or right NULL, does not evaluate it.
48  // ucut e [0,1]
49  int splitAt(GD_TrimBezClip *left,
51  float ucut,
52  UT_Vector2 bloss[][GA_MAXORDER])
53  const;
54 
55  // Returns maximum size of CV convex hull:
56  float sizeMax();
57 
58  // Find min/max x/y isections:
59  void findXCVIsections(float &umin, float &umax);
60  void findYCVIsections(float &umin, float &umax);
61 
62  GD_TrimBezClipType classify(float tol);
63 
64  // Private stack of clips
65  GD_TrimBezClip *myNext;
66 
67  GD_TrimBezClipType myType;
68  UT_Vector2 *myCV;
69  int myDeg;
70  unsigned int myCVsize;
71 
72  // Blossom array:
73  UT_Vector2 *myBloss;
74 };
75 
76 #endif
GD_TrimBezClipType
GLint left
Definition: glcorearb.h:2005
GLdouble right
Definition: glad.h:2817
#define GA_MAXORDER
Definition: GA_Defines.h:17
GLdouble GLdouble GLint GLint order
Definition: glad.h:2676
#define GD_API
Definition: GD_API.h:10