HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GQ_PolyBevel.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: GQ_PolyBevel.h ( GQ Library, C++)
7  *
8  * COMMENTS:
9  */
10 
11 #ifndef __GQ_PolyBevel_h__
12 #define __GQ_PolyBevel_h__
13 
14 #include "GQ_API.h"
15 #include "GQ_Detail.h"
17 #include <GA/GA_AttributeRefMap.h>
18 
20 {
21 public:
29 };
30 
32 
34 {
35 public:
36  GQ_PolyBevel(GU_Detail *gdp, GA_VertexPool &pool, int relative,
37  float inset, int type, int repetitions);
38  ~GQ_PolyBevel();
39 
40  GA_PrimitiveGroup *pointBevel(GA_PointGroup *pointgroup);
41  GA_PrimitiveGroup *edgeBevel(GA_EdgeGroup *edgegroup);
42 
43 protected:
44  void smoothBevel();
45 
46  // in GQ_BevelPoints.C:
47  void bevelPoints();
48  void cornerBevelPoints();
49 
50  // in GQ_BevelEdges.C:
51  void bevelEdges();
52 
53  // in GQ_SmoothBevel.C:
54  void smoothBevelEdges();
55  void smoothBevelPoints();
56 
57 
58 private:
59  class GQ_API gq_BevelPointNode
60  {
61  public:
62  GEO_PrimPoly *myPoly;
63  GEO_Vertex *myVertex;
64  };
65 
66  // in GQ_BevelPoints.C:
67  void findBevelPoint(GA_Offset, float, GQ_Edge *,
68  GA_Offset &, bool &);
69  void addCornerPoints(GA_Offset, GA_Offset,
71  <GA_Offset> &, GEO_PrimPoly *);
72 
73  // in GQ_BevelEdges.C:
74  void selectBevelPoints(GA_PointGroup *&);
75  void findEdgePoint(GA_Offset, GQ_Edge *,
77  GA_Offset&, GA_Offset, bool &);
78  void findBeforePoint(GA_Offset, GQ_Edge *,
80  GA_Offset &);
81  void findAfterPoint(GA_Offset, GQ_Edge *,
83  GA_Offset &, GA_Offset);
84  void startBevelFace(GQ_Edge *, UT_Array<GQ_Face *>&,
86  void finishBevelFace(GQ_Edge *, UT_Array<GQ_Face *>&,
88  GEO_PrimPoly *createMidPoly(GA_Index, const UT_Array<GA_Offset> &);
89 
90  // in GQ_Smoothbevel.C:
91  void addPerimeter(GQ_Face *,
93  const GEO_Vertex &);
94  void addMajorDivisions(GQ_Face *,
95  const UT_Array<GA_Offset> &,
97  const GEO_Vertex &);
98  void findMajorPoints(const UT_Vector3 &, float borderw,
100  const UT_Plane &, const UT_Vector3 &,
101  const GEO_Vertex &, GQ_Edge *);
102  void addMinorDivisions(GQ_Face *,
103  const UT_Array<GA_Offset> &,
104  const UT_Array<GA_Offset> &,
105  const UT_Vector3 &, const GEO_Vertex &);
106  void addFillPolys(GQ_Face *face, const
107  UT_Array<GA_Offset> &, const
109  void addPatchPolys(GQ_Face *face,
110  const UT_Array<GA_Offset> &);
111  void addCornerPolys(const UT_Array<GQ_Face *> &,
113  void addEdgePolys(const UT_Array<GQ_Face *> &,
116  UT_Array<GA_Offset> addEdgePoints(GQ_Edge *,
117  const UT_Vector3 &, const UT_Vector3 &,
118  const UT_Vector3 &);
119  GEO_PrimPoly *addTriangle(GA_Offset, GA_Offset, GA_Offset,
120  GEO_PrimPoly *);
121  GEO_PrimPoly *addRectangle(GA_Offset, GA_Offset, GA_Offset,
123 
124  gq_BevelPointNode *getOldPoint(exint &index);
125 
127 
128  GU_Detail *myGdp;
129  GQ_Detail *myGqd;
130  int myRepetitions;
131  float myInset;
132  int myType;
133  bool myRelative;
134  GA_PrimitiveGroup *myOutput;
135  GA_PointGroup *myPointGroup;
136  GA_EdgeGroup *myEdgeGroup;
137  UT_Array<gq_BevelEdgeNode> myBevelList;
138  UT_Array<gq_BevelPointNode *> myOldPoints;
139  GEO_WorkVertexBuffer myVertexBuffer;
140  PolyMap *myBevelTable;
141  PolyMap *myPointTable;
142  GA_PrimitiveGroup *myNewOutput;
143  UT_Array<GA_Offset> myAddedPoints;
144  UT_Array<GA_Offset> myAddedPointsonFace;
145 };
146 
148 
149 #endif
#define GQ_API
Definition: GQ_API.h:10
Unsorted map container.
Definition: UT_Map.h:83
#define SYS_DEPRECATED_PUSH_DISABLE()
#define SYS_DEPRECATED_POP_DISABLE()
GA_Offset myPt2
Definition: GQ_PolyBevel.h:24
Manages allocation/deletion of temporary vertex/points for a detail.
Definition: GA_VertexPool.h:35
GA_Size GA_Offset
Definition: GA_Types.h:617
int64 exint
Definition: SYS_Types.h:109
UT_Vector3 myCorner2
Definition: GQ_PolyBevel.h:28
GA_Size GA_Index
Define the strictness of GA_Offset/GA_Index.
Definition: GA_Types.h:611
GEO_PrimPoly * myPoly
Definition: GQ_PolyBevel.h:22
GLuint index
Definition: glcorearb.h:785
UT_Vector3 myDir1
Definition: GQ_PolyBevel.h:25
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:107
UT_Vector3 myCorner1
Definition: GQ_PolyBevel.h:27
GA_Offset myPt1
Definition: GQ_PolyBevel.h:23
UT_Vector3 myDir2
Definition: GQ_PolyBevel.h:26