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_MATTE, // Solid, constant color/alpha, depth-check
63  GR_RENDER_XRAY, // XRay Render geometry
64  GR_RENDER_OBJECT_PICK, // Object selection
65  GR_RENDER_SHADER_AS_IS, // Render the geometry without setting a shader
66  GR_RENDER_SNAP, // Render geometry attribs {N.x, N.y, Z}
67 
68  // Bounding box modes
69  GR_RENDER_BBOX, // Bounding boxes only
70 
71  GR_RENDER_POST_PASS, // A post-pass was requested by a primitive
72 
76 };
77 
78 // bitfield for modifying the basic GR_RenderMode. A flag may not apply to all
79 // render modes (like a FLAT_SHADED and GR_RENDER_WIREFRAME combination).
81 {
83 
94 
98  GR_RENDER_FLAG_IMAGE = 0xC00, // alias to UV Pos
99 
104 
107 };
108 
110 {
111  GR_ALPHA_PASS_OPAQUE = 0x1, // Only opaque objects
112  GR_ALPHA_PASS_NORMAL = 0x2, // All transparent objects
113  GR_ALPHA_PASS_INVISIBLE = 0x4, // Don't render in any pass.
114 
115  GR_ALPHA_PASS_ALL = 0x3 // Ignore alpha and render all objects.
116 };
117 
119 {
120  GR_SHADING_SOLID, // only draw solid objects
121  GR_SHADING_WIREFRAME, // only draw wireframe objects
122  GR_SHADING_LIGHT_MASK, // HQ Lighting - only the mask
123  GR_SHADING_ANY // ignore object shading mode; draw everything.
124 };
125 
127 {
131 };
132 
134 {
139 };
140 
142 {
144 
152 
159 
164 
165  GR_MAX_DECORATIONS, // max number of builtin decorations
166 
169 };
170 
172 {
177 };
178 
180 {
185 
187 };
188 
190 {
194 
196 };
197 
199 {
201 
207 };
208 
210 {
217 };
218 
220 {
228 };
229 
231 {
232  GR_PICK_NONE = 0x0000,
233 
234  // For single picking from a buffer.
235  GR_PICK_SINGLE = 0x0001,
236 
237  // For multi-component picking.
241 
242  // For picking in UV viewports.
245  GR_PICK_UV_FLAG = 0x0300,
246 
247  // Indicates we are picking to do snapping.
249  // Don't allow picking of selected components (mostly to avoid snapping
250  // to geometry that is being moved).
252  // Invert the sense of the box/lasso/paint pick (outside is selected)
253  GR_PICK_OUTSIDE = 0x4000,
254  // As if the surface was wireframe
255  GR_PICK_AS_WIRE = 0x8000,
256 
257  // As if the surface was one solid shape
258  GR_PICK_PACKED = 0x10000,
259 
260  // OpenGL 4.2 (GL_ARB_image_load_store) based picking.
261  GR_PICK_GL42 = 0x1000000
262 };
263 
265 {
266 public:
268  : myUseObjectNodes(true),
269  myPickNonSelectable(false),
270  myPickTemplates(false),
271  myPickGhosted(true),
272  myPickXray(false)
273  { }
274 
275  // Controls whether details must be associated with object nodes. If false,
276  // any displayed detail is considered an "object" for picking purposes.
278 
283 };
284 
285 // bitfield for why GR_Primitive::update() was called.
286 // be sure to update GUI_RenderCommon.h:GUI_SetupResult if the bitfield gets
287 // larger than 0x8000.
289 {
290  GR_UNCHANGED = 0x0,
291 
292  GR_GEO_CHANGED = 0x001,
304  GR_LOD_CHANGED = 0x1000,
312 };
313 
315 {
317 
322 
323  // These don't strictly exist as attribute types,
324  // but are useful for selections.
327 
328  GR_ALL_ATTRIBS = 0xFFFFFFFF
329 };
330 
332 {
336 };
337 
339 {
340  GR_BASE_PRIM_NORMAL, // most primitives are normal prim types.
341 
342  GR_BASE_PRIM_PACKED, // container primitives
347 
348  GR_BASE_PRIM_VISUALIZE // visualizer output
349 };
350 
352 {
357 };
358 
360 {
363 };
364 
365 #include <UT/UT_Array.h>
366 #include <UT/UT_Pair.h>
368 
369 #endif
GR_DecorRenderFlags
Definition: GR_Defines.h:209
GR_DecorationOverride
Definition: GR_Defines.h:198
GR_ParticleType
Definition: GR_Defines.h:133
GR_DecorFontType
Definition: GR_Defines.h:189
GR_AttribMask
Definition: GR_Defines.h:314
GR_AgentWireMode
Definition: GR_Defines.h:359
UT_Array< UT_Pair< UT_Matrix4D, UT_Vector2i > > GR_FrustumList
Definition: GR_Defines.h:367
GR_Decoration
Definition: GR_Defines.h:141
GR_AlphaPass
Definition: GR_Defines.h:109
GR_DecorVisibility
Definition: GR_Defines.h:171
GR_ShadingPass
Definition: GR_Defines.h:118
GR_RenderMode
Definition: GR_Defines.h:44
GR_BasePrimType
Definition: GR_Defines.h:338
GR_ShadingMode
Definition: GR_Defines.h:29
GR_DecorFontSize
Definition: GR_Defines.h:179
GR_UpdateReason
Definition: GR_Defines.h:288
GR_PrimAcceptResult
Definition: GR_Defines.h:331
GR_RenderFlags
Definition: GR_Defines.h:80
GR_RenderVersion
Definition: GR_Defines.h:21
GR_LightingPass
Definition: GR_Defines.h:126
GR_BoundaryMode
Definition: GR_Defines.h:351
GR_SelectMode
Definition: GR_Defines.h:219
GR_PickStyle
Definition: GR_Defines.h:230