HDK
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
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
54
enum
DM_SelectionStyle
55
{
56
DM_STYLE_UNKNOWN
= -1,
57
DM_STYLE_BOX_PICK
= 0,
58
DM_STYLE_LASSO_PICK
,
59
DM_STYLE_BRUSH_PICK
,
60
DM_STYLE_LASER_PICK
,
61
DM_STYLE_NUM_ENTRIES
// sentinel
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
87
enum
DM_SelectionFacing
{
88
DM_SEL_ALLOW_FRONT_AND_BACK
= 0,
89
DM_SEL_ALLOW_FRONT
,
90
DM_SEL_ALLOW_BACK
,
91
DM_SEL_ALLOW_NUM
92
};
93
94
enum
{
95
DM_SEL_CONNECTIVITY_VIEWPORT
= 0,
96
DM_SEL_CONNECTIVITY_3D
,
97
DM_SEL_CONNECTIVITY_UV
,
98
DM_SEL_CONNECTIVITY_NUM_ENTRIES
99
};
100
101
enum
{
102
DM_CLIPPLANE_TOP
= 0,
103
DM_CLIPPLANE_BOTTOM
,
104
DM_CLIPPLANE_LEFT
,
105
DM_CLIPPLANE_RIGHT
,
106
DM_CLIPPLANE_FRONT
,
107
DM_CLIPPLANE_BACK
,
108
DM_NUM_CLIPPLANES
109
};
110
111
// This enum must be kept in sync with the selection_mode.val radio strip
112
// in $FUSE/ViewExtra.ui!
113
enum
DM_SelectMode
114
{
115
DM_SELECTMODE_INVALID
= -1,
116
DM_SELECTMODE_OBJECT
= 0,
117
DM_SELECTMODE_GEOMETRY
,
118
DM_SELECTMODE_DYNAMICS
,
119
DM_SELECTMODE_SCENE_GRAPH
,
120
DM_NUM_SELECTMODES
// sentinel
121
};
122
123
enum
DM_DopSelectMode
124
{
125
DM_DOPSELECTMODE_DETAILS
= 0,
126
DM_DOPSELECTMODE_POINTS
,
127
DM_DOPSELECTMODE_POLYGONS
,
128
DM_NUM_DOPSELECTMODES
// sentinel
129
};
130
131
// This enum must be kept in sync with the inspect.mode.val radio strip
132
// in $FUSE/ViewExtra.ui!
133
enum
DM_InspectMode
134
{
135
DM_INSPECTMODE_OBJECTS
= 0,
136
DM_INSPECTMODE_PRIMITIVES
,
137
DM_INSPECTMODE_PIXELS
,
138
DM_NUM_INSPECTMODES
// sentinel
139
};
140
141
// This enum must be kept in sync with the infoTextMode.menu menu strip
142
// in DM_DisplayOption.ui!
143
enum
DM_InfoTextMode
144
{
145
DM_INFOTEXT_OFF
= 0,
146
DM_INFOTEXT_SELECTED_ONLY
,
147
DM_INFOTEXT_ALWAYS
148
};
149
150
enum
DM_GeoSortMode
151
{
152
DM_GEO_UNSORTED
= 0,
153
DM_GEO_SORTED_NEAR_FIRST
,
154
DM_GEO_SORTED_FAR_FIRST
,
155
};
156
157
/// mode types for snapping
158
enum
DM_SnapMode
159
{
160
DM_SNAP_MODE_NONE
= -1,
161
DM_SNAP_MODE_GRID
= 0,
162
DM_SNAP_MODE_PRIM
,
163
DM_SNAP_MODE_POINT
,
164
DM_SNAP_MODE_MULTI
,
165
DM_SNAP_MODE_LAST
// sentinel
166
};
167
168
/// Enumerates options that can change and whose changes are broadcast
169
enum
DM_SnapshotOptionType
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.
180
enum
DM_SelectionModifierKeys
181
{
182
DM_SMK_TOGGLE_REMOVE_ADD
,
// Houdini and Maya
183
DM_SMK_ADD_TOGGLE_REMOVE
,
// Softimage
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
,
203
PrimGuidePoint
,
204
PrimGuideEdge
,
205
};
206
207
// For DM_SceneManager::snapSceneGraph() and HOM
208
enum
DM_SnapSelection
209
{
210
DM_SNAP_TO_ALL
= 0,
211
DM_SNAP_TO_SELECTED
,
212
DM_SNAP_TO_NON_SELECTED
213
};
214
215
#define DM_PRIMARY_BUTTON UI_LEFT_BUTTON
216
#define DM_SECONDARY_BUTTON UI_MIDDLE_BUTTON
217
#define DM_TERTIARY_BUTTON UI_RIGHT_BUTTON
218
219
#define DM_SELECTDRAG_BUTTON UI_LEFT_BUTTON
220
#define DM_SAFESELECT_BUTTON UI_MIDDLE_BUTTON
221
#define DM_FINISH_BUTTON UI_RIGHT_BUTTON
222
223
224
#define DM_VIEW_MEMORY_NAME "View"
225
#define DM_SNAPSHOT_MEMORY_NAME "Snapshot"
226
227
#define DM_LABEL_HOFFSET 0.15
228
#define DM_LABEL_VOFFSET 0.05
229
230
class
DM_ViewportMBlurDOFParms
231
{
232
public
:
233
DM_ViewportMBlurDOFParms
()
234
:
mblur_frames
(1),
shutter
(0.5),
fps
(24.0),
frame_bias
(0),
235
dof_quality
(10),
focal_length
(10.0),
aperture
(41.4214),
fstop
(22.0),
236
beauty_only
(false) {}
237
int
mblur_frames
;
238
fpreal
shutter
;
239
fpreal
fps
;
240
int
frame_bias
;
241
int
dof_quality
;
242
fpreal
focal_length
;
243
fpreal
aperture
;
244
fpreal
fstop
;
245
bool
beauty_only
;
246
};
247
248
enum
DM_ViewportFogType
249
{
250
DM_FOG_UNIFORM
,
251
DM_FOG_VOLUME
252
};
253
254
class
DM_ViewportFogParms
255
{
256
public
:
257
DM_ViewportFogParms
()
258
:
enabled
(false),
mode
(
GUI_FOG_VOLUME_LOW
),
density
(1.0),
259
fog_color
(1.0,1.0,1.0),
opacity
(1.0),
260
start
(1.0),
end
(1000.0),
clip_dist
(100000.0),
heightmode
(0),
261
height
(100.0),
falloff
(100.0),
light_intensity
(1.0),
262
light_scatter
(1.0,1.0),
use_sun
(true),
sun_exp
(5.0)
263
{}
264
bool
enabled
;
265
GUI_FogMode
mode
;
266
fpreal32
density
;
267
fpreal32
opacity
;
268
UT_Vector3F
fog_color
;
269
fpreal32
start
;
270
fpreal32
end
;
271
fpreal32
clip_dist
;
272
int
heightmode
;
273
fpreal32
height
;
274
fpreal32
falloff
;
275
fpreal32
light_intensity
;
276
UT_Vector2F
light_scatter
;
277
bool
use_sun
;
278
fpreal
sun_exp
;
279
};
280
281
#endif
GUI_FOG_VOLUME_LOW
Definition:
GUI_RenderCommon.h:60
DM_SnapPriority::BreakPoint
DM_SNAP_MODE_PRIM
Definition:
DM_Defines.h:162
DM_ViewportMBlurDOFParms::mblur_frames
int mblur_frames
Definition:
DM_Defines.h:237
DM_STYLE_NUM_ENTRIES
Definition:
DM_Defines.h:61
DM_SnapPriority::Midpoint
DM_SNAPSHOT_COMPARE_MODE
Definition:
DM_Defines.h:175
DM_INSPECTMODE_PRIMITIVES
Definition:
DM_Defines.h:136
DM_SnapPriority::PrimGuideEdge
DM_ViewportFogParms::opacity
fpreal32 opacity
Definition:
DM_Defines.h:267
DM_CLIPPLANE_TOP
Definition:
DM_Defines.h:102
DM_ViewportFogParms::mode
GUI_FogMode mode
Definition:
DM_Defines.h:265
DM_INSPECTMODE_OBJECTS
Definition:
DM_Defines.h:135
DM_SNAP_MODE_NONE
Definition:
DM_Defines.h:160
DM_INSPECTMODE_PIXELS
Definition:
DM_Defines.h:137
DM_ViewportFogParms::start
fpreal32 start
Definition:
DM_Defines.h:269
DM_SnapPriority
DM_SnapPriority
Definition:
DM_Defines.h:194
DM_OBJ_BONE
Definition:
DM_Defines.h:80
DM_SnapMode
DM_SnapMode
mode types for snapping
Definition:
DM_Defines.h:158
start
GLuint start
Definition:
glcorearb.h:475
DM_NUM_CLIPPLANES
Definition:
DM_Defines.h:108
DM_SELECTMODE_SCENE_GRAPH
Definition:
DM_Defines.h:119
DM_STYLE_LASER_PICK
Definition:
DM_Defines.h:60
DM_SNAP_TO_ALL
Definition:
DM_Defines.h:210
UT_Vector3.h
DM_FOG_UNIFORM
Definition:
DM_Defines.h:250
DM_STYLE_LASSO_PICK
Definition:
DM_Defines.h:58
DM_SELECTMODE_INVALID
Definition:
DM_Defines.h:115
DM_ViewportFogParms::DM_ViewportFogParms
DM_ViewportFogParms()
Definition:
DM_Defines.h:257
DM_SnapPriority::PrimGuidePoint
DM_SMK_TOGGLE_REMOVE_ADD
Definition:
DM_Defines.h:182
DM_SEL_ALLOW_NUM
Definition:
DM_Defines.h:91
DM_GEO_SORTED_NEAR_FIRST
Definition:
DM_Defines.h:153
DM_InspectMode
DM_InspectMode
Definition:
DM_Defines.h:133
DM_SNAP_MODE_POINT
Definition:
DM_Defines.h:163
DM_ViewportMBlurDOFParms::fstop
fpreal fstop
Definition:
DM_Defines.h:244
DM_SNAP_MODE_MULTI
Definition:
DM_Defines.h:164
DM_OBJ_BLEND
Definition:
DM_Defines.h:82
enabled
GLenum GLenum GLsizei const GLuint GLboolean enabled
Definition:
glcorearb.h:2539
DM_DrawablePrimitive
DM_DrawablePrimitive
Definition:
DM_Defines.h:186
UT_Array.h
UT_Vector3T< fpreal32 >
DM_ViewportFogParms::light_intensity
fpreal32 light_intensity
Definition:
DM_Defines.h:275
UT_Vector2T< fpreal32 >
fpreal32
float fpreal32
Definition:
SYS_Types.h:200
DM_STYLE_BOX_PICK
Definition:
DM_Defines.h:57
DM_OBJ_GEO
Definition:
DM_Defines.h:77
DM_SNAPSHOT_HIDE_HANDLES
Definition:
DM_Defines.h:174
DM_INFOTEXT_OFF
Definition:
DM_Defines.h:145
DM_OBJ_NULL
Definition:
DM_Defines.h:81
DM_ViewportMBlurDOFParms::focal_length
fpreal focal_length
Definition:
DM_Defines.h:242
DM_SnapPriority::GridPoint
DM_ViewportMBlurDOFParms::dof_quality
int dof_quality
Definition:
DM_Defines.h:241
DM_DrawablePrimitive::Sphere
DM_OBJ_ALL
Definition:
DM_Defines.h:84
DM_ViewportMBlurDOFParms::frame_bias
int frame_bias
Definition:
DM_Defines.h:240
height
GLint GLsizei GLsizei height
Definition:
glcorearb.h:103
DM_NUM_SELECTMODES
Definition:
DM_Defines.h:120
DM_SnapPriority::GeoPoint
DM_SELECTMODE_GEOMETRY
Definition:
DM_Defines.h:117
DM_SEL_CONNECTIVITY_NUM_ENTRIES
Definition:
DM_Defines.h:98
DM_SNAPSHOT_FACTOR_VALUE
Definition:
DM_Defines.h:172
DM_InfoTextMode
DM_InfoTextMode
Definition:
DM_Defines.h:143
DM_ViewportFogParms::height
fpreal32 height
Definition:
DM_Defines.h:273
DM_SelectionFacing
DM_SelectionFacing
Definition:
DM_Defines.h:87
DM_ViewportFogParms::light_scatter
UT_Vector2F light_scatter
Definition:
DM_Defines.h:276
end
GLuint GLuint end
Definition:
glcorearb.h:475
DM_OBJ_OTHER
Definition:
DM_Defines.h:83
DM_DopSelectMode
DM_DopSelectMode
Definition:
DM_Defines.h:123
DM_ViewportFogParms::end
fpreal32 end
Definition:
DM_Defines.h:270
DM_SELECTMODE_OBJECT
Definition:
DM_Defines.h:116
GUI_FogMode
GUI_FogMode
Definition:
GUI_RenderCommon.h:58
DM_SEL_CONNECTIVITY_VIEWPORT
Definition:
DM_Defines.h:95
DM_SelectMode
DM_SelectMode
Definition:
DM_Defines.h:113
RE_Types.h
DM_GEO_UNSORTED
Definition:
DM_Defines.h:152
DM_FOG_VOLUME
Definition:
DM_Defines.h:251
DM_ViewportMBlurDOFParms::DM_ViewportMBlurDOFParms
DM_ViewportMBlurDOFParms()
Definition:
DM_Defines.h:233
DM_ViewportFogParms
Definition:
DM_Defines.h:254
DM_SelectionModifierKeys
DM_SelectionModifierKeys
Definition:
DM_Defines.h:180
DM_SNAP_MODE_GRID
Definition:
DM_Defines.h:161
DM_SEL_ALLOW_FRONT
Definition:
DM_Defines.h:89
UT_Vector2.h
DM_ViewportFogParms::heightmode
int heightmode
Definition:
DM_Defines.h:272
mode
GLenum mode
Definition:
glcorearb.h:99
DM_DrawablePrimitive::Tube
DM_SnapSelection
DM_SnapSelection
Definition:
DM_Defines.h:208
DM_ViewportFogParms::clip_dist
fpreal32 clip_dist
Definition:
DM_Defines.h:271
DM_ViewportFogParms::enabled
bool enabled
Definition:
DM_Defines.h:264
DM_ViewportMBlurDOFParms::beauty_only
bool beauty_only
Definition:
DM_Defines.h:245
DM_SnapPriority::GeoEdge
DM_INFOTEXT_SELECTED_ONLY
Definition:
DM_Defines.h:146
DM_DOPSELECTMODE_POLYGONS
Definition:
DM_Defines.h:127
DM_CLIPPLANE_BOTTOM
Definition:
DM_Defines.h:103
DM_DrawablePrimitive::Circle
DM_SNAP_TO_NON_SELECTED
Definition:
DM_Defines.h:212
DM_ViewportMBlurDOFParms::fps
fpreal fps
Definition:
DM_Defines.h:239
DM_CLIPPLANE_LEFT
Definition:
DM_Defines.h:104
DM_ViewportFogParms::density
fpreal32 density
Definition:
DM_Defines.h:266
DM_SEL_CONNECTIVITY_UV
Definition:
DM_Defines.h:97
DM_SNAP_MODE_LAST
Definition:
DM_Defines.h:165
fpreal
fpreal64 fpreal
Definition:
SYS_Types.h:277
DM_NUM_INSPECTMODES
Definition:
DM_Defines.h:138
DM_CLIPPLANE_FRONT
Definition:
DM_Defines.h:106
DM_GeoSortMode
DM_GeoSortMode
Definition:
DM_Defines.h:150
DM_DOPSELECTMODE_DETAILS
Definition:
DM_Defines.h:125
DM_DOPSELECTMODE_POINTS
Definition:
DM_Defines.h:126
DM_STYLE_BRUSH_PICK
Definition:
DM_Defines.h:59
DM_STYLE_UNKNOWN
Definition:
DM_Defines.h:56
GUI_RenderCommon.h
DM_OBJ_CAM
Definition:
DM_Defines.h:78
DM_SnapPriority::Primitive
DM_SEL_ALLOW_BACK
Definition:
DM_Defines.h:90
DM_INFOTEXT_ALWAYS
Definition:
DM_Defines.h:147
GU_SelectType.h
DM_SNAPSHOT_VISIBLE_OBJECTS
Definition:
DM_Defines.h:173
DM_ViewportMBlurDOFParms
Definition:
DM_Defines.h:230
DM_SNAPSHOT_HIDE_AT_SOURCE
Definition:
DM_Defines.h:171
DM_ViewportFogType
DM_ViewportFogType
Definition:
DM_Defines.h:248
DM_SnapshotOptionType
DM_SnapshotOptionType
Enumerates options that can change and whose changes are broadcast.
Definition:
DM_Defines.h:169
DM_SMK_ADD_TOGGLE_REMOVE
Definition:
DM_Defines.h:183
DM_SEL_CONNECTIVITY_3D
Definition:
DM_Defines.h:96
DM_ViewportFogParms::falloff
fpreal32 falloff
Definition:
DM_Defines.h:274
DM_SnapPriority::GridEdge
DM_ViewportFogParms::fog_color
UT_Vector3F fog_color
Definition:
DM_Defines.h:268
DM_ViewportFogParms::use_sun
bool use_sun
Definition:
DM_Defines.h:277
DM_SELECTMODE_DYNAMICS
Definition:
DM_Defines.h:118
DM_ViewportFogParms::sun_exp
fpreal sun_exp
Definition:
DM_Defines.h:278
DM_ViewportMBlurDOFParms::shutter
fpreal shutter
Definition:
DM_Defines.h:238
DM_SEL_ALLOW_FRONT_AND_BACK
Definition:
DM_Defines.h:88
DM_ViewportMBlurDOFParms::aperture
fpreal aperture
Definition:
DM_Defines.h:243
BM_KeyBindings.h
DM_SelectionStyle
DM_SelectionStyle
Definition:
DM_Defines.h:54
DM_SNAP_TO_SELECTED
Definition:
DM_Defines.h:211
DM_OBJ_LIGHT
Definition:
DM_Defines.h:79
DM_CLIPPLANE_RIGHT
Definition:
DM_Defines.h:105
DM_CLIPPLANE_BACK
Definition:
DM_Defines.h:107
DM_NUM_DOPSELECTMODES
Definition:
DM_Defines.h:128
DM_GEO_SORTED_FAR_FIRST
Definition:
DM_Defines.h:154
DM
DM_Defines.h
Generated on Sat Dec 21 2024 02:46:35 for HDK by
1.8.6