HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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  virtual ~GU_EdgeGroup();
34 
35  virtual GA_Group *newGroup(const char *name);
36  virtual GA_Group *find(const char *name) const;
37  virtual void destroy(void);
38 
39  virtual bool boolean(GU_GroupBoolOp boolop,
40  const UT_String &group1, bool negate1,
41  const UT_String &group2, bool negate2) const;
42 
43  virtual bool boolean(GU_GroupBoolOp boolop,
44  GA_Group *group1, bool negate1,
45  GA_Group *group2, bool negate2) const;
46 
47  GA_EdgeGroup *edgeGroup() const;
48 
49  // actual method that allows you to generate a group given the
50  // set of parameters
51  void generateGroup(const GU_GroupParms &parms);
52 
53  // methods that allow you to select points to be in the group
54  void range(int, int, int, int, int, int) const;
55  void pattern(const char *pattern, int nelements,
56  int order) const;
57  void patternGroup(const char *pattern, bool order) const;
58 
59  void boundingSphere(float tx, float ty, float tz,
60  float radx, float rady, float radz,
61  bool includeNotWhollyContained)
62  const;
63 
64  void normal(UT_Vector3 &nml, float angle) const;
65 
66  void degenerate(bool degenerate, bool zaf, bool doOpen,
67  float tol) const;
68 
69  int boundingBox(float tx, float ty, float tz,
70  float halfx, float halfy, float halfz,
71  float rx, float ry, float rz, bool includeNotWhollyContained);
72 
73  void backface(const UT_Vector3 &eye) const;
74 
75  bool isEdgeInsideBBox(const GA_Edge & edge,
76  bool includeNotWhollyContained) const;
77 
78  bool isEdgeInsideSphere(const GA_Edge & edge,
79  float rx2, float ry2, float rz2,
80  float tx, float ty, float tz,
81  bool includeNotWhollyContained) const;
82 
83 private:
84  const char *myName; // name of the group
85  GA_PrimitiveTypeId myId;
86 
87  bool matchTypeId(const GA_Primitive *prim) const;
88 };
89 
90 #endif
virtual int boundingBox(float, float, float, float, float, float, float, float, float, bool)
GU_GroupBoolOp
Definition: GU_Group.h:100
virtual void generateGroup(const GU_GroupParms &parms)=0
virtual void patternGroup(const char *pattern, bool order) const =0
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
GLdouble n
Definition: glcorearb.h:2007
virtual void pattern(const char *pattern, int nelements, int order) const =0
T angle(const Vec2< T > &v1, const Vec2< T > &v2)
Definition: Vec2.h:480
#define GU_API
Definition: GU_API.h:11
GLuint const GLchar * name
Definition: glcorearb.h:785
virtual void boundingSphere(float, float, float, float, float, float, bool) const =0
virtual void destroy(void)=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