HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
HOM_SceneViewer.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_SceneViewer_h__
10 #define __HOM_SceneViewer_h__
11 
12 #include "HOM_PathBasedPaneTab.h"
13 #include "HOM_EnumModules.h"
14 #include "HOM_BoundingBox.h"
15 #include "HOM_Vector3.h"
16 #include "HOM_Vector2.h"
17 #include <vector>
18 
20 class HOM_DopData;
24 class HOM_Selection;
26 
27 SWIGOUT(%rename(SceneViewer) HOM_SceneViewer;)
28 
30 {
31 public:
33  { HOM_CONSTRUCT_OBJECT(this) }
34 
35  // Because the lowermost base classes initialize the virtual bases
36  // before any non-virtual bases, the correct thing to do here is
37  // explicitly call the constructor for HOM_PaneTab.
39  : HOM_PaneTab(pane), HOM_PathBasedPaneTab(pane)
40  { HOM_CONSTRUCT_OBJECT(this) }
41 
42  virtual ~HOM_SceneViewer()
43  { HOM_DESTRUCT_OBJECT(this) }
44 
45  // Let swig know we're overriding __repr__ for this class so it doesn't
46  // provide its own __repr__.
47  SWIGOUT(virtual std::string __repr__() = 0;)
48 
49  virtual std::vector<HOM_ElemPtr<HOM_GeometryViewport> > viewports() = 0;
50  SWIGOUT(%newobject findViewport;)
51  virtual HOM_GeometryViewport *findViewport(const char *name) = 0;
52  virtual HOM_GeometryViewport *curViewport() = 0;
53 
54  virtual std::string currentState() = 0;
55  virtual void enterViewState(bool wait_for_exit = false) = 0;
56  virtual void enterCurrentNodeState(bool wait_for_exit = false) = 0;
57  virtual void enterTranslateToolState(bool wait_for_exit = false) = 0;
58  virtual void enterRotateToolState(bool wait_for_exit = false) = 0;
59  virtual void enterScaleToolState(bool wait_for_exit = false) = 0;
60  SWIGOUT(%kwargs setCurrentState;)
61  virtual void setCurrentState(const char *state, bool wait_for_exit = false,
62  const HOM_EnumValue &generate =
63  HOM_stateGenerateMode::Insert,
64  bool request_new_on_generate = false) = 0;
65 
66  virtual bool isCreateInContext() = 0;
67 
68  virtual HOM_EnumValue& viewportLayout() = 0;
69  virtual void setViewportLayout(HOM_EnumValue &layout, int single = -1) = 0;
70 
71  SWIGOUT(%kwargs selectObjects;)
72  virtual std::vector<HOM_ElemPtr<HOM_Node> > selectObjects(
73  const char *prompt = "Select objects",
74  int sel_index = 0,
75  bool allow_drag = false,
76  bool quick_select = false,
77  bool use_existing_selection = true,
78  bool allow_multisel = true,
79  const std::vector<std::string> &allowed_types =
80  std::vector<std::string>(1, "*"),
81  const char *icon = NULL,
82  const char *label = NULL,
83  const std::vector<std::string> &prior_selection_paths =
84  std::vector<std::string>(),
85  const std::vector<std::string> &prior_selection_ids =
86  std::vector<std::string>(),
87  const std::vector<HOM_Selection *> &prior_selections =
88  std::vector<HOM_Selection *>(),
89  HOM_ParmTemplateGroup *toolbox_templategroup = nullptr,
90  HOM_ParmTemplateGroup *toolbox1_templategroup = nullptr,
91  bool confirm_existing = false
92  ) = 0;
93 
94  SWIGOUT(%newobject selectGeometry;)
95  SWIGOUT(%kwargs selectGeometry;)
96  virtual HOM_GeometrySelection *selectGeometry(
97  const char *prompt = "Select geometry",
98  int sel_index = 0,
99  bool allow_drag = false,
100  bool quick_select = false,
101  bool use_existing_selection = true,
102  const char *initial_selection = NULL,
103  HOM_EnumValue *initial_selection_type = NULL,
104  bool ordered = false,
105  const std::vector<HOM_EnumValue *> geometry_types =
106  std::vector<HOM_EnumValue *>(),
107  const std::vector<HOM_EnumValue *> primitive_types =
108  std::vector<HOM_EnumValue *>(),
109  bool allow_obj_sel = true,
110  const char *icon = NULL,
111  const char *label = NULL,
112  const std::vector<std::string> &prior_selection_paths =
113  std::vector<std::string>(),
114  const std::vector<std::string> &prior_selection_ids =
115  std::vector<std::string>(),
116  const std::vector<HOM_Selection *> &prior_selections =
117  std::vector<HOM_Selection *>(),
118  bool allow_other_sops = true,
119  bool consume_selections = true) = 0;
120 
121  SWIGOUT(%kwargs selectDynamics;)
122  virtual std::vector<HOM_ElemPtr<HOM_DopData> > selectDynamics(
123  const char *prompt = "Select dynamics objects",
124  int sel_index = 0,
125  bool allow_objects = true,
126  bool allow_modifiers = false,
127  bool quick_select = false,
128  bool use_existing_selection = true,
129  bool allow_multisel = true,
130  const char *icon = NULL,
131  const char *label = NULL,
132  const std::vector<std::string> &prior_selection_paths =
133  std::vector<std::string>(),
134  const std::vector<std::string> &prior_selection_ids =
135  std::vector<std::string>(),
136  const std::vector<HOM_Selection *> &prior_selections =
137  std::vector<HOM_Selection *>()) = 0;
138 
139  SWIGOUT(%kwargs selectDynamicsPoints;)
140  virtual std::vector<std::pair<HOM_ElemPtr<HOM_DopData>, HOM_ElemPtr<HOM_GeometrySelection> > > selectDynamicsPoints(
141  const char *prompt = "Select dynamics points",
142  int sel_index = 0,
143  bool quick_select = false,
144  bool use_existing_selection = true,
145  bool allow_multisel = true,
146  bool only_select_points = true,
147  bool object_based_point_selection = false,
148  bool use_last_selected_object = false,
149  const char *icon = NULL,
150  const char *label = NULL,
151  const std::vector<std::string> &prior_selection_paths =
152  std::vector<std::string>(),
153  const std::vector<std::string> &prior_selection_ids =
154  std::vector<std::string>(),
155  const std::vector<HOM_Selection *> &prior_selections =
156  std::vector<HOM_Selection *>()) = 0;
157 
158  SWIGOUT(%kwargs selectDynamicsPolygons;)
159  virtual std::vector<std::pair<HOM_ElemPtr<HOM_DopData>, HOM_ElemPtr<HOM_GeometrySelection> > > selectDynamicsPolygons(
160  const char *prompt = "Select dynamics polygons",
161  int sel_index = 0,
162  bool quick_select = false,
163  bool use_existing_selection = true,
164  bool object_based_point_selection = false,
165  bool use_last_selected_object = false,
166  const char *icon = NULL,
167  const char *label = NULL,
168  const std::vector<std::string> &prior_selection_paths =
169  std::vector<std::string>(),
170  const std::vector<std::string> &prior_selection_ids =
171  std::vector<std::string>(),
172  const std::vector<HOM_Selection *> &prior_selections =
173  std::vector<HOM_Selection *>()) = 0;
174 
175  SWIGOUT(%newobject selectPositions;)
176  SWIGOUT(%kwargs selectPositions;)
177  virtual std::vector<HOM_ElemPtr<HOM_Vector3> > selectPositions(
178  const char *prompt = "Click to specify a position",
179  int number_of_positions = 1,
180  bool connect_positions = true,
181  bool show_coordinates = true,
182  const HOM_BoundingBox &bbox = HOM_BoundingBox(),
183  HOM_EnumValue &position_type = HOM_positionType::WorldSpace,
184  const char *icon = NULL,
185  const char *label = NULL) = 0;
186 
187  SWIGOUT(%newobject currentGeometrySelection;)
188  virtual HOM_GeometrySelection *currentGeometrySelection() = 0;
189 
190  virtual void setCurrentGeometrySelection(
191  HOM_EnumValue &geometry_type,
192  const std::vector<HOM_Node *> &nodes,
193  const std::vector<HOM_Selection *> &selections) = 0;
194 
195  // Snapping control
196  virtual HOM_EnumValue &snappingMode() = 0;
197  virtual void setSnappingMode(HOM_EnumValue &snapping_mode) = 0;
198 
199  virtual bool isSnappingToTemplates() = 0;
200  virtual void setSnapToTemplates(bool on) = 0;
201 
202  virtual bool isSnappingToOtherObjects() = 0;
203  virtual void setSnapToOtherObjects(bool on) = 0;
204 
205  virtual bool isDepthSnapping() = 0;
206  virtual void setDepthSnapping(bool on) = 0;
207 
208  virtual bool isOrientingOnSnap() = 0;
209  virtual void setOrientOnSnap(bool on) = 0;
210 
211  // Selection control
212  virtual bool isPickingVisibleGeometry() = 0;
213  virtual void setPickingVisibleGeometry(bool on) = 0;
214 
215  virtual bool isPickingContainedGeometry() = 0;
216  virtual void setPickingContainedGeometry(bool on) = 0;
217 
218  virtual bool isGroupPicking() = 0;
219  virtual void setGroupPicking(bool on) = 0;
220 
221  virtual bool isWholeGeometryPicking() = 0;
222  virtual void setWholeGeometryPicking(bool on) = 0;
223 
224  virtual bool isSecureSelection() = 0;
225  virtual void setSecureSelection(bool on) = 0;
226 
227  virtual bool isPickingCurrentNode() = 0;
228  virtual void setPickingCurrentNode(bool on) = 0;
229 
230  virtual HOM_EnumValue &pickGeometryType() = 0;
231  virtual void setPickGeometryType(HOM_EnumValue &geometry_type) = 0;
232 
233  virtual HOM_EnumValue &selectionMode() = 0;
234  virtual void setSelectionMode(HOM_EnumValue &style) = 0;
235 
236  virtual HOM_EnumValue &pickStyle() = 0;
237  virtual void setPickStyle(HOM_EnumValue &style) = 0;
238 
239  virtual HOM_EnumValue &pickModifier() = 0;
240  virtual void setPickModifier(HOM_EnumValue &modifier) = 0;
241 
242  virtual HOM_EnumValue &defaultPickModifier() = 0;
243  virtual void setDefaultPickModifier(HOM_EnumValue &modifier) = 0;
244 
245  virtual HOM_EnumValue &pickFacing() = 0;
246  virtual void setPickFacing(HOM_EnumValue &facing) = 0;
247 
248  // Group list control
249  virtual bool isGroupListVisible() = 0;
250  virtual void setGroupListVisible(bool on) = 0;
251 
252  virtual bool isGroupListColoringGeometry() = 0;
253  virtual void setGroupListColoringGeometry(bool on) = 0;
254 
255  virtual bool isGroupListShowingEmptyGroups() = 0;
256  virtual void setGroupListShowingEmptyGroups(bool on) = 0;
257 
258  virtual bool isGroupListShowingOnlyPreSelectedGroups() = 0;
259  virtual void setGroupListShowingOnlyPreSelectedGroups(bool on) = 0;
260 
261  virtual bool isGroupListCondensingPathHierarchies() = 0;
262  virtual void setGroupListCondensingPathHierarchies(bool on) = 0;
263 
264  virtual HOM_Vector2 *groupListSize() = 0;
265  virtual void setGroupListSize(double width, double height) = 0;
266 
267  virtual HOM_EnumValue &groupListType() = 0;
268  virtual void setGroupListType(HOM_EnumValue &group_list_type) = 0;
269 
270  virtual std::string groupListMask() = 0;
271  virtual void setGroupListMask(const char *mask) = 0;
272 
273  // Construction plane access
274  SWIGOUT(%newobject constructionPlane;)
275  virtual HOM_ConstructionPlane *constructionPlane() = 0;
276 
277  SWIGOUT(%newobject flipbookSettings;)
278  virtual HOM_FlipbookSettings *flipbookSettings() = 0;
279 
280  SWIGOUT(%kwargs flipbook;)
281  virtual void flipbook(HOM_GeometryViewport *viewport = NULL,
282  HOM_FlipbookSettings *settings = NULL,
283  bool open_dialog = false) = 0;
284 
285  virtual void runShelfTool(const char *tool_name) = 0;
286 
287  virtual void displayRadialMenu(const std::string &name) = 0;
288 };
289 
290 #endif
#define HOM_DESTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:973
GLuint GLsizei const GLchar * label
Definition: glcorearb.h:2544
GLsizei const GLchar *const * string
Definition: glcorearb.h:813
#define SWIGOUT(x)
Definition: HOM_Defines.h:24
GLint GLuint mask
Definition: glcorearb.h:123
GLint GLsizei width
Definition: glcorearb.h:102
virtual std::string __repr__()=0
#define HOM_API
Definition: HOM_API.h:13
#define HOM_CONSTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:972
GLuint const GLchar * name
Definition: glcorearb.h:785
HOM_SceneViewer(const HOM_SceneViewer &pane)
GLint GLsizei GLsizei height
Definition: glcorearb.h:102
virtual ~HOM_SceneViewer()