HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GOP_Guide.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: GOP_Guide.h
7  *
8  * COMMENTS: The guide geometry and how to draw it.
9  *
10  */
11 
12 #ifndef __GOP_Guide_h_
13 #define __GOP_Guide_h_
14 
15 #include "GU_API.h"
16 #include "GU_Detail.h"
17 
19 {
22 };
23 
25 {
28 };
29 
30 class GA_PointGroup;
31 
32 // This is a class which handles the drawing of guide geometry
33 
34 class GU_API GOP_Guide : public GU_Detail
35 {
36 public:
38  GOP_Guide(const GOP_Guide &source);
39  virtual ~GOP_Guide();
40 
41  void displayGeometry (short f) { drawGeometry = f; }
42  void displayFont (short f) { drawAsFont = f; }
43  void displayHulls (short f) { drawHulls = f; }
44  void displayText (short f) { drawText = f; }
45  void displayPrimNums (short f) { drawPrimNums = f; }
46  void displayAsPoints (short f) { drawAsPoints = f; }
47 
48  /// Display this guide as shaded when in viewport shaded modes.
49  void displayShaded (bool b) { myDrawShaded = b; }
50  /// Always display this guide as shaded, regardless of viewport shading mode
51  void forceShaded (bool b) { myForceShaded = b; }
52  /// Draw the guide so that it can be seen through solid objects as wireframe
53  void drawXRay (bool b) { myDrawXRay = b; }
54 
55  int displayGeometry () const { return drawGeometry; }
56  int displayFont () const { return drawAsFont; }
57  int displayHulls () const { return drawHulls; }
58  int displayText () const { return drawText; }
59  int displayPrimNums () const { return drawPrimNums; }
60  int displayAsPoints () const { return drawAsPoints; }
61  bool displayShaded () const { return myDrawShaded; }
62  bool forceShaded () const { return myForceShaded; }
63  bool drawXRay () const { return myDrawXRay; }
64 
65  GOP_GuideType getType () const { return myType; }
66 
67  void buildVector(const UT_Vector3 &origin,
68  const UT_Vector3 &direction,
69  const GU_Detail *boxgdp);
70 
71  void buildCurve(const GEO_Primitive *prim,
72  GA_PointGroup *guidepts,
73  int doU, float depth,
74  float width1, float width2);
75 
76  void buildDomain(const GU_Detail *srcgdp,
77  const GA_PrimitiveGroup *srcgroup,
78  const GEO_Primitive *auxprim,
79  int first_group,
80  GA_PointGroup *guidepts,
81  int doU, int loop, float ldepth,
82  float lwidth1, float lwidth2,
83  float rdepth, float rwidth1,
84  float rwidth2);
85 
86  virtual int64 getMemoryUsage(bool inclusive) const
87  {
88  int64 mem = inclusive ? sizeof(*this) : 0;
89  mem += GU_Detail::getMemoryUsage(false);
90  return mem;
91  }
92 
93 private:
94  GOP_GuideType myType;
95 
96  unsigned int drawGeometry : 1,
97  drawAsFont : 1,
98  drawHulls : 1,
99  drawText : 1,
100  drawPrimNums : 1,
101  drawAsPoints : 1,
102  myDrawShaded : 1,
103  myForceShaded : 1,
104  myDrawXRay : 1;
105 };
106 
107 #endif
virtual int64 getMemoryUsage(bool inclusive) const
Compute memory usage (includes all shared memory)
bool drawXRay() const
Definition: GOP_Guide.h:63
virtual int64 getMemoryUsage(bool inclusive) const
Compute memory usage (includes all shared memory)
Definition: GOP_Guide.h:86
int displayGeometry() const
Definition: GOP_Guide.h:55
int displayPrimNums() const
Definition: GOP_Guide.h:59
IMF_EXPORT IMATH_NAMESPACE::V3f direction(const IMATH_NAMESPACE::Box2i &dataWindow, const IMATH_NAMESPACE::V2f &pixelPosition)
void displayShaded(bool b)
Display this guide as shaded when in viewport shaded modes.
Definition: GOP_Guide.h:49
3D Vector class.
void displayAsPoints(short f)
Definition: GOP_Guide.h:46
long long int64
Definition: SYS_Types.h:100
GLfloat f
Definition: glcorearb.h:1925
GLint GLint GLsizei GLsizei GLsizei depth
Definition: glcorearb.h:475
bool displayShaded() const
Definition: GOP_Guide.h:61
void displayText(short f)
Definition: GOP_Guide.h:44
GOP_GuideType getType() const
Definition: GOP_Guide.h:65
GLsizei GLsizei GLchar * source
Definition: glcorearb.h:802
int displayHulls() const
Definition: GOP_Guide.h:57
#define GU_API
Definition: GU_API.h:11
GLboolean GLboolean GLboolean b
Definition: glcorearb.h:1221
void displayGeometry(short f)
Definition: GOP_Guide.h:41
void displayPrimNums(short f)
Definition: GOP_Guide.h:45
void displayFont(short f)
Definition: GOP_Guide.h:42
void forceShaded(bool b)
Always display this guide as shaded, regardless of viewport shading mode.
Definition: GOP_Guide.h:51
int displayAsPoints() const
Definition: GOP_Guide.h:60
void drawXRay(bool b)
Draw the guide so that it can be seen through solid objects as wireframe.
Definition: GOP_Guide.h:53
int displayFont() const
Definition: GOP_Guide.h:56
int displayText() const
Definition: GOP_Guide.h:58
GOP_GuideListType
Definition: GOP_Guide.h:24
void displayHulls(short f)
Definition: GOP_Guide.h:43
bool forceShaded() const
Definition: GOP_Guide.h:62
GOP_GuideType
Definition: GOP_Guide.h:18