HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GR_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: GR_Defines.h
7  *
8  * COMMENTS: Drawing definitions for the render library.
9  *
10  */
11 
12 
13 #ifndef __GR_Defines_h__
14 #define __GR_Defines_h__
15 
16 #include <UT/UT_VectorTypes.h>
17 
18 #define GR_DRAW_WIREFRAME 0x01
19 #define GR_DRAW_SHADED 0x02
20 
22 {
26 };
27 
28 // public shading modes the user can see
30 {
41 };
42 
43 // private shading modes the renderer uses
45 {
46  // Beauty modes
47  GR_RENDER_BEAUTY, // Shaded, lit
48  GR_RENDER_MATERIAL, // Shaded, material components for HQ Lighting
49  GR_RENDER_CONSTANT, // Solid, constant color/alpha
50 
51  // Wireframe modes
52  GR_RENDER_WIREFRAME, // Line outline
53  GR_RENDER_HIDDEN_LINE, // Line outline, hidden lines removed
54  GR_RENDER_XRAY_LINE, // Line outline, hidden lines dimmed
55  GR_RENDER_GHOST_LINE, // Line outline, BG color fill w/ghost color
56  GR_RENDER_MATERIAL_WIREFRAME, // Line outline pass following material pass
57 
58  // Utility modes
59  GR_RENDER_DEPTH, // Solid, depth only
60  GR_RENDER_DEPTH_CUBE, // Depth only, 6 faces of a cubemap
61  GR_RENDER_DEPTH_LINEAR, // Solid, depth only, non-projected depth
62  GR_RENDER_DEPTH_CASCADING, // Depth only, cascaching shadowmap
63  GR_RENDER_MATTE, // Solid, constant color/alpha, depth-check
64  GR_RENDER_XRAY, // XRay Render geometry
65  GR_RENDER_OBJECT_PICK, // Object selection
66  GR_RENDER_SHADER_AS_IS, // Render the geometry without setting a shader
67  GR_RENDER_SNAP, // Render geometry attribs {N.x, N.y, Z}
68 
69  // Bounding box modes
70  GR_RENDER_BBOX, // Bounding boxes only
71 
72  GR_RENDER_POST_PASS, // A post-pass was requested by a primitive
73 
77 };
78 
79 // bitfield for modifying the basic GR_RenderMode. A flag may not apply to all
80 // render modes (like a FLAT_SHADED and GR_RENDER_WIREFRAME combination).
82 {
84 
95 
99  GR_RENDER_FLAG_IMAGE = 0xC00, // alias to UV Pos
100 
105 
108 };
109 
111 {
112  GR_ALPHA_PASS_OPAQUE = 0x1, // Only opaque objects
113  GR_ALPHA_PASS_NORMAL = 0x2, // All transparent objects
114  GR_ALPHA_PASS_INVISIBLE = 0x4, // Don't render in any pass.
115 
116  GR_ALPHA_PASS_ALL = 0x3 // Ignore alpha and render all objects.
117 };
118 
120 {
121  GR_SHADING_SOLID, // only draw solid objects
122  GR_SHADING_WIREFRAME, // only draw wireframe objects
123  GR_SHADING_LIGHT_MASK, // HQ Lighting - only the mask
124  GR_SHADING_ANY // ignore object shading mode; draw everything.
125 };
126 
128 {
132 };
133 
135 {
140 };
141 
143 {
145 
153 
160 
165 
166  GR_MAX_DECORATIONS, // max number of builtin decorations
167 
170 };
171 
173 {
178 };
179 
181 {
186 
188 };
189 
191 {
195 
197 };
198 
200 {
202 
208 };
209 
211 {
218 };
219 
221 {
229 };
230 
232 {
233  GR_PICK_NONE = 0x0000,
234 
235  // For single picking from a buffer.
236  GR_PICK_SINGLE = 0x0001,
237 
238  // For multi-component picking.
242 
243  // For picking in UV viewports.
246  GR_PICK_UV_FLAG = 0x0300,
247 
248  // Indicates we are picking to do snapping.
250  // Don't allow picking of selected components (mostly to avoid snapping
251  // to geometry that is being moved).
253  // Invert the sense of the box/lasso/paint pick (outside is selected)
254  GR_PICK_OUTSIDE = 0x4000,
255  // As if the surface was wireframe
256  GR_PICK_AS_WIRE = 0x8000,
257 
258  // As if the surface was one solid shape
259  GR_PICK_PACKED = 0x10000,
260 
261  // OpenGL 4.2 (GL_ARB_image_load_store) based picking.
262  GR_PICK_GL42 = 0x1000000
263 };
264 
266 {
267 public:
269  : myUseObjectNodes(true),
270  myPickNonSelectable(false),
271  myPickTemplates(false),
272  myPickGhosted(true),
273  myPickXray(false)
274  { }
275 
276  // Controls whether details must be associated with object nodes. If false,
277  // any displayed detail is considered an "object" for picking purposes.
279 
284 };
285 
286 // bitfield for why GR_Primitive::update() was called.
287 // be sure to update GUI_RenderCommon.h:GUI_SetupResult if the bitfield gets
288 // larger than 0x8000.
290 {
291  GR_UNCHANGED = 0x0,
292 
293  GR_GEO_CHANGED = 0x001,
305  GR_LOD_CHANGED = 0x1000,
313 };
314 
316 {
318 
323 
324  // These don't strictly exist as attribute types,
325  // but are useful for selections.
328 
329  GR_ALL_ATTRIBS = 0xFFFFFFFF
330 };
331 
333 {
337 };
338 
340 {
341  GR_BASE_PRIM_NORMAL, // most primitives are normal prim types.
342 
343  GR_BASE_PRIM_PACKED, // container primitives
348 
349  GR_BASE_PRIM_VISUALIZE // visualizer output
350 };
351 
353 {
358 };
359 
361 {
364 };
365 
366 #include <UT/UT_Array.h>
367 #include <utility>
369 
370 #endif
GR_DecorRenderFlags
Definition: GR_Defines.h:210
GR_DecorationOverride
Definition: GR_Defines.h:199
GR_ParticleType
Definition: GR_Defines.h:134
GR_DecorFontType
Definition: GR_Defines.h:190
GR_AttribMask
Definition: GR_Defines.h:315
GR_AgentWireMode
Definition: GR_Defines.h:360
GR_Decoration
Definition: GR_Defines.h:142
GR_AlphaPass
Definition: GR_Defines.h:110
GR_DecorVisibility
Definition: GR_Defines.h:172
GR_ShadingPass
Definition: GR_Defines.h:119
GR_RenderMode
Definition: GR_Defines.h:44
GR_BasePrimType
Definition: GR_Defines.h:339
GR_ShadingMode
Definition: GR_Defines.h:29
GR_DecorFontSize
Definition: GR_Defines.h:180
GR_UpdateReason
Definition: GR_Defines.h:289
GR_PrimAcceptResult
Definition: GR_Defines.h:332
GR_RenderFlags
Definition: GR_Defines.h:81
UT_Array< std::pair< UT_Matrix4D, UT_Vector2i > > GR_FrustumList
Definition: GR_Defines.h:368
GR_RenderVersion
Definition: GR_Defines.h:21
GR_LightingPass
Definition: GR_Defines.h:127
GR_BoundaryMode
Definition: GR_Defines.h:352
GR_SelectMode
Definition: GR_Defines.h:220
GR_PickStyle
Definition: GR_Defines.h:231