HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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 // GOP_Guide used binary incompatible with GU_Detail as it had extra
34 // local flags. The flags had stopped being respected.
35 
36 class GU_API GOP_Guide : public GU_Detail
37 {
38 public:
40  : GU_Detail() {}
41 
42  void displayGeometry (bool f) { }
43  void displayFont (bool f) { }
44  void displayHulls (bool f) { }
45  void displayText (bool f) { }
46  void displayPrimNums (bool f) { }
47  void displayAsPoints (bool f) { }
48 
49  /// Display this guide as shaded when in viewport shaded modes.
50  void displayShaded (bool b) { }
51  /// Always display this guide as shaded, regardless of viewport shading mode
52  void forceShaded (bool b) { }
53  /// Draw the guide so that it can be seen through solid objects as wireframe
54  void drawXRay (bool b) { }
55 
56  bool displayGeometry () const { return true; }
57  bool displayFont () const { return false; }
58  bool displayHulls () const { return false; }
59  bool displayText () const { return false; }
60  bool displayPrimNums () const { return false; }
61  bool displayAsPoints () const { return false; }
62  bool displayShaded () const { return false; }
63  bool forceShaded () const { return false; }
64  bool drawXRay () const { return false; }
65 
66  GOP_GuideType getType () const { return OP_GUIDE_ONE; }
67 
68  void buildVector(const UT_Vector3 &origin,
69  const UT_Vector3 &direction,
70  const GU_Detail *boxgdp);
71 
72  void buildCurve(const GEO_Primitive *prim,
73  GA_PointGroup *guidepts,
74  int doU, float depth,
75  float width1, float width2);
76 
77  void buildDomain(const GU_Detail *srcgdp,
78  const GA_PrimitiveGroup *srcgroup,
79  const GEO_Primitive *auxprim,
80  int first_group,
81  GA_PointGroup *guidepts,
82  int doU, int loop, float ldepth,
83  float lwidth1, float lwidth2,
84  float rdepth, float rwidth1,
85  float rwidth2);
86 
87  int64 getMemoryUsage(bool inclusive) const override
88  {
89  int64 mem = inclusive ? sizeof(*this) : 0;
90  mem += GU_Detail::getMemoryUsage(false);
91  return mem;
92  }
93 };
94 
95 #endif
bool drawXRay() const
Definition: GOP_Guide.h:64
IMF_EXPORT IMATH_NAMESPACE::V3f direction(const IMATH_NAMESPACE::Box2i &dataWindow, const IMATH_NAMESPACE::V2f &pixelPosition)
bool displayText() const
Definition: GOP_Guide.h:59
void displayAsPoints(bool f)
Definition: GOP_Guide.h:47
bool displayAsPoints() const
Definition: GOP_Guide.h:61
void displayShaded(bool b)
Display this guide as shaded when in viewport shaded modes.
Definition: GOP_Guide.h:50
bool displayPrimNums() const
Definition: GOP_Guide.h:60
bool displayHulls() const
Definition: GOP_Guide.h:58
void displayGeometry(bool f)
Definition: GOP_Guide.h:42
int64 getMemoryUsage(bool inclusive) const override
Compute memory usage (includes all shared memory)
int64 getMemoryUsage(bool inclusive) const override
Compute memory usage (includes all shared memory)
Definition: GOP_Guide.h:87
void displayHulls(bool f)
Definition: GOP_Guide.h:44
GLclampf f
Definition: glew.h:3499
bool displayShaded() const
Definition: GOP_Guide.h:62
GOP_GuideType getType() const
Definition: GOP_Guide.h:66
long long int64
Definition: SYS_Types.h:116
#define GU_API
Definition: GU_API.h:14
bool displayFont() const
Definition: GOP_Guide.h:57
void displayText(bool f)
Definition: GOP_Guide.h:45
GLdouble GLdouble GLdouble b
Definition: glew.h:9122
void forceShaded(bool b)
Always display this guide as shaded, regardless of viewport shading mode.
Definition: GOP_Guide.h:52
void drawXRay(bool b)
Draw the guide so that it can be seen through solid objects as wireframe.
Definition: GOP_Guide.h:54
GOP_Guide(GOP_GuideType intype=OP_GUIDE_ONE)
Definition: GOP_Guide.h:39
GOP_GuideListType
Definition: GOP_Guide.h:24
void displayPrimNums(bool f)
Definition: GOP_Guide.h:46
bool forceShaded() const
Definition: GOP_Guide.h:63
void displayFont(bool f)
Definition: GOP_Guide.h:43
GLint GLint GLsizei GLsizei GLsizei depth
Definition: glew.h:1254
bool displayGeometry() const
Definition: GOP_Guide.h:56
GOP_GuideType
Definition: GOP_Guide.h:18