HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GU_EdgeGroup.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 Library (C++)
7  *
8  * COMMENTS:
9  *
10  */
11 
12 #ifndef __GU_EdgeGroup_h__
13 #define __GU_EdgeGroup_h__
14 
15 #include "GU_API.h"
16 #include "GU_Group.h"
17 #include "GU_Detail.h"
18 
19 ////////////////////////////////////////////////////////////////////////////
20 //
21 // GU_EdgeGroup - Creates a Edge group and selects specific points to
22 // be created given a set of parameters
23 //
24 ////////////////////////////////////////////////////////////////////////////
25 
27 {
28 public:
29  /// Create a detached group that we own.
30  GU_EdgeGroup(const GU_Detail *gdp, const GA_PrimitiveTypeId &id);
31  GU_EdgeGroup(const char *n, GU_Detail *gdp, const GA_PrimitiveTypeId &id);
32  GU_EdgeGroup(GU_Detail *gdp, GA_EdgeGroup *ptgroup);
33  ~GU_EdgeGroup() override;
34 
35  GA_Group *newGroup(const char *name) override;
36  GA_Group *find(const char *name) const override;
37  void destroy() override;
38 
39  bool boolean(GU_GroupBoolOp boolop,
40  const UT_String &group1, bool negate1,
41  const UT_String &group2, bool negate2
42  ) const override;
43 
44  bool boolean(GU_GroupBoolOp boolop,
45  GA_Group *group1, bool negate1,
46  GA_Group *group2, bool negate2
47  ) const override;
48 
49  GA_EdgeGroup *edgeGroup() const;
50 
51  // actual method that allows you to generate a group given the
52  // set of parameters
53  void generateGroup(const GU_GroupParms &parms) override;
54 
55  // methods that allow you to select points to be in the group
56  void range(int, int, int, int, int, int) const override;
57  void pattern(const char *pattern, int nelements,
58  int order) const override;
59  void patternGroup(const char *pattern,
60  bool order) const override;
61 
62  void boundingSphere(float tx, float ty, float tz,
63  float radx, float rady, float radz,
64  bool includeNotWhollyContained)
65  const override;
66 
67  void normal(UT_Vector3 &nml, float angle) const override;
68 
69  void degenerate(bool degenerate, bool zaf, bool doOpen,
70  float tol) const override;
71 
72  int boundingBox(float tx, float ty, float tz,
73  float halfx, float halfy, float halfz,
74  float rx, float ry, float rz,
75  bool includeNotWhollyContained) override;
76 
77  void backface(const UT_Vector3 &eye) const;
78 
79  bool isEdgeInsideBBox(const GA_Edge & edge,
80  bool includeNotWhollyContained) const;
81 
82  bool isEdgeInsideSphere(const GA_Edge & edge,
83  float rx2, float ry2, float rz2,
84  float tx, float ty, float tz,
85  bool includeNotWhollyContained) const;
86 
87  void randomChance(float seed, float frac, bool use_attrib,
88  const char *attrib_name) const override;
89 private:
90  const char *myName; // name of the group
91  GA_PrimitiveTypeId myId;
92 
93  bool matchTypeId(const GA_Primitive *prim) const;
94 };
95 
96 #endif
virtual int boundingBox(float, float, float, float, float, float, float, float, float, bool)
GLuint GLdouble GLdouble GLint GLint order
Definition: glew.h:3460
virtual void randomChance(float seed, float frac, bool use_attrib, const char *attrib_name) const =0
GU_GroupBoolOp
Definition: GU_Group.h:107
virtual void generateGroup(const GU_GroupParms &parms)=0
virtual void patternGroup(const char *pattern, bool order) const =0
GLuint const GLchar * name
Definition: glcorearb.h:786
virtual void normal(UT_Vector3 &nml, float angle) const =0
virtual void range(int, int, int, int, int, int) const =0
virtual GA_Group * find(const char *) const =0
virtual void destroy()=0
virtual void pattern(const char *pattern, int nelements, int order) const =0
#define GU_API
Definition: GU_API.h:14
virtual void boundingSphere(float, float, float, float, float, float, bool) const =0
GLdouble n
Definition: glcorearb.h:2008
GLubyte * pattern
Definition: glew.h:5741
virtual void degenerate(bool degenerate, bool zaf, bool doOpen, float tol) const =0
virtual bool boolean(GU_GroupBoolOp boolop, const UT_String &group1, bool negate1, const UT_String &group2, bool negate2) const
GLdouble angle
Definition: glew.h:9177
virtual GA_Group * newGroup(const char *)=0