Panda3D
Loading...
Searching...
No Matches
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 */
20set_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 */
29INLINE PN_stdfloat CollisionHandlerFloor::
30get_offset() const {
31 return _offset;
32}
33
34/**
35 * Sets the reach to add to (or subtract from) the highest collision point
36 */
38set_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 */
45INLINE PN_stdfloat CollisionHandlerFloor::
46get_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 */
56set_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 */
64INLINE PN_stdfloat CollisionHandlerFloor::
65get_max_velocity() const {
66 return _max_velocity;
67}
get_max_velocity
Retrieves the maximum speed at which the object will be allowed to descend towards a floor below it,...
get_offset
Returns the linear offset to add to (or subtract from) the highest detected collision point to determ...
get_reach
Returns 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...
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.