HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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 <UT/UT_StringHolder.h>
23 #include <string>
24 
25 SWIGOUT(%rename(NetworkShape) HOM_NetworkShape;)
26 SWIGOUT(%rename(NetworkShapeLine) HOM_NetworkShapeLine;)
27 SWIGOUT(%rename(NetworkShapeBox) HOM_NetworkShapeBox;)
28 SWIGOUT(%rename(NetworkShapeNodeShape) HOM_NetworkShapeNodeShape;)
29 SWIGOUT(%rename(NetworkShapeConnection) HOM_NetworkShapeConnection;)
30 
32 {
33 public:
35  { HOM_CONSTRUCT_OBJECT(this) }
37  { HOM_DESTRUCT_OBJECT(this) }
38 
39  virtual std::string __repr__() = 0;
40 };
41 
43 {
44 public:
47  const HOM_Vector2 &start,
48  const HOM_Vector2 &end,
49  const HOM_Color &color = UT_Color(UT_RGB, 1.0, 1.0, 1.0),
50  float alpha = 1.0,
51  float width = 1.0,
52  bool screen_space = true,
53  bool smooth = true,
54  bool dashed = false)
55  : myStart(start.myVector2),
56  myEnd(end.myVector2),
57  myColor(color.myColor),
58  myAlpha(alpha),
59  myWidth(width),
60  myScreenSpace(screen_space),
61  mySmooth(smooth),
62  myDashed(dashed)
63  { }
64 
65  std::string __repr__() override;
66 
67  SWIGOUT(%ignore myStart;)
68  UT_Vector2D myStart;
69  SWIGOUT(%ignore myEnd;)
70  UT_Vector2D myEnd;
71  SWIGOUT(%ignore myColor;)
72  UT_Color myColor;
73  SWIGOUT(%ignore myAlpha;)
74  float myAlpha;
75  SWIGOUT(%ignore myWidth;)
76  float myWidth;
77  SWIGOUT(%ignore myScreenSpace;)
78  bool myScreenSpace;
79  SWIGOUT(%ignore mySmooth;)
80  bool mySmooth;
81  SWIGOUT(%ignore myDashed;)
82  bool myDashed;
83 };
84 
86 {
87 public:
90  const HOM_BoundingRect &rect,
91  const HOM_Color &color = UT_Color(UT_RGB, 1.0, 1.0, 1.0),
92  float alpha = 1.0,
93  bool fill = true,
94  bool screen_space = true,
95  bool smooth = true)
96  : myRect(rect.myBoundingRect),
97  myColor(color.myColor),
98  myAlpha(alpha),
99  myFill(fill),
100  myScreenSpace(screen_space),
101  mySmooth(smooth)
102  { }
103 
104  std::string __repr__() override;
105 
106  SWIGOUT(%ignore myRect;)
108  SWIGOUT(%ignore myColor;)
109  UT_Color myColor;
110  SWIGOUT(%ignore myAlpha;)
111  float myAlpha;
112  SWIGOUT(%ignore myFill;)
113  bool myFill;
114  SWIGOUT(%ignore myScreenSpace;)
115  bool myScreenSpace;
116  SWIGOUT(%ignore mySmooth;)
117  bool mySmooth;
118 };
119 
121 {
122 public:
125  const HOM_BoundingRect &rect,
126  const std::string shape,
127  const HOM_Color &color = UT_Color(UT_RGB, 1.0, 1.0, 1.0),
128  float alpha = 1.0,
129  bool fill = true,
130  bool screen_space = true,
131  bool smooth = true)
132  : myRect(rect.myBoundingRect),
133  myShape(shape),
134  myColor(color.myColor),
135  myAlpha(alpha),
136  myFill(fill),
137  myScreenSpace(screen_space),
138  mySmooth(smooth)
139  { }
140 
141  std::string __repr__() override;
142 
143  SWIGOUT(%ignore myRect;)
145  SWIGOUT(%ignore myShape;)
147  SWIGOUT(%ignore myColor;)
148  UT_Color myColor;
149  SWIGOUT(%ignore myAlpha;)
150  float myAlpha;
151  SWIGOUT(%ignore myFill;)
152  bool myFill;
153  SWIGOUT(%ignore myScreenSpace;)
154  bool myScreenSpace;
155  SWIGOUT(%ignore mySmooth;)
156  bool mySmooth;
157 };
158 
160 {
161 public:
164  const HOM_Vector2 &output_pos,
165  const HOM_Vector2 &output_dir,
166  const HOM_Vector2 &input_pos,
167  const HOM_Vector2 &input_dir,
168  const HOM_Color &color = UT_Color(UT_RGB, 1.0, 1.0, 1.0),
169  float alpha = 1.0,
170  float fade_factor = 0.0,
171  bool smooth = true,
172  bool dashed = false)
173  : myOutputPos(output_pos.myVector2),
174  myOutputDir(output_dir.myVector2),
175  myInputPos(input_pos.myVector2),
176  myInputDir(input_dir.myVector2),
177  myColor(color.myColor),
178  myAlpha(alpha),
179  myFadeFactor(fade_factor),
180  mySmooth(smooth),
181  myDashed(dashed)
182  { }
183 
184  std::string __repr__() override;
185 
186  SWIGOUT(%ignore myOutputPos;)
187  UT_Vector2D myOutputPos;
188  SWIGOUT(%ignore myOutputDir;)
189  UT_Vector2D myOutputDir;
190  SWIGOUT(%ignore myInputPos;)
191  UT_Vector2D myInputPos;
192  SWIGOUT(%ignore myInputDir;)
193  UT_Vector2D myInputDir;
194  SWIGOUT(%ignore myColor;)
195  UT_Color myColor;
196  SWIGOUT(%ignore myAlpha;)
197  float myAlpha;
198  SWIGOUT(%ignore myFadeFactor;)
199  float myFadeFactor;
200  SWIGOUT(%ignore mySmooth;)
201  bool mySmooth;
202  SWIGOUT(%ignore myDashed;)
203  bool myDashed;
204 };
205 
206 #endif
207 
#define HOM_DESTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:1291
GLuint start
Definition: glcorearb.h:475
GLsizei const GLchar *const * string
Definition: glcorearb.h:814
UT_BoundingRectD myBoundingRect
#define SWIGOUT(x)
Definition: HOM_Defines.h:24
string __repr__(VtArray< T > const &self)
Definition: wrapArray.h:352
FMT_NOINLINE FMT_CONSTEXPR auto fill(OutputIt it, size_t n, const fill_t< Char > &fill) -> OutputIt
Definition: format.h:1262
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
void ignore(T const &) VULKAN_HPP_NOEXCEPT
Definition: vulkan.hpp:6508
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:475
#define HOM_CONSTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:1290
GLfloat GLfloat GLfloat alpha
Definition: glcorearb.h:112
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);
GLuint color
Definition: glcorearb.h:1261
OIIO_UTIL_API bool rename(string_view from, string_view to, std::string &err)
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)
GLint GLsizei width
Definition: glcorearb.h:103
UT_Vector2D myVector2
Definition: HOM_Vector2.h:131
virtual std::string __repr__()=0