HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
HOM_NetworkShape.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  * COMMENTS:
7  */
8 
9 #ifndef __HOM_NetworkShape_h__
10 #define __HOM_NetworkShape_h__
11 
12 #include "HOM_API.h"
13 #include "HOM_Defines.h"
14 #include "HOM_Errors.h"
15 #include "HOM_Module.h"
16 #include "HOM_PtrOrNull.h"
17 #include "HOM_Color.h"
18 #include "HOM_Vector2.h"
19 #include "HOM_BoundingRect.h"
20 #include <UT/UT_Color.h>
21 #include <UT/UT_BoundingRect.h>
22 #include <string>
23 
24 SWIGOUT(%rename(NetworkShape) HOM_NetworkShape;)
25 SWIGOUT(%rename(NetworkShapeLine) HOM_NetworkShapeLine;)
26 SWIGOUT(%rename(NetworkShapeBox) HOM_NetworkShapeBox;)
27 SWIGOUT(%rename(NetworkShapeNodeShape) HOM_NetworkShapeNodeShape;)
28 SWIGOUT(%rename(NetworkShapeConnection) HOM_NetworkShapeConnection;)
29 
31 {
32 public:
34  { HOM_CONSTRUCT_OBJECT(this) }
36  { HOM_DESTRUCT_OBJECT(this) }
37 
38  virtual std::string __repr__() = 0;
39 };
40 
42 {
43 public:
46  const HOM_Vector2 &start,
47  const HOM_Vector2 &end,
48  const HOM_Color &color = UT_Color(UT_RGB, 1.0, 1.0, 1.0),
49  float alpha = 1.0,
50  float width = 1.0,
51  bool screen_space = true,
52  bool smooth = true,
53  bool dashed = false)
54  : myStart(start.myVector2),
55  myEnd(end.myVector2),
56  myColor(color.myColor),
57  myAlpha(alpha),
58  myWidth(width),
59  myScreenSpace(screen_space),
60  mySmooth(smooth),
61  myDashed(dashed)
62  { }
63 
64  virtual std::string __repr__();
65 
66  SWIGOUT(%ignore myStart;)
67  UT_Vector2D myStart;
68  SWIGOUT(%ignore myEnd;)
69  UT_Vector2D myEnd;
70  SWIGOUT(%ignore myColor;)
71  UT_Color myColor;
72  SWIGOUT(%ignore myAlpha;)
73  float myAlpha;
74  SWIGOUT(%ignore myWidth;)
75  float myWidth;
76  SWIGOUT(%ignore myScreenSpace;)
77  bool myScreenSpace;
78  SWIGOUT(%ignore mySmooth;)
79  bool mySmooth;
80  SWIGOUT(%ignore myDashed;)
81  bool myDashed;
82 };
83 
85 {
86 public:
89  const HOM_BoundingRect &rect,
90  const HOM_Color &color = UT_Color(UT_RGB, 1.0, 1.0, 1.0),
91  float alpha = 1.0,
92  bool fill = true,
93  bool screen_space = true,
94  bool smooth = true)
95  : myRect(rect.myBoundingRect),
96  myColor(color.myColor),
97  myAlpha(alpha),
98  myFill(fill),
99  myScreenSpace(screen_space),
100  mySmooth(smooth)
101  { }
102 
103  virtual std::string __repr__();
104 
105  SWIGOUT(%ignore myRect;)
107  SWIGOUT(%ignore myColor;)
108  UT_Color myColor;
109  SWIGOUT(%ignore myAlpha;)
110  float myAlpha;
111  SWIGOUT(%ignore myFill;)
112  bool myFill;
113  SWIGOUT(%ignore myScreenSpace;)
114  bool myScreenSpace;
115  SWIGOUT(%ignore mySmooth;)
116  bool mySmooth;
117 };
118 
120 {
121 public:
124  const HOM_BoundingRect &rect,
125  const std::string shape,
126  const HOM_Color &color = UT_Color(UT_RGB, 1.0, 1.0, 1.0),
127  float alpha = 1.0,
128  bool fill = true,
129  bool screen_space = true,
130  bool smooth = true)
131  : myRect(rect.myBoundingRect),
132  myShape(shape),
133  myColor(color.myColor),
134  myAlpha(alpha),
135  myFill(fill),
136  myScreenSpace(screen_space),
137  mySmooth(smooth)
138  { }
139 
140  virtual std::string __repr__();
141 
142  SWIGOUT(%ignore myRect;)
144  SWIGOUT(%ignore myShape;)
146  SWIGOUT(%ignore myColor;)
147  UT_Color myColor;
148  SWIGOUT(%ignore myAlpha;)
149  float myAlpha;
150  SWIGOUT(%ignore myFill;)
151  bool myFill;
152  SWIGOUT(%ignore myScreenSpace;)
153  bool myScreenSpace;
154  SWIGOUT(%ignore mySmooth;)
155  bool mySmooth;
156 };
157 
159 {
160 public:
163  const HOM_Vector2 &output_pos,
164  const HOM_Vector2 &output_dir,
165  const HOM_Vector2 &input_pos,
166  const HOM_Vector2 &input_dir,
167  const HOM_Color &color = UT_Color(UT_RGB, 1.0, 1.0, 1.0),
168  float alpha = 1.0,
169  float fade_factor = 0.0,
170  bool smooth = true,
171  bool dashed = false)
172  : myOutputPos(output_pos.myVector2),
173  myOutputDir(output_dir.myVector2),
174  myInputPos(input_pos.myVector2),
175  myInputDir(input_dir.myVector2),
176  myColor(color.myColor),
177  myAlpha(alpha),
178  myFadeFactor(fade_factor),
179  mySmooth(smooth),
180  myDashed(dashed)
181  { }
182 
183  virtual std::string __repr__();
184 
185  SWIGOUT(%ignore myOutputPos;)
186  UT_Vector2D myOutputPos;
187  SWIGOUT(%ignore myOutputDir;)
188  UT_Vector2D myOutputDir;
189  SWIGOUT(%ignore myInputPos;)
190  UT_Vector2D myInputPos;
191  SWIGOUT(%ignore myInputDir;)
192  UT_Vector2D myInputDir;
193  SWIGOUT(%ignore myColor;)
194  UT_Color myColor;
195  SWIGOUT(%ignore myAlpha;)
196  float myAlpha;
197  SWIGOUT(%ignore myFadeFactor;)
198  float myFadeFactor;
199  SWIGOUT(%ignore mySmooth;)
200  bool mySmooth;
201  SWIGOUT(%ignore myDashed;)
202  bool myDashed;
203 };
204 
205 #endif
206 
#define HOM_DESTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:983
GLuint start
Definition: glcorearb.h:474
GLsizei const GLchar *const * string
Definition: glcorearb.h:813
GLuint color
Definition: glcorearb.h:1260
UT_BoundingRectD myBoundingRect
#define SWIGOUT(x)
Definition: HOM_Defines.h:24
GLint GLsizei width
Definition: glcorearb.h:102
HOM_NetworkShapeBox(const HOM_BoundingRect &rect, const HOM_Color &color=UT_Color(UT_RGB, 1.0, 1.0, 1.0), float alpha=1.0, bool fill=true, bool screen_space=true, bool smooth=true)
#define HOM_API
Definition: HOM_API.h:13
virtual ~HOM_NetworkShape()
HOM_NetworkShapeLine(const HOM_Vector2 &start, const HOM_Vector2 &end, const HOM_Color &color=UT_Color(UT_RGB, 1.0, 1.0, 1.0), float alpha=1.0, float width=1.0, bool screen_space=true, bool smooth=true, bool dashed=false)
GLuint GLuint end
Definition: glcorearb.h:474
#define HOM_CONSTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:982
GLfloat GLfloat GLfloat alpha
Definition: glcorearb.h:111
HOM_NetworkShapeConnection(const HOM_Vector2 &output_pos, const HOM_Vector2 &output_dir, const HOM_Vector2 &input_pos, const HOM_Vector2 &input_dir, const HOM_Color &color=UT_Color(UT_RGB, 1.0, 1.0, 1.0), float alpha=1.0, float fade_factor=0.0, bool smooth=true, bool dashed=false)
virtual bool smooth(GA_AttributeOperand &d, GA_AttributeOperand &min, GA_AttributeOperand &max, GA_AttributeOperand &t) const
d = SYSsmooth(min, max, t);
HOM_NetworkShapeNodeShape(const HOM_BoundingRect &rect, const std::string shape, const HOM_Color &color=UT_Color(UT_RGB, 1.0, 1.0, 1.0), float alpha=1.0, bool fill=true, bool screen_space=true, bool smooth=true)
UT_Vector2D myVector2
Definition: HOM_Vector2.h:124
virtual std::string __repr__()=0
std::string __repr__()