HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DM_Defines.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: Direct manipulation library (C++)
7  *
8  * COMMENTS:
9  * Definitions for DM.
10  *
11  */
12 
13 #ifndef __DM_Defines_H__
14 #define __DM_Defines_H__
15 
16 #include <UT/UT_Array.h>
17 #include <GU/GU_SelectType.h>
18 #include <GUI/GUI_RenderCommon.h>
19 #include <BM/BM_KeyBindings.h>
20 #include <RE/RE_Types.h>
21 #include <UT/UT_Vector2.h>
22 #include <UT/UT_Vector3.h>
23 
24 //------------------------------ Drawing ----------------------------------
25 
26 // Draw all the points or primitives, or just the selected:
27 #define DM_DRAW_SELECTED 0x01
28 #define DM_DRAW_NONSELECTED 0x02
29 #define DM_DRAW_ALL (DM_DRAW_SELECTED | DM_DRAW_NONSELECTED)
30 
31 //------------------------------ Picking ----------------------------------
32 
33 #define DM_PICKED_NOTHING 0
34 #define DM_PICKED_POINT 1
35 #define DM_PICKED_EDGE 2
36 #define DM_PICKED_NORMAL 3
37 #define DM_PICKED_PRIMITIVE 4
38 
39 //---------------------------- Picking radii ------------------------------
40 
41 #define DM_VIEWPORT_MAX_PICK_DIST RE_MAX_PICK_DIST
42 #define DM_VIEWPORT_SNAP_NEAR_PICK_DIST RE_MAX_PICK_DIST
43 #define DM_VIEWPORT_HANDLE_PICK_DIST 5
44 #define DM_VIEWPORT_HANDLE_PICK_OVERLAP_DIST 5
45 #define DM_VIEWPORT_GEO_PICK_DIST 5
46 #define DM_VIEWPORT_GEO_PICK_OVERLAP_DIST 5
47 #define DM_VIEWPORT_SNAP_PICK_DIST 10
48 #define DM_VIEWPORT_SNAP_PICK_OVERLAP_DIST 10
49 #define DM_VIEWPORT_PEANUT_SNAP_PICK_DIST 10
50 #define DM_VIEWPORT_PEANUT_SNAP_PICK_OVERLAP_DIST 7
51 
52 //---------------------------- Selection Styles ---------------------------
53 
55 {
62 };
63 
64 //---------------------------- Handle Pick Ids -------------------------------
65 #define DM_X_AXIS 'X'
66 #define DM_Y_AXIS 'Y'
67 #define DM_Z_AXIS 'Z'
68 #define DM_x_AXIS 'x'
69 #define DM_y_AXIS 'y'
70 #define DM_z_AXIS 'z'
71 
72 //----------------------------- Miscellaneous --------------------------------
73 
74 #define DM_ROTATE_BY 45 // degrees to rotate by
75 
76 enum {
77  DM_OBJ_GEO = 0x00000001,
78  DM_OBJ_CAM = 0x00000002,
79  DM_OBJ_LIGHT = 0x00000004,
80  DM_OBJ_BONE = 0x00000008,
81  DM_OBJ_NULL = 0x00000010,
82  DM_OBJ_BLEND = 0x00000020,
83  DM_OBJ_OTHER = 0x00000040,
84  DM_OBJ_ALL = 0x0000007F
85 };
86 
92 };
93 
94 enum {
99 };
100 
101 enum {
109 };
110 
111 // This enum must be kept in sync with the selection_mode.val radio strip
112 // in $FUSE/ViewExtra.ui!
114 {
120  DM_NUM_SELECTMODES // sentinel
121 };
122 
124 {
129 };
130 
131 // This enum must be kept in sync with the inspect.mode.val radio strip
132 // in $FUSE/ViewExtra.ui!
134 {
139 };
140 
141 // This enum must be kept in sync with the infoTextMode.menu menu strip
142 // in DM_DisplayOption.ui!
144 {
148 };
149 
151 {
155 };
156 
157 /// mode types for snapping
159 {
165  DM_SNAP_MODE_LAST // sentinel
166 };
167 
168 /// Enumerates options that can change and whose changes are broadcast
170 {
171  DM_SNAPSHOT_HIDE_AT_SOURCE, // option of hiding snapshot at source frame
172  DM_SNAPSHOT_FACTOR_VALUE, // the value of image blending
173  DM_SNAPSHOT_VISIBLE_OBJECTS, // specification visible objects in snapshot
174  DM_SNAPSHOT_HIDE_HANDLES, // option of hiding the handles in snapshots
175  DM_SNAPSHOT_COMPARE_MODE // blending mode- blend, wipes
176 };
177 
178 /// The set of modifier keys used for selections assigned on Shift, Ctrl,
179 /// and Ctrl+Shift, respectively.
181 {
182  DM_SMK_TOGGLE_REMOVE_ADD, // Houdini and Maya
184 };
185 
186 enum class DM_DrawablePrimitive : short
187 {
188  Circle,
189  Sphere,
190  Tube
191 };
192 
193 // Priority enum (used in HOM)
194 enum class DM_SnapPriority : unsigned
195 {
196  GeoEdge = 0,
197  GeoPoint,
198  Midpoint,
199  Primitive,
200  BreakPoint,
201  GridPoint,
202  GridEdge,
205 };
206 
207 #define DM_PRIMARY_BUTTON UI_LEFT_BUTTON
208 #define DM_SECONDARY_BUTTON UI_MIDDLE_BUTTON
209 #define DM_TERTIARY_BUTTON UI_RIGHT_BUTTON
210 
211 #define DM_SELECTDRAG_BUTTON UI_LEFT_BUTTON
212 #define DM_SAFESELECT_BUTTON UI_MIDDLE_BUTTON
213 #define DM_FINISH_BUTTON UI_RIGHT_BUTTON
214 
215 
216 #define DM_VIEW_MEMORY_NAME "View"
217 #define DM_SNAPSHOT_MEMORY_NAME "Snapshot"
218 
219 #define DM_LABEL_HOFFSET 0.15
220 #define DM_LABEL_VOFFSET 0.05
221 
223 {
224 public:
226  : mblur_frames(1), shutter(0.5), fps(24.0), frame_bias(0),
227  dof_quality(10), focal_length(10.0), aperture(41.4214), fstop(22.0),
228  beauty_only(false) {}
238 };
239 
241 {
242 public:
244  : mode(GUI_FOG_NONE), density(1.0), fog_color(1.0,1.0,1.0), opacity(1.0),
245  start(1.0), end(1000.0), clip_dist(100000.0), heightmode(0),
246  height(100.0), falloff(100.0), light_intensity(1.0),
247  light_scatter(1.0,1.0), use_sun(true), sun_exp(5.0)
248  {}
261  bool use_sun;
263 };
264 
265 #endif
GUI_FogMode mode
Definition: DM_Defines.h:249
GLenum mode
Definition: glew.h:2163
DM_SnapPriority
Definition: DM_Defines.h:194
DM_SnapMode
mode types for snapping
Definition: DM_Defines.h:158
GLint GLint GLint GLint GLint GLint GLsizei GLsizei height
Definition: glew.h:1252
DM_InspectMode
Definition: DM_Defines.h:133
DM_DrawablePrimitive
Definition: DM_Defines.h:186
fpreal32 light_intensity
Definition: DM_Defines.h:259
DM_InfoTextMode
Definition: DM_Defines.h:143
DM_SelectionFacing
Definition: DM_Defines.h:87
UT_Vector2F light_scatter
Definition: DM_Defines.h:260
GLuint GLuint end
Definition: glew.h:1253
DM_DopSelectMode
Definition: DM_Defines.h:123
GUI_FogMode
DM_SelectMode
Definition: DM_Defines.h:113
DM_SelectionModifierKeys
Definition: DM_Defines.h:180
GLuint start
Definition: glew.h:1253
double fpreal
Definition: SYS_Types.h:276
DM_GeoSortMode
Definition: DM_Defines.h:150
DM_SnapshotOptionType
Enumerates options that can change and whose changes are broadcast.
Definition: DM_Defines.h:169
UT_Vector3F fog_color
Definition: DM_Defines.h:252
float fpreal32
Definition: SYS_Types.h:195
DM_SelectionStyle
Definition: DM_Defines.h:54