Panda3D

forceNode.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 forceNode.I
10 * @author charles
11 * @date 2000-08-02
12 */
13
14 /**
15
16 */
17 INLINE void ForceNode::
18 clear() {
19 _forces.erase(_forces.begin(), _forces.end());
20 }
21
22 /**
23
24 */
25 INLINE BaseForce *ForceNode::
26 get_force(size_t index) const {
27 nassertr(index < _forces.size(), nullptr);
28 return _forces[index];
29 }
30
31 /**
32
33 */
34 INLINE size_t ForceNode::
35 get_num_forces() const {
36 return _forces.size();
37 }
38
39 /**
40
41 */
42 INLINE void ForceNode::
43 add_force(BaseForce *force) {
44 _forces.push_back(force);
45 force->_force_node = this;
46 force->_force_node_path = NodePath(this);
47 }
BaseForce
pure virtual base class for all forces that could POSSIBLY exist.
Definition: baseForce.h:29
NodePath
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
Definition: nodePath.h:159