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  bool arclen=false);
77 
78  void buildDomain(const GU_Detail *srcgdp,
79  const GA_PrimitiveGroup *srcgroup,
80  const GEO_Primitive *auxprim,
81  int first_group,
82  GA_PointGroup *guidepts,
83  int doU, int loop, float ldepth,
84  float lwidth1, float lwidth2,
85  float rdepth, float rwidth1,
86  float rwidth2);
87 
88  int64 getMemoryUsage(bool inclusive) const override
89  {
90  int64 mem = inclusive ? sizeof(*this) : 0;
91  mem += GU_Detail::getMemoryUsage(false);
92  return mem;
93  }
94 };
95 
96 #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:88
GLfloat f
Definition: glcorearb.h:1926
void displayHulls(bool f)
Definition: GOP_Guide.h:44
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
GLboolean GLboolean GLboolean b
Definition: glcorearb.h:1222
void displayText(bool f)
Definition: GOP_Guide.h:45
GLint GLint GLsizei GLsizei GLsizei depth
Definition: glcorearb.h:476
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
bool displayGeometry() const
Definition: GOP_Guide.h:56
GOP_GuideType
Definition: GOP_Guide.h:18