Panda3D
collisionHandlerFloor.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 collisionHandlerFloor.I
10  * @author drose
11  * @date 2002-03-16
12  */
13 
14 /**
15  * Sets the linear offset to add to (or subtract from) the highest detected
16  * collision point to determine the actual height at which to set the
17  * collider.
18  */
19 INLINE void CollisionHandlerFloor::
20 set_offset(PN_stdfloat offset) {
21  _offset = offset;
22 }
23 
24 /**
25  * Returns the linear offset to add to (or subtract from) the highest detected
26  * collision point to determine the actual height at which to set the
27  * collider.
28  */
29 INLINE PN_stdfloat CollisionHandlerFloor::
30 get_offset() const {
31  return _offset;
32 }
33 
34 /**
35  * Sets the reach to add to (or subtract from) the highest collision point
36  */
37 INLINE void CollisionHandlerFloor::
38 set_reach(PN_stdfloat reach) {
39  _reach = reach;
40 }
41 
42 /**
43  * Returns the reach to add to (or subtract from) the highest collision point
44  */
45 INLINE PN_stdfloat CollisionHandlerFloor::
46 get_reach() const {
47  return _reach;
48 }
49 
50 /**
51  * Sets the maximum speed at which the object will be allowed to descend
52  * towards a floor below it, in units per second. Set this to zero to allow
53  * it to instantly teleport any distance.
54  */
55 INLINE void CollisionHandlerFloor::
56 set_max_velocity(PN_stdfloat max_velocity) {
57  _max_velocity = max_velocity;
58 }
59 
60 /**
61  * Retrieves the maximum speed at which the object will be allowed to descend
62  * towards a floor below it, in units per second. See set_max_velocity().
63  */
64 INLINE PN_stdfloat CollisionHandlerFloor::
65 get_max_velocity() const {
66  return _max_velocity;
67 }
set_max_velocity
Sets the maximum speed at which the object will be allowed to descend towards a floor below it,...
set_reach
Sets the reach to add to (or subtract from) the highest collision point.
set_offset
Sets the linear offset to add to (or subtract from) the highest detected collision point to determine...