GraphicsConstants.h

Go to the documentation of this file.
00001 //
00002 // Copyright 2010 Autodesk, Inc.  All rights reserved.
00003 //
00004 // Use of this software is subject to the terms of the Autodesk license
00005 // agreement provided at the time of installation or download, or which
00006 // otherwise accompanies this software in either electronic or hard copy form.  
00007 //
00008 //
00009 #pragma once
00010 #include <WTypes.h>
00011 
00016 #define DISP_VERTTICKS      (1<<0)  //!< Display vertices as tick marks.
00017 #define DISP_BEZHANDLES     (1<<1)  //!< Display Bezier handles.
00018 #define DISP_OBJSELECTED    (1<<8)  //!< Mimics COMP_OBJSELECTED in mesh.h 
00019 #define DISP_SELVERTS       (1<<10) //!< Display selected vertices. 
00020 #define DISP_SELFACES       (1<<11) //!< Display selected faces. 
00021 #define DISP_SELSEGMENTS    (1<<11) //!< Display selected segments.
00022 #define DISP_SELPATCHES     (1<<11) //!< Display selected patches.
00023 #define DISP_SELEDGES       (1<<12) //!< Display selected edges.
00024 #define DISP_SELPOLYS       (1<<13) //!< Display selected polygons.
00025 #define DISP_SELHANDLES     (1<<14) //!< Display selected handles.
00026 #define DISP_UNSELECTED     (1<<14) //!< Used by loft -- Shape unselected
00027 #define DISP_SELECTED       (1<<15) //!< Used by loft -- Shape selected
00028 #define DISP_LATTICE        (1<<16)
00029 #define DISP_ATSHAPELEVEL   (1<<16) //!< Used by loft -- Shape at current level 
00030 #define DISP_VERT_NUMBERS   (1<<17) //!< When this bit is set, and vertex ticks are being displayed, the shape is drawn with vertex numbers in addition to the ticks.
00031 #define DISP_VERTS          (1<<17)
00032 #define DISP_VERT_NUMBERS_SELONLY   (1<<18) //!< When this bit is set and the DISP_VERT_NUMBERS bit is set, only the numbers of selected vertices are displayed.
00033 #define DISP_SPLINES_ORTHOG (1<<25)  //!< Not displayed, but splines to be created orthogonally
00034 
00035 
00044 #define PSHAPE_BUILTIN_STEPS -2     //!< Uses the shape's built-in steps/adaptive settings (default) 
00045 #define PSHAPE_ADAPTIVE_STEPS -1    //!< Forces adaptive steps 
00046 
00047 
00048 
00052 #define SHAPE_OBJECT        (1<<0) //!< Object level selection. 
00053 #define SHAPE_SPLINE        (1<<1) //!< Spline level selection (a single polygon within the shape).
00054 #define SHAPE_SEGMENT       (1<<2) //!< Segment level selection.
00055 #define SHAPE_VERTEX        (1<<3) //!< Vertex level selection.
00056 
00057 
00058 // Arguments for the Flag parameter of the internal function BezierShape::SubObjectHitTest()
00059 // these are the same bits used for object level.*/
00060 #define SUBHIT_SHAPE_SELONLY    (1<<0)
00061 #define SUBHIT_SHAPE_UNSELONLY  (1<<2)
00062 #define SUBHIT_SHAPE_ABORTONHIT (1<<3)
00063 #define SUBHIT_SHAPE_SELSOLID   (1<<4)
00064 
00065 #define SUBHIT_SHAPE_VERTS      (1<<24)
00066 #define SUBHIT_SHAPE_SEGMENTS   (1<<25)
00067 #define SUBHIT_SHAPE_POLYS      (1<<26)
00068 #define SUBHIT_SHAPE_TYPEMASK   (SUBHIT_SHAPE_VERTS|SUBHIT_SHAPE_SEGMENTS|SUBHIT_SHAPE_POLYS)
00069 
00070 
00071 
00076 #define IPB_STEPS       0
00077 #define IPB_OPTIMIZE    1
00078 #define IPB_ADAPTIVE    2
00079 
00080 
00083 #define DEF_STEPS 6
00084 #define DEF_OPTIMIZE TRUE
00085 #define DEF_ADAPTIVE FALSE
00086 #define DEF_RENDERABLE FALSE
00087 #define DEF_DISPRENDERMESH FALSE
00088 //#define DEF_USEVIEWPORT FALSE
00089 #define DEF_RENDERABLE_THICKNESS 1.0f
00090 #define DEF_RENDERABLE_SIDES 12
00091 #define DEF_RENDERABLE_ANGLE 0.0f
00092 #define DEF_GENUVS FALSE
00093 
00094 
00098 #define PARAM_SIMPLE 0      // Parameter space based on segments
00099 #define PARAM_NORMALIZED 1  // Parameter space normalized to curve length
00100 
00101 
00104 #define GW_DRV_RENDERER     0 
00105 #define GW_DRV_DEVICE       1 
00106 
00107 
00109 
00110 #define GW_HEIDI            0
00111 #define GW_OPENGL           1
00112 #define GW_DIRECT3D         2
00113 #define GW_HEIDI3D          3
00114 #define GW_NULL             4
00115 #define GW_CUSTOM           5
00116 #define GW_NITROUS          6
00117 
00118 
00122 #define POINT_RGN   0x0001
00123 #define RECT_RGN    0x0002
00124 #define CIRCLE_RGN  0x0004
00125 #define FENCE_RGN   0x0008
00126 
00127 
00129 
00130 #define RGN_DIR_UNDEF   -1
00131 #define RGN_DIR_RIGHT   0   
00132 #define RGN_DIR_LEFT    1
00133 
00134 
00136 
00137 const double pi        = 3.141592653589793;         
00138 const double piOver180 = 3.141592653589793 / 180.0; 
00139 
00140 
00143 
00144 #define AC_DIR_RL_CROSS     0 //!< Right to left implies crossing (AutoCAD compatible)
00145 #define AC_DIR_LR_CROSS     1 //!< Left to right implies crossing (AutoCAD incompatible)
00146 
00147 
00149 
00150 #define WM_SHUTDOWN         (WM_USER+2001) 
00151 #define WM_INIT_COMPLETE    (WM_USER+2002)
00152 
00153 
00155 
00156 #define GW_MAX_FILE_LEN     128 
00157 #define GW_MAX_CAPTION_LEN  128 
00158 #define GW_MAX_VERTS        32
00159 #define GFX_MAX_STRIP       100
00160 #define GFX_MAX_TEXTURES    8
00161 
00162 
00164 
00165 #define GW_NO_ATTS              0x0000000
00166 #define GW_WIREFRAME            0x0000001
00167 #define GW_ILLUM                0x0000002
00168 #define GW_FLAT                 0x0000004
00169 #define GW_SPECULAR             0x0000008
00170 #define GW_TEXTURE              0x0000010
00171 #define GW_Z_BUFFER             0x0000020
00172 #define GW_PERSP_CORRECT        0x0000040
00173 #define GW_POLY_EDGES           0x0000080
00174 #define GW_BACKCULL             0x0000100
00175 #define GW_TWO_SIDED            0x0000200
00176 #define GW_COLOR_VERTS          0x0000400
00177 #define GW_SHADE_CVERTS         0x0000800
00178 #define GW_PICK                 0x0001000
00179 #define GW_BOX_MODE             0x0002000
00180 #define GW_ALL_EDGES            0x0004000
00181 #define GW_VERT_TICKS           0x0008000
00182 #define GW_SHADE_SEL_FACES      0x0010000
00183 #define GW_TRANSPARENCY         0x0020000
00184 #define GW_TRANSPARENT_PASS     0x0040000
00185 #define GW_EMISSIVE_VERTS       0x0080000
00186 #define GW_ALL_OPAQUE           0x0100000
00187 #define GW_EDGES_ONLY           0x0200000
00188 #define GW_CONSTANT             0x0400000
00189 #define GW_HIDDENLINE           0x0800000 //!< Similar to GW_CONSTANT but the shade color will be the color of the background.
00190 #define GW_BLENDING             0x1000000
00191 #define GW_DEPTHWRITE_DISABLE   0x2000000 //!< Disables writing into the depth buffer
00192 
00193 
00195 
00196 #define GW_LIGHTING         (GW_ILLUM | GW_SPECULAR)
00197 
00198 
00200 
00201 #define GW_SHAPE_RECT       0
00202 #define GW_SHAPE_CIRCULAR   1
00203 
00204 
00206 
00207 #define GW_TEX_NO_TILING    0
00208 #define GW_TEX_REPEAT       1
00209 #define GW_TEX_MIRROR       2
00210 
00211 
00212 
00214 
00215 #define GW_TEX_LEAVE                0   //!< Use the source pixel value
00216 #define GW_TEX_REPLACE              1   //!< Use the texture pixel value
00217 #define GW_TEX_MODULATE             2   //!< Multiply the source with the texture
00218 #define GW_TEX_ADD                  3   //!< Add the source and texture
00219 #define GW_TEX_ADD_SIGNED           4   //!< Add the source and texture with an 0.5 subtraction
00220 #define GW_TEX_SUBTRACT             5   //!< Subtract the source from the texture
00221 #define GW_TEX_ADD_SMOOTH           6   //!< Add the source and the texture then subtract their product
00222 #define GW_TEX_ALPHA_BLEND          7   //!< Alpha blend the texture with the source
00223 #define GW_TEX_PREMULT_ALPHA_BLEND  8   //!< Alpha blend the the source with a premultiplied alpha texture
00224 #define GW_TEX_ALPHA_BLEND2         9   //!< Alpha blend the the source with a premultiplied alpha texture with GL_MODULATE as the tex env instead of GL_DECAL.
00225 
00226 
00228 
00229 #define GW_TEX_SCALE_1X     0   //!< Multiply the tex op result by 1
00230 #define GW_TEX_SCALE_2X     1   //!< Multiply the tex op result by 2
00231 #define GW_TEX_SCALE_4X     2   //!< Multiply the tex op result by 4
00232 
00233 
00235 
00236 #define GW_TEX_ZERO         0   //!< Use no alpha value
00237 #define GW_TEX_SOURCE       1   //!< Use the source alpha
00238 #define GW_TEX_TEXTURE      2   //!< Use the texture alpha
00239 #define GW_TEX_CONSTANT     3   //!< Use a constant BGRA color as an alpha
00240 #define GW_TEX_PREVIOUS     4   //!< Use the previous texture stage alpha
00241 
00242 
00244 
00245 #define GW_LEFT_PLANE       0x0100
00246 #define GW_RIGHT_PLANE      0x0200
00247 #define GW_BOTTOM_PLANE     0x0400
00248 #define GW_TOP_PLANE        0x0800
00249 #define GW_FRONT_PLANE      0x1000
00250 #define GW_BACK_PLANE       0x2000
00251 #define GW_PLANE_MASK       0x3f00
00252 
00253 
00255 
00256 #define GW_EDGE_SKIP        0
00257 #define GW_EDGE_VIS         1
00258 #define GW_EDGE_INVIS       2
00259 
00260 
00262 
00263 #define BUF_F_BUFFER        0
00264 #define BUF_Z_BUFFER        1
00265 
00266 
00269 
00270 #define GW_DOES_SUPPORT         TRUE
00271 #define GW_DOES_NOT_SUPPORT     FALSE
00272 
00273 
00276 
00277 #define GW_SPT_TXT_CORRECT      0   //!< Allow perspective correction to be toggled?
00278 #define GW_SPT_GEOM_ACCEL       1   //!< Do 3D xforms, clipping, lighting thru driver?
00279 #define GW_SPT_TRI_STRIPS       2   //!< Send down strips instead of individual triangles?
00280 #define GW_SPT_DUAL_PLANES      3   //!< Allow dual planes to be used?
00281 #define GW_SPT_SWAP_MODEL       4   //!< Update viewports with complete redraw on WM_PAINT?
00282 #define GW_SPT_INCR_UPDATE      5   //!< Redraw only damaged areas on object move?
00283 #define GW_SPT_1_PASS_DECAL     6   //!< Do decaling with only one pass?
00284 #define GW_SPT_DRIVER_CONFIG    7   //!< Allow driver config dialog box?
00285 #define GW_SPT_TEXTURED_BKG     8   //!< Is viewport background a texture?
00286 #define GW_SPT_VIRTUAL_VPTS     9   //!< Are viewports bigger than the window allowed?
00287 #define GW_SPT_PAINT_DOES_BLIT  10  //!< Does WM_PAINT cause a backbuffer blit?
00288 #define GW_SPT_WIREFRAME_STRIPS 11  //!< Are wireframe objects are sent as tristrips?
00289 #define GW_SPT_ORG_UPPER_LEFT   12  //!< Is the device origin at upper left?
00290 #define GW_SPT_ARRAY_PROCESSING 13  //!< Can the drive handle vertex array data?
00291 #define GW_SPT_NUM_LIGHTS       14  //!< Number of lights supported?
00292 #define GW_SPT_NUM_TEXTURES     15  //!< Number of multitexture stages supported?
00293 #define GW_SPT_WIRE_FACES       16  //!< Support for wireframe faces with visibility flags?
00294 #define GW_SPT_TOTAL            17  //!< The maximum number of support queries.
00295 
00296 
00298 
00299 #define GW_DISPLAY_MAXIMIZED    1
00300 #define GW_DISPLAY_WINDOWED     2
00301 #define GW_DISPLAY_INVISIBLE    3
00302 
00303 
00305 
00306 #define GW_PASS_ONE             0
00307 #define GW_PASS_TWO             1
00308 
00309 
00312 
00313 #define GW_ATTEN_NONE       0x0000
00314 #define GW_ATTEN_START      0x0001
00315 #define GW_ATTEN_END        0x0002
00316 #define GW_ATTEN_LINEAR     0x0010
00317 #define GW_ATTEN_QUAD       0x0020
00318 
00319 
00324 
00325 #define SYSTEM_LOCK_RETURN 0x001 
00326 #define SYSTEM_REMOTE_RETURN 0x002 
00327