Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

RmDefines.h

00001 //=================================================================================================//
00002 // filename: RmDefines.h                                                                          //
00003 //                                                                                                 //
00004 //           ATI Research, Inc.                                                                    //
00005 //           3D Application Research Group                                                         //
00006 //                                                                                                 //
00007 // Description: declaration file for RenderMonkey real-time Framework.                             //
00008 //                                                                                                 //
00009 //=================================================================================================//
00010 //   (C) 2004 ATI Research, Inc.  All rights reserved.                                             //
00011 //=================================================================================================//
00012 
00013 #ifndef _RM_CORE_DEFINES_H_
00014 #define _RM_CORE_DEFINES_H_
00015 
00016 //==================================================================================================//
00017 // RenderMonkey plug-in/application messages. These are the messages propagated by the application  //
00018 // at run-time to communicate with the opened plug-ins. A plug-in can send out a custom message,    //
00019 // however, the message will be broadcast either to all opened plug-ins or to all plug-ins of the   //
00020 // specified type. See IRmApplication interface BroadcastMessage() methods for more details.        //
00021 //==================================================================================================//
00022 
00023 //--------------------------------------------------------------------------------------------------//
00024 // Run-time database related messages
00025 //--------------------------------------------------------------------------------------------------//
00026 
00027 // A given node was updated, int nMessageData to the message handler contains RmNode* that was updated
00028 #define  RM_MSG_NODE_UPDATED              1  
00029 
00030 // This message gets sent out before a given node will be deleted from its place in the database
00031 // All of the other nodes that may have been referencing the node to be deleted are still pointing
00032 // to the node at this point. After this message the node will be removed from the database.
00033 // int nMessageData to the message handler contains RmNode* that was deleted
00034 #define  RM_MSG_NODE_ABOUT_TO_BE_DELETED  2  
00035 
00036 // This message gets sent out after a node was deleted (removed from the database). 
00037 // int nMessageData to the message handler contains RmNode* that was deleted
00038 #define  RM_MSG_NODE_DELETED              3  
00039 
00040 // A given node was added to the workspace. int nMessageData to the message handler contains RmNode* 
00041 // that was added to the workspace:
00042 #define  RM_MSG_NODE_ADDED                4
00043 
00044 // A given node name was changed, int nMessageData to the message handler contains RmNode* that was updated
00045 // int nMessageParameter contains a pointer to RmStringT (RmStringT*) which contains the old name (before
00046 // rename happened) of the specified node:
00047 #define  RM_MSG_NODE_NAME_CHANGED         5  
00048 
00049 // A given node value was changed, int nMessageData to the message handler contains RmNode* that was updated
00050 #define  RM_MSG_NODE_VALUE_CHANGED        6  
00051 
00052 // This message is used to notify plug-ins that a particular docking pane was created
00053 // The 'nMessageData' parameter is the integer ID for this docking pane. Any plug-in that
00054 // owns that docking pane window should create the window for it upon receiving this message:
00055 #define  RM_MSG_DOCKPANE_CREATED          7
00056 
00057 // This message is sent out when variable node's semantic is changed. The 'nMessageData' field
00058 // of this message contains a pointer to the variable node which semantic was changed
00059 #define  RM_MSG_VARIABLE_SEMANTIC_CHANGED 8
00060 
00061 // This message is sent out when a model's orientation is changed. The 'nMessageData' field
00062 // of this message contains a pointer to the model node whose orientation was changed
00063 #define  RM_MSG_MODEL_ORIENTATION_CHANGED 9
00064 
00065 // This message is sent out when a texture's origin is changed. The 'nMessageData' field
00066 // of this message contains a pointer to the texture node whose origin was changed
00067 #define  RM_MSG_TEXTURE_ORIGIN_CHANGED 10
00068 
00069 // This message is sent out when a the application is beginning a message block.
00070 // This message will not get sent out for nested message blocks, only for the outermost.
00071 #define  RM_MSG_BEGIN_MESSAGE_BLOCK    11
00072 
00073 // This message is sent out when a the application is ending a message block.
00074 // This message will not get sent out for nested message blocks, only for the outermost.
00075 #define  RM_MSG_END_MESSAGE_BLOCK      12
00076 
00077 // This message is sent out when a node is to be selected in an interface.
00078 // The 'nMessageData' field of this message contains a pointer to the node
00079 #define  RM_MSG_NODE_SELECTED          13
00080 
00081 // Reserved number of run-time database-specific messages:
00082 #define  RM_NUM_DATABASE_MSGS             30
00083 
00084 //--------------------------------------------------------------------------------------------------//
00085 // RenderMonkey application execution related messages 
00086 //--------------------------------------------------------------------------------------------------//
00087 
00088 // Sent out to all open modules to notify them that the application is about to close. 
00089 #define  RM_MSG_APP_CLOSING               (RM_NUM_DATABASE_MSGS + 1)
00090 
00091 // Sent out to all open modules to notify them that a new workspace is created
00092 #define  RM_MSG_APP_FILE_NEW              (RM_NUM_DATABASE_MSGS + 2)
00093 
00094 // Sent out to all open modules to notify them that a file was opened
00095 #define  RM_MSG_APP_FILE_OPEN             (RM_NUM_DATABASE_MSGS + 3)
00096 
00097 // Sent out to all open modules to notify them that a file open operation has started
00098 // (nMessageData is NULL)
00099 #define  RM_MSG_APP_FILE_OPEN_BEGIN       (RM_NUM_DATABASE_MSGS + 4)
00100 
00101 // Sent out to all open modules to notify them that a file was opened and the opening operation was finished:
00102 // (nMessageData is NULL)
00103 #define  RM_MSG_APP_FILE_OPEN_COMPLETE    (RM_NUM_DATABASE_MSGS + 5)
00104 
00105 // Sent out to all open modules to notify them that a file is about to be closed:
00106 #define  RM_MSG_APP_FILE_CLOSE            (RM_NUM_DATABASE_MSGS + 6)
00107 
00108 // Sent out to all open modules to notify them that a file is about to be closed and the operation has started:
00109 // (nMessageData is NULL)
00110 #define  RM_MSG_APP_FILE_CLOSE_BEGIN      (RM_NUM_DATABASE_MSGS + 7)
00111 
00112 // Sent out to all open modules to notify them that a file has been closed and the operation was finished:
00113 // (nMessageData is NULL)
00114 #define  RM_MSG_APP_FILE_CLOSE_COMPLETE   (RM_NUM_DATABASE_MSGS + 8)
00115 
00116 // Sent out to all open modules before RenderMonkey saves the workspace to make sure that the modules
00117 // propagate any data that they may have into the run-time database before it's saved out to XML. The
00118 // modules may query the user whether the data should be saved.
00119 #define  RM_MSG_APP_QUERY_TO_SAVE_DATA    (RM_NUM_DATABASE_MSGS + 9)
00120 
00121 // Sent out to all open modules before RenderMonkey saves the workspace to make sure that the modules
00122 // propagate any data that they may have into the run-time database before it's saved out to XML. The 
00123 // modules should not query the user whether the data should be saved, but just propagate it directly:
00124 #define  RM_MSG_APP_SAVE_DATA             (RM_NUM_DATABASE_MSGS + 10)
00125 
00126 // The saving data operation has started (nMessageData is NULL)
00127 #define  RM_MSG_APP_SAVE_DATA_BEGIN       (RM_NUM_DATABASE_MSGS + 11)
00128 
00129 // The saving data operation has finished (nMessageData is NULL)
00130 #define  RM_MSG_APP_SAVE_DATA_COMPLETE    (RM_NUM_DATABASE_MSGS + 11)
00131 
00132 // Reserved number of application-specific messages:
00133 #define  RM_NUM_APP_MSGS                  (RM_NUM_DATABASE_MSGS + 15)
00134 
00135 //--------------------------------------------------------------------------------------------------//
00136 // RenderMonkey viewer-specific messages
00137 //--------------------------------------------------------------------------------------------------//
00138 
00139 // A request for the viewer to recreate all resources. Global graphics update for the active effect:
00140 #define RM_VIEW_UPDATE_ALL                      (RM_NUM_APP_MSGS + 1)
00141 
00142 // Forces the viewer to reload all textures in the active effect:
00143 #define RM_VIEW_UPDATE_TEXTURES                 (RM_NUM_APP_MSGS + 2)
00144 
00145 // Forces the viewer to reload all models in the active effect
00146 #define RM_VIEW_UPDATE_MODELS                   (RM_NUM_APP_MSGS + 3)
00147 
00148 // This message forces compilation of all modified ("dirty") shaders in the active effect. Note that
00149 // nMessageData parameter of the shader may contain the following data:
00150 //       RmShader* node - if nMessageData node is a single shader node, then that's the only shader
00151 //                        that needs to be recompiled
00152 //       RmEffect* node - if nMessageData node is an effect node, then the viewer should recompile
00153 //                        all shaders in the specified effect.
00154 //       RmWorkspace* node or NULL - in that case the viewer should recompile all shaders in the workspace
00155 //
00156 #define RM_VIEW_COMPILE_SHADERS                 (RM_NUM_APP_MSGS + 4)
00157 
00158 // This message notifies the plug-ins that shader compilation has started:
00159 #define RM_VIEW_COMPILE_SHADERS_BEGIN           (RM_NUM_APP_MSGS + 5)
00160 
00161 // This message notifies the plug-ins that shader compilation has finished
00162 // This message data may contain either a RmShader node or an RmPass node for
00163 // which the shaders were compiled.
00164 #define RM_VIEW_COMPILE_SHADERS_COMPLETE        (RM_NUM_APP_MSGS + 6)
00165 
00166 // This message notifies the viewer module that the active effect is changes. int parameter contains the new
00167 // RmNode* for the active effect:
00168 #define RM_VIEW_CHANGE_ACTIVE_EFFECT            (RM_NUM_APP_MSGS + 7)
00169 
00170 // Changes View's UI Mode ( Rotate, Pan etc )
00171 #define RM_VIEW_SET_UI_MODE                     (RM_NUM_APP_MSGS + 8)
00172 
00173 // Reset View to original
00174 #define RM_VIEW_RESET                           (RM_NUM_APP_MSGS + 9)
00175 
00176 // This message requests that the active viewer updates the contents of a given
00177 // renderable texture. The pointer to the renderable texture node (RmRenderableTexture)
00178 // is passed as the message parameter for this message
00179 #define RM_VIEW_UPDATE_RENDER_TEXTURE_CONTENTS  (RM_NUM_APP_MSGS + 10)
00180 
00181 // This message notifies the viewer to render a frame and to swap buffers if necessary
00182 #define RM_VIEW_RENDER_FRAME_CONTENTS           (RM_NUM_APP_MSGS + 11)
00183 
00184 // Reserved number of viewer-specific messages:
00185 #define RM_NUM_VIEW_MSGS                        (RM_NUM_APP_MSGS + 15)
00186         
00187 
00188 // Return codes for RenderMonkey plug-ins' MessageHandler() methods:
00189 #define RM_OK     1  
00190 #define RM_FAIL   0
00191 
00192 
00193 //--------------------------------------------------------------------------------------------------//
00194 // Miscellaneous RenderMonkey messages
00195 //--------------------------------------------------------------------------------------------------//
00196 
00197 // Notifies shader editor to highlight a given line of code: Int nMessageData of the PlugIn message
00198 // handler contains a pointer to a RmHighlightLine structure, containing message details
00199 #define RM_MSG_EDITOR_HIGHLIGHT_LINE         (RM_NUM_VIEW_MSGS + 1)
00200 
00201 // Notifies the modules that the shader is about to be compiled
00202 #define RM_MSG_COMMIT_SHADER_CHANGES         (RM_NUM_VIEW_MSGS + 2)  
00203 
00204 // Notifies all MDI frame windows that the MDI client windows are going to be tiled vertically:
00205 #define RM_MSG_MDI_CLIENT_TILE_VERTICALLY    (RM_NUM_VIEW_MSGS + 3)  
00206 
00207 // Notifies all MDI frame windows that the MDI client windows are going to be tiled horizontally:
00208 #define RM_MSG_MDI_CLIENT_TILE_HORIZONTALLY  (RM_NUM_VIEW_MSGS + 4)  
00209 
00210 #define     RM_MSG_USER     100 // Plug-in can use customized message above this number
00211 
00212 //--------------------------------------------------------------------------------------------------//
00213 // Windows messages 
00214 //--------------------------------------------------------------------------------------------------//
00215 
00216 // Ask MDI window to return the shader node that is actively being edited in the shader editor
00217 #define     RM_WM_MSG_GET_EDITING_SHADER (WM_USER+500)  
00218 
00219 // Change page command
00220 #define     RM_COMMAND_ID_CHANGE_PAGE 40021
00221 
00222 // Next Error command
00223 #define     RM_COMMAND_ID_NEXT_COMPILE_ERROR 50221
00224 
00225 //--------------------------------------------------------------------------------------------------//
00226 //--------------------------------------------------------------------------------------------------//
00227 // Resource ID ranges
00228 //--------------------------------------------------------------------------------------------------//
00229 //--------------------------------------------------------------------------------------------------//
00230 
00231 // Control IDs reserved for the main RenderMonkey application, do not use IDs in this range:
00232 #define     RM_RESOURCE_ID_APP       100
00233 #define     RM_RESOURCE_ID_APP_MAX   500
00234 
00235 #define     RM_CONTROL_ID_APP       2000 
00236 #define     RM_CONTROL_ID_APP_MAX   3000 
00237 
00238 // Command IDs reserved for the main RenderMonkey application, do not use IDs in this range:
00239 #define     RM_COMMAND_ID_APP       10000 
00240 #define     RM_COMMAND_ID_APP_MAX   20000 
00241                                         
00242 // Application reserved window messages IDs. All plug-in messages should be in the range 
00243 // outside of this reserved range.  
00244 #define     RM_WIN_MSG_ID_APP      (WM_USER+100)  
00245 #define     RM_WIN_MSG_ID_MAX      (WM_USER+1000)  
00246 
00247 // Each plug-in can use resources IDs above RM_RESOURCE_ID_USER value to declare its own resources
00248 #define     RM_RESOURCE_ID_USER    (RM_RESOURCE_ID_APP_MAX+1)
00249 
00250 // Each plug-in can use IDs above RM_CONTROL_ID_USER to declare its own control IDs
00251 #define     RM_CONTROL_ID_USER     (RM_CONTROL_ID_APP_MAX+1)
00252 
00253 // Each plug-in can use IDs above RM_COMMAND_ID_USER to declare its own command IDs
00254 #define     RM_COMMAND_ID_USER     (RM_COMMAND_ID_APP_MAX+1)
00255                                         
00256 // Each plug-in can use IDs above RM_WIN_MSG_ID_USER to declare its own windows message IDs
00257 #define     RM_WIN_MSG_ID_USER     (RM_WIN_MSG_ID_MAX+1)  
00258 
00259 //--------------------------------------------------------------------------------------------------//
00260 // RenderMonkey native string related defines
00261 //--------------------------------------------------------------------------------------------------//
00262 #define RM_NAME_SIZE          128
00263 #define RM_PATH_SIZE          2048
00264       
00265 //--------------------------------------------------------------------------------------------------//
00266 // RenderMonkey mesh related defines
00267 //--------------------------------------------------------------------------------------------------//
00268 
00269 // Maximum number of stream allowed for a given stream map
00270 #define RM_MAX_NUM_STREAMS             16
00271 
00272 // Maximum value of the usage index for each individual stream channel
00273 #define RM_MAX_NUM_VERTEXUSAGE_INDEX   16
00274 
00275 //--------------------------------------------------------------------------------------------------//
00276 // RenderMonkey docking window identifiers
00277 //--------------------------------------------------------------------------------------------------//
00278 
00279 // Starting docking pane ID
00280 #define RM_DOCKPANE_ID               1000
00281 
00282 // Docking pane identifier for workspace tree view window
00283 #define RM_WORKSPACE_DOCKPANE_ID     1000
00284 
00285 // Docking pane identifier for artist editor window
00286 #define RM_ARTISTEDITOR_DOCKPANE_ID  1001
00287 
00288 // Docking pane identifier for output window
00289 #define RM_OUTPUT_DOCKPANE_ID        1002
00290 
00291 // Docking pane identifier for any user-defined plug-in window. 
00292 #define RM_USER_DOCKPANE_ID          1100
00293 
00294 // Maximum allowed docking pane identifer for any user-defined plug-in window.
00295 #define RM_USER_DOCKPANE_MAX_ID      2000
00296 
00297 // Maximum allowed docking pane identifer for the system
00298 #define RM_DOCKPANE_MAX_ID           2000
00299 
00300 //--------------------------------------------------------------------------------------------------//
00301 //--------------------------------------------------------------------------------------------------//
00302 //
00303 // Predefined variables semantics definitions
00304 //
00305 //--------------------------------------------------------------------------------------------------//
00306 //--------------------------------------------------------------------------------------------------//
00307 
00308 #define RM_PREDEFINED_TIME_CYCLE_PERIOD                              _T( "TimeCyclePeriod" )
00309 #define RM_PREDEFINED_TIME_0_X                                       _T( "Time0_X" )            
00310 #define RM_PREDEFINED_COS_TIME_0_X                                   _T( "CosTime0_X" )             
00311 #define RM_PREDEFINED_SIN_TIME_0_X                                   _T( "SinTime0_X" )             
00312 #define RM_PREDEFINED_TAN_TIME_0_X                                   _T( "TanTime0_X" )      
00313 #define RM_PREDEFINED_TIME_0_1                                       _T( "Time0_1" )    
00314 #define RM_PREDEFINED_COS_TIME_0_1                                   _T( "CosTime0_1" )
00315 #define RM_PREDEFINED_SIN_TIME_0_1                                   _T( "SinTime0_1" )
00316 #define RM_PREDEFINED_TAN_TIME_0_1                                   _T( "TanTime0_1" )
00317 #define RM_PREDEFINED_TIME_0_2PI                                     _T( "Time0_2PI" )
00318 #define RM_PREDEFINED_COS_TIME_0_2PI                                 _T( "CosTime0_2PI" )
00319 #define RM_PREDEFINED_SIN_TIME_0_2PI                                 _T( "SinTime0_2PI" )
00320 #define RM_PREDEFINED_TAN_TIME_0_2PI                                 _T( "TanTime0_2PI" )
00321 #define RM_PREDEFINED_TIME_0_X_PACKED                                _T( "Time0_X_Packed" )
00322 #define RM_PREDEFINED_TIME_0_1_PACKED                                _T( "Time0_1_Packed" )
00323 #define RM_PREDEFINED_TIME_0_2PI_PACKED                              _T( "Time0_2PI_Packed")
00324 #define RM_PREDEFINED_VIEWPORT_WIDTH                                 _T( "ViewportWidth" )
00325 #define RM_PREDEFINED_VIEWPORT_HEIGHT                                _T( "ViewportHeight" )
00326 #define RM_PREDEFINED_VIEWPORT_DIMENSIONS                            _T( "ViewportDimensions" )
00327 #define RM_PREDEFINED_VIEWPORT_WIDTH_INVERSE                         _T( "ViewportWidthInverse" )
00328 #define RM_PREDEFINED_VIEWPORT_HEIGHT_INVERSE                        _T( "ViewportHeightInverse" )
00329 #define RM_PREDEFINED_VIEWPORT_DIMENSIONS_INVERSE                    _T( "ViewportDimensionsInverse" )
00330 #define RM_PREDEFINED_RANDOM_FRAC_1_PER_PASS                         _T( "RandomFraction1PerPass" )
00331 #define RM_PREDEFINED_RANDOM_FRAC_2_PER_PASS                         _T( "RandomFraction2PerPass" )
00332 #define RM_PREDEFINED_RANDOM_FRAC_3_PER_PASS                         _T( "RandomFraction3PerPass" )
00333 #define RM_PREDEFINED_RANDOM_FRAC_4_PER_PASS                         _T( "RandomFraction4PerPass" )
00334 #define RM_PREDEFINED_RANDOM_FRAC_1_PER_EFFECT                       _T( "RandomFraction1PerEffect" )
00335 #define RM_PREDEFINED_RANDOM_FRAC_2_PER_EFFECT                       _T( "RandomFraction2PerEffect" )
00336 #define RM_PREDEFINED_RANDOM_FRAC_3_PER_EFFECT                       _T( "RandomFraction3PerEffect" )
00337 #define RM_PREDEFINED_RANDOM_FRAC_4_PER_EFFECT                       _T( "RandomFraction4PerEffect" )
00338 #define RM_PREDEFINED_PASS_INDEX                                     _T( "PassIndex" )
00339 #define RM_PREDEFINED_FPS                                            _T( "FPS" )
00340 #define RM_PREDEFINED_TIME_ELAPSED                                   _T( "TimeElapsed" )
00341 #define RM_PREDEFINED_MOUSE_RIGHT_BUTTON                             _T( "RightMouseButton" )
00342 #define RM_PREDEFINED_MOUSE_MIDDLE_BUTTON                            _T( "MiddleMouseButton" )
00343 #define RM_PREDEFINED_MOUSE_LEFT_BUTTON                              _T( "LeftMouseButton" )
00344 #define RM_PREDEFINED_MOUSE_COORDINATE_X                             _T( "MouseCoordinateX" )
00345 #define RM_PREDEFINED_MOUSE_COORDINATE_Y                             _T( "MouseCoordinateY" )
00346 #define RM_PREDEFINED_MOUSE_COORDINATE_X_NDC                         _T( "MouseCoordinateXNDC" )
00347 #define RM_PREDEFINED_MOUSE_COORDINATE_Y_NDC                         _T( "MouseCoordinateYNDC" )
00348 #define RM_PREDEFINED_MOUSE_COORDINATES_XY                           _T( "MouseCoordinateXY" )
00349 #define RM_PREDEFINED_MOUSE_COORDINATES_XY_NDC                       _T( "MouseCoordinateXYNDC" )
00350 #define RM_PREDEFINED_MOUSE_BUTTONS_PACKED                           _T( "MouseButtonsPacked" )
00351 #define RM_PREDEFINED_MOUSE_COORDS_PACKED                            _T( "MouseCoordsPacked" )
00352 #define RM_PREDEFINED_VIEW_DIRECTION                                 _T( "ViewDirection" )
00353 #define RM_PREDEFINED_VIEW_POSITION                                  _T( "ViewPosition" )
00354 #define RM_PREDEFINED_VIEW_SIDE                                      _T( "ViewSideVector" )
00355 #define RM_PREDEFINED_VIEW_UP                                        _T( "ViewUpVector" )
00356 #define RM_PREDEFINED_FOV                                            _T( "FOV" )
00357 #define RM_PREDEFINED_FAR_CLIP_PLANE                                 _T( "FarClipPlane" )
00358 #define RM_PREDEFINED_NEAR_CLIP_PLANE                                _T( "NearClipPlane" )
00359 #define RM_PREDEFINED_MODEL_BBOX_TOP_LEFT_CORNER                     _T( "ModelBoundingBoxTopLeftCorner" )
00360 #define RM_PREDEFINED_MODEL_BBOX_BOTTOM_RIGHT_CORNER                 _T( "ModelBoundingBoxBottomRightCorner" )
00361 #define RM_PREDEFINED_MODEL_BBOX_CENTER                              _T( "ModelBoundingBoxCenter" )
00362 #define RM_PREDEFINED_MODEL_CENTROID                                 _T( "ModelCentroid" )
00363 #define RM_PREDEFINED_MODEL_BSPHERE_CENTER                           _T( "ModelBoundingSphereCenter" )
00364 #define RM_PREDEFINED_MODEL_BSPHERE_RADIUS                           _T( "ModelBoundingSphereRadius" )
00365 
00366 
00367 #define RM_PREDEFINED_VIEW_PROJECTION_MATRIX                         _T( "ViewProjection" )
00368 #define RM_PREDEFINED_VIEW_MATRIX                                    _T( "View" )
00369 #define RM_PREDEFINED_VIEW_INVERSE_MATRIX                            _T( "ViewInverse" )
00370 #define RM_PREDEFINED_VIEW_INVERSE_TRANSPOSE                         _T( "ViewInverseTranspose" )
00371 #define RM_PREDEFINED_PROJECTION_MATRIX                              _T( "Projection" )
00372 #define RM_PREDEFINED_WORLD_VIEW_PROJECTION_MATRIX                   _T( "WorldViewProjection" )
00373 #define RM_PREDEFINED_WORLD_MATRIX                                   _T( "World" )
00374 #define RM_PREDEFINED_WORLD_INVERSE_MATRIX                           _T( "WorldInverse" )
00375 #define RM_PREDEFINED_WORLD_INVERSE_TRANSPOSE_MATRIX                 _T( "WorldInverseTranspose" )
00376 #define RM_PREDEFINED_WORLD_VIEW_MATRIX                              _T( "WorldView" )
00377 #define RM_PREDEFINED_WORLD_VIEW_INVERSE_MATRIX                      _T( "WorldViewInverse" )
00378 #define RM_PREDEFINED_WORLD_VIEW_INVERSE_TRANSPOSE_MATRIX            _T( "WorldViewInverseTranspose" )
00379 #define RM_PREDEFINED_WORLD_VIEW_PROJECTION_INVERSE_MATRIX           _T( "WorldViewProjectionInverse" )
00380 #define RM_PREDEFINED_WORLD_VIEW_PROJECTION_INVERSE_TRANSPOSE_MATRIX _T( "WorldViewProjectionInverseTranspose" )
00381 #define RM_PREDEFINED_VIEW_INVERSE_TRANSPOSE_MATRIX                  _T( "ViewInverseTranspose" )
00382 #define RM_PREDEFINED_VIEW_PROJECTION_INVERSE_TRANSPOSE_MATRIX       _T( "ViewProjectionInverseTranspose" )
00383 #define RM_PREDEFINED_PROJECTION_INVERSE_MATRIX                      _T( "ProjectionInverse" )
00384 #define RM_PREDEFINED_PROJECTION_INVERSE_TRANSPOSE_MATRIX            _T( "ProjectionInverseTranspose" )
00385 #define RM_PREDEFINED_VIEW_PROJECTION_INVERSE_MATRIX                 _T( "ViewProjectionInverse" )
00386 #define RM_PREDEFINED_VIEW_PROJECTION_INVERSE_TRANPOSE_MATRIX        _T( "ViewProjectionInverseTranspose" )
00387 #define RM_PREDEFINED_VIEW_PROJECTION_TRANSPOSE                      _T( "ViewProjectionTranspose" )
00388 #define RM_PREDEFINED_VIEW_TRANSPOSE                                 _T( "ViewTranspose" )
00389 #define RM_PREDEFINED_WORLD_VIEW_PROJECTION_TRANSPOSE                _T( "WorldViewProjectionTranspose" )
00390 #define RM_PREDEFINED_WORLD_TRANSPOSE                                _T( "WorldTranspose" )
00391 #define RM_PREDEFINED_WORLD_VIEW_TRANSPOSE                           _T( "WorldViewTranspose" )
00392 #define RM_PREDEFINED_PROJECTION_TRANSPOSE                           _T( "ProjectionTranspose" )
00393 
00394 //--------------------------------------------------------------------------------------------------//
00395 //--------------------------------------------------------------------------------------------------//
00396 //--------------------------------------------------------------------------------------------------//
00397 //                                                                                                  //
00398 //             Supported DirectX 9.0 shader models                                                  //
00399 //                                                                                                  //
00400 //--------------------------------------------------------------------------------------------------//
00401 //--------------------------------------------------------------------------------------------------//
00402 //--------------------------------------------------------------------------------------------------//
00403 #define RM_DX_VERSION      0x00090003
00404 #define RM_DX_VERSION_STR  _T( "DirectX 9.0c" )
00405 
00406 #define RM_DX_VS_1_1       _T("vs_1_1")
00407 #define RM_DX_VS_2_0       _T("vs_2_0")
00408 #define RM_DX_VS_2_SW      _T("vs_2_sw")
00409 #define RM_DX_VS_3_0       _T("vs_3_0")
00410 #define RM_DX_VS_3_SW      _T("vs_3_sw")
00411 
00412 #define RM_NUM_DX_VS_TARGETS 5
00413 
00414 #define RM_DX_PS_1_1       _T("ps_1_1")
00415 #define RM_DX_PS_1_2       _T("ps_1_2")
00416 #define RM_DX_PS_1_3       _T("ps_1_3")
00417 #define RM_DX_PS_1_4       _T("ps_1_4")
00418 #define RM_DX_PS_2_0       _T("ps_2_0")
00419 #define RM_DX_PS_2_A       _T("ps_2_a")
00420 #define RM_DX_PS_2_B       _T("ps_2_b")
00421 #define RM_DX_PS_2_SW      _T("ps_2_sw")
00422 #define RM_DX_PS_3_0       _T("ps_3_0")
00423 #define RM_DX_PS_3_SW      _T("ps_3_sw")
00424 
00425 #define RM_NUM_DX_PS_TARGETS 10
00426 
00427 
00428 //--------------------------------------------------------------------------------------------------//
00429 //--------------------------------------------------------------------------------------------------//
00430 //--------------------------------------------------------------------------------------------------//
00431 //                                                                                                  //
00432 // Use these macros for clean deletion of pointers and resources within RenderMonkey plug-ins       //
00433 //                                                                                                  //
00434 //--------------------------------------------------------------------------------------------------//
00435 //--------------------------------------------------------------------------------------------------//
00436 //--------------------------------------------------------------------------------------------------//
00437 
00438 // Deletes a pointer and resets it to NULL:
00439 #ifndef RM_SAFE_DELETE
00440 #define RM_SAFE_DELETE( p )         { if( p )   { delete (p);        (p) = NULL;    }}
00441 #endif // End of RM_SAFE_DELETE
00442 
00443 // Deletes an array and resets the array pointer to NULL:
00444 #ifndef RM_SAFE_DELETE_ARRAY
00445 #define RM_SAFE_DELETE_ARRAY( p )   { if( p )   { delete[] (p);      (p) = NULL;    }}
00446 #endif // End of RM_SAFE_DELETE_ARRAY
00447 
00448 // Deletes a pointer if it's not NULL and resets it to NULL after deletion.
00449 // If the input pointer is already NULL, calls assertion.
00450 #ifndef RM_SAFE_DELETE_ASSERT
00451 #define RM_SAFE_DELETE_ASSERT(p)    if ( (p) != NULL )   { delete (p); (p) = NULL; } else { assert( (p) != NULL ); }
00452 #endif // End of RM_SAFE_DELETE_ASSERT
00453 
00454 // Deletes a pointer to an array if it's not NULL and resets it to NULL after deletion.
00455 // If the input pointer is already NULL, calls assertion.
00456 #ifndef RM_SAFE_DELETE_ARRAY_ASSERT
00457 #define RM_SAFE_DELETE_ARRAY_ASSERT(p) if ( (p) != NULL )   { delete[] (p); (p) = NULL; } else { assert( (p) != NULL ); }
00458 #endif // End of RM_SAFE_DELETE_ASSERT
00459 
00460 // Releases the given interface and resets the pointer to the interface to NULL:
00461 #ifndef RM_SAFE_RELEASE
00462 #define RM_SAFE_RELEASE( p )        { if ( p )   { (p)->Release();    (p) = NULL;    }}
00463 #endif // End of RM_SAFE_RELEASE
00464 
00465 // If the pointer isn't NULL, it frees the given pointer and resets it to NULL:
00466 #ifndef RM_SAFE_FREE
00467 #define RM_SAFE_FREE( p )           {  if ( p )    {  free( (p) );   (p) = NULL;    }}
00468 #endif
00469 
00470 // If the pointer isn't NULL, it frees the given pointer and resets it to NULL, otherwise this method asserts:
00471 #ifndef RM_SAFE_FREE_ASSERT
00472 #define RM_SAFE_FREE_ASSERT( p )           {  if ( p )    {  free( (p) );   (p) = NULL;    } else { assert( (p) != NULL ); } }
00473 #endif
00474 
00475 //--------------------------------------------------------------------------------------------------//
00476 // Math constants definitions
00477 //--------------------------------------------------------------------------------------------------//
00478 #define RM_PI                 3.141592653f
00479 #define RM_TWO_PI             6.283185307f
00480 #define RM_DEG_2_RAD(a)       ((a) / 57.295779513f)
00481 #define RM_RAD_2_DEG(a)       ((a) * 57.295779513f)
00482 
00483 // Determines the maximum string length for window titles - used to register windows with the main 
00484 // application:
00485 #define RM_MAXIMUM_WINDOW_TITLE_SIZE   128
00486 
00487 //--------------------------------------------------------------------------------------------------//
00488 // Color conversion from individual bytes into a DWORD and vice versa
00489 //--------------------------------------------------------------------------------------------------//
00490 
00491 // RM_RGBA is compatible with COLORREF, but fully exposes the alpha channel
00492 #define RM_RGBA                     DWORD
00493 
00494 // Extracts the red, green, blue, or alpha byte component from the RM_RGBA DWORD
00495 #define RmGetRValue( rgba )         ( (BYTE )( ( rgba ) ) )
00496 #define RmGetGValue( rgba )         ( (BYTE )( ( rgba ) >> 8 ) )
00497 #define RmGetBValue( rgba )         ( (BYTE )( ( rgba ) >> 16 ) )
00498 #define RmGetAValue( rgba )         ( (BYTE )( ( rgba ) >> 24 ) )
00499 
00500 // Converts the four byte components into an RM_RGBA DWORD
00501 #define RmMakeRGBAb( r, g, b, a )   ( ( RM_RGBA )(   ( ( DWORD )( ( BYTE )( r ) ) ) \
00502                                                    | ( ( DWORD )( ( BYTE )( g ) ) << 8 ) \
00503                                                    | ( ( DWORD )( ( BYTE )( b ) ) << 16 ) \
00504                                                    | ( ( DWORD )( ( BYTE )( a ) ) << 24 ) ) )
00505                                                    
00506 // Converts the 4 float component vector into an RM_RGBA DWORD
00507 #define RmMakeRGBAfv( rgba )        ( RmMakeRGBAb( ( BYTE )( rgba[ 0 ] * 255.0f ), \
00508                                                    ( BYTE )( rgba[ 1 ] * 255.0f ), \
00509                                                    ( BYTE )( rgba[ 2 ] * 255.0f ), \
00510                                                    ( BYTE )( rgba[ 3 ] * 255.0f ) ) )
00511                                        
00512 
00513 
00514 //============================//
00515 // General Preference defines //
00516 //============================//
00517 #define RM_DEFAULT_AUTO_REFRESH           FALSE
00518 #define RM_DEFAULT_TIME_CYCLE             120            // sec
00519 #define RM_DEFAULT_REFRESH_PERIOD         5              // sec
00520 #define RM_DEFAULT_TEXTURE_DIRECTORY      _T(".\\Media\\Textures\\")
00521 #define RM_DEFAULT_MODEL_DIRECTORY        _T(".\\Media\\Models\\")
00522 #define RM_DEFAULT_MODEL_ORIENTATION      RM_ORIENTATION_LHS
00523 #define RM_DEFAULT_TEXTURE_ORIGIN         RM_ORIGIN_TOP_LEFT
00524 
00525 #endif // _RM_CORE_DEFINES_H_
00526 

Generated on Fri Feb 25 16:08:34 2005 for RenderMonkey SDK by doxygen 1.3.6