Panda3D
config_physics.h
Go to the documentation of this file.
1 /**
2  * PANDA 3D SOFTWARE
3  * Copyright (c) Carnegie Mellon University. All rights reserved.
4  *
5  * All use of this software is subject to the terms of the revised BSD
6  * license. You should have received a copy of this license along
7  * with this source code in a file named "LICENSE."
8  *
9  * @file config_physics.h
10  * @author charles
11  * @date 2000-07-17
12  */
13 
14 #ifndef CONFIG_PHYSICS_H
15 #define CONFIG_PHYSICS_H
16 
17 #include "pandabase.h"
18 #include "notifyCategoryProxy.h"
19 #include "dconfig.h"
20 
21 ConfigureDecl(config_physics, EXPCL_PANDA_PHYSICS, EXPTP_PANDA_PHYSICS);
22 NotifyCategoryDecl(physics, EXPCL_PANDA_PHYSICS, EXPTP_PANDA_PHYSICS);
23 
24 extern EXPCL_PANDA_PHYSICS void init_libphysics();
25 
26 // These macros get stripped out in a non-debug build (like asserts). Use them
27 // like cout but with paranthesis aroud the cout input. e.g. foo_debug("The
28 // value of bar is " << bar);
29 #ifndef NDEBUG //[
30  // Non-release build:
31  #define PHYSICS_DEBUG
32 
33  #define physics_spam(msg) \
34  if (physics_cat.is_spam()) { \
35  physics_cat->spam() << msg << std::endl; \
36  } else {}
37 
38  #define physics_debug(msg) \
39  if (physics_cat.is_debug()) { \
40  physics_cat->debug() << msg << std::endl; \
41  } else {}
42 
43  #define physics_info(msg) \
44  physics_cat->info() << msg << std::endl
45 
46  #define physics_warning(msg) \
47  physics_cat->warning() << msg << std::endl
48 
49  #define physics_error(msg) \
50  physics_cat->error() << msg << std::endl
51 #else //][
52  // Release build:
53  #undef PHYSICS_DEBUG
54 
55  #define physics_spam(msg) ((void)0)
56  #define physics_debug(msg) ((void)0)
57  #define physics_info(msg) ((void)0)
58  #define physics_warning(msg) ((void)0)
59  #define physics_error(msg) ((void)0)
60 #endif //]
61 
62 #define audio_error(msg) \
63  audio_cat->error() << msg << std::endl
64 
65 #endif // CONFIG_PHYSICS_H
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
EXPCL_PANDA_PHYSICS void init_libphysics()
Initializes the library.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.