Panda3D
|
00001 // Filename: config_physics.h 00002 // Created by: charles (17Jul00) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 #ifndef CONFIG_PHYSICS_H 00016 #define CONFIG_PHYSICS_H 00017 00018 #include "pandabase.h" 00019 #include "notifyCategoryProxy.h" 00020 #include "dconfig.h" 00021 00022 ConfigureDecl(config_physics, EXPCL_PANDAPHYSICS, EXPTP_PANDAPHYSICS); 00023 NotifyCategoryDecl(physics, EXPCL_PANDAPHYSICS, EXPTP_PANDAPHYSICS); 00024 00025 extern EXPCL_PANDAPHYSICS void init_libphysics(); 00026 00027 // These macros get stripped out in a non-debug build (like asserts). 00028 // Use them like cout but with paranthesis aroud the cout input. 00029 // e.g. foo_debug("The value of bar is " << bar); 00030 #ifndef NDEBUG //[ 00031 // Non-release build: 00032 #define PHYSICS_DEBUG 00033 00034 #define physics_spam(msg) \ 00035 if (physics_cat.is_spam()) { \ 00036 physics_cat->spam() << msg << endl; \ 00037 } else {} 00038 00039 #define physics_debug(msg) \ 00040 if (physics_cat.is_debug()) { \ 00041 physics_cat->debug() << msg << endl; \ 00042 } else {} 00043 00044 #define physics_info(msg) \ 00045 physics_cat->info() << msg << endl 00046 00047 #define physics_warning(msg) \ 00048 physics_cat->warning() << msg << endl 00049 00050 #define physics_error(msg) \ 00051 physics_cat->error() << msg << endl 00052 #else //][ 00053 // Release build: 00054 #undef PHYSICS_DEBUG 00055 00056 #define physics_spam(msg) ((void)0) 00057 #define physics_debug(msg) ((void)0) 00058 #define physics_info(msg) ((void)0) 00059 #define physics_warning(msg) ((void)0) 00060 #define physics_error(msg) ((void)0) 00061 #endif //] 00062 00063 #define audio_error(msg) \ 00064 audio_cat->error() << msg << endl 00065 00066 #endif // CONFIG_PHYSICS_H