Panda3D
 All Classes Functions Variables Enumerations
collisionHandlerFloor.I
1 // Filename: collisionHandlerFloor.I
2 // Created by: drose (16Mar02)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 
16 ////////////////////////////////////////////////////////////////////
17 // Function: CollisionHandlerFloor::set_offset
18 // Access: Public
19 // Description: Sets the linear offset to add to (or subtract from)
20 // the highest detected collision point to determine the
21 // actual height at which to set the collider.
22 ////////////////////////////////////////////////////////////////////
23 INLINE void CollisionHandlerFloor::
24 set_offset(PN_stdfloat offset) {
25  _offset = offset;
26 }
27 
28 ////////////////////////////////////////////////////////////////////
29 // Function: CollisionHandlerFloor::get_offset
30 // Access: Public
31 // Description: Returns the linear offset to add to (or subtract from)
32 // the highest detected collision point to determine the
33 // actual height at which to set the collider.
34 ////////////////////////////////////////////////////////////////////
35 INLINE PN_stdfloat CollisionHandlerFloor::
36 get_offset() const {
37  return _offset;
38 }
39 
40 ////////////////////////////////////////////////////////////////////
41 // Function: CollisionHandlerFloor::set_reach
42 // Access: Public
43 // Description: Sets the reach to add to (or subtract from)
44 // the highest collision point
45 ////////////////////////////////////////////////////////////////////
46 INLINE void CollisionHandlerFloor::
47 set_reach(PN_stdfloat reach) {
48  _reach = reach;
49 }
50 
51 ////////////////////////////////////////////////////////////////////
52 // Function: CollisionHandlerFloor::get_reach
53 // Access: Public
54 // Description: Returns the reach to add to (or subtract from)
55 // the highest collision point
56 ////////////////////////////////////////////////////////////////////
57 INLINE PN_stdfloat CollisionHandlerFloor::
58 get_reach() const {
59  return _reach;
60 }
61 
62 ////////////////////////////////////////////////////////////////////
63 // Function: CollisionHandlerFloor::set_max_velocity
64 // Access: Public
65 // Description: Sets the maximum speed at which the object will be
66 // allowed to descend towards a floor below it, in units
67 // per second. Set this to zero to allow it to
68 // instantly teleport any distance.
69 ////////////////////////////////////////////////////////////////////
70 INLINE void CollisionHandlerFloor::
71 set_max_velocity(PN_stdfloat max_velocity) {
72  _max_velocity = max_velocity;
73 }
74 
75 ////////////////////////////////////////////////////////////////////
76 // Function: CollisionHandlerFloor::get_max_velocity
77 // Access: Public
78 // Description: Retrieves the maximum speed at which the object will
79 // be allowed to descend towards a floor below it, in
80 // units per second. See set_max_velocity().
81 ////////////////////////////////////////////////////////////////////
82 INLINE PN_stdfloat CollisionHandlerFloor::
84  return _max_velocity;
85 }
void set_max_velocity(PN_stdfloat max_vel)
Sets the maximum speed at which the object will be allowed to descend towards a floor below it...
PN_stdfloat get_max_velocity() const
Retrieves the maximum speed at which the object will be allowed to descend towards a floor below it...
void set_reach(PN_stdfloat reach)
Sets the reach to add to (or subtract from) the highest collision point.
PN_stdfloat get_reach() const
Returns the reach to add to (or subtract from) the highest collision point.
PN_stdfloat get_offset() const
Returns the linear offset to add to (or subtract from) the highest detected collision point to determ...
void set_offset(PN_stdfloat offset)
Sets the linear offset to add to (or subtract from) the highest detected collision point to determine...