Panda3D
bulletWorld.I
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 bulletWorld.I
10  * @author enn0x
11  * @date 2010-01-23
12  */
13 
14 /**
15  *
16  */
17 INLINE BulletWorld::
18 ~BulletWorld() {
19 
20  while (get_num_characters() > 0) {
21  remove_character(get_character(0));
22  }
23 
24  while (get_num_vehicles() > 0) {
25  remove_vehicle(get_vehicle(0));
26  }
27 
28  while (get_num_constraints() > 0) {
29  remove_constraint(get_constraint(0));
30  }
31 
32  while (get_num_rigid_bodies() > 0) {
33  remove_rigid_body(get_rigid_body(0));
34  }
35 
36  while (get_num_soft_bodies() > 0) {
37  remove_soft_body(get_soft_body(0));
38  }
39 
40  while (get_num_ghosts() > 0) {
41  remove_ghost(get_ghost(0));
42  }
43 
44  _info.m_sparsesdf.Reset();
45 
46  delete _world;
47  delete _solver;
48  delete _configuration;
49  delete _dispatcher;
50  delete _broadphase;
51 }
52 
53 /**
54  *
55  */
56 INLINE BulletDebugNode *BulletWorld::
57 get_debug_node() const {
58 
59  return _debug;
60 }
61 
62 /**
63  *
64  */
65 INLINE bool BulletWorld::
66 has_debug_node() const {
67 
68  return _debug != nullptr;
69 }
70 
71 /**
72  *
73  */
74 INLINE btDynamicsWorld *BulletWorld::
75 get_world() const {
76 
77  return _world;
78 }
79 
80 /**
81  *
82  */
83 INLINE btBroadphaseInterface *BulletWorld::
84 get_broadphase() const {
85 
86  return _broadphase;
87 }
88 
89 /**
90  *
91  */
92 INLINE btDispatcher *BulletWorld::
93 get_dispatcher() const {
94 
95  return _dispatcher;
96 }
97 
void remove_soft_body(BulletSoftBodyNode *node)
Deprecated.
void remove_vehicle(BulletVehicle *vehicle)
Deprecated.
void remove_ghost(BulletGhostNode *node)
Deprecated.
void remove_rigid_body(BulletRigidBodyNode *node)
Deprecated.
void remove_character(BulletBaseCharacterControllerNode *node)
Deprecated.
void remove_constraint(BulletConstraint *constraint)
Deprecated.