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,
68  bool include_opposite=false) const override;
69 
70  void degenerate(bool degenerate, bool zaf, bool doOpen,
71  float tol) const override;
72 
73  int boundingBox(float tx, float ty, float tz,
74  float halfx, float halfy, float halfz,
75  float rx, float ry, float rz,
76  bool includeNotWhollyContained) override;
77 
78  void backface(const UT_Vector3 &eye) const;
79 
80  bool isEdgeInsideBBox(const GA_Edge & edge,
81  bool includeNotWhollyContained) const;
82 
83  bool isEdgeInsideSphere(const GA_Edge & edge,
84  float rx2, float ry2, float rz2,
85  float tx, float ty, float tz,
86  bool includeNotWhollyContained) const;
87 
88  void randomChance(float seed, float frac, bool use_attrib,
89  const char *attrib_name) const override;
90 private:
91  const char *myName; // name of the group
92  GA_PrimitiveTypeId myId;
93 
94  bool matchTypeId(const GA_Primitive *prim) const;
95 };
96 
97 #endif
virtual void normal(UT_Vector3 &nml, float angle, bool include_opposite) const =0
virtual int boundingBox(float, float, float, float, float, float, float, float, float, bool)
virtual void randomChance(float seed, float frac, bool use_attrib, const char *attrib_name) const =0
SIM_API const UT_StringHolder angle
GU_GroupBoolOp
Definition: GU_Group.h:109
virtual void generateGroup(const GU_GroupParms &parms)=0
virtual void patternGroup(const char *pattern, bool order) const =0
virtual void range(int, int, int, int, int, int) const =0
virtual GA_Group * find(const char *) const =0
GLdouble n
Definition: glcorearb.h:2008
virtual void destroy()=0
virtual void pattern(const char *pattern, int nelements, int order) const =0
GLdouble GLdouble GLint GLint order
Definition: glad.h:2676
#define GU_API
Definition: GU_API.h:14
GLuint const GLchar * name
Definition: glcorearb.h:786
GLushort pattern
Definition: glad.h:2583
virtual void boundingSphere(float, float, float, float, float, float, bool) const =0
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
virtual GA_Group * newGroup(const char *)=0