00001 // Filename: collisionHandlerFloor.I 00002 // Created by: drose (16Mar02) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) 2001, Disney Enterprises, Inc. All rights reserved 00008 // 00009 // All use of this software is subject to the terms of the Panda 3d 00010 // Software license. You should have received a copy of this license 00011 // along with this source code; you will also find a current copy of 00012 // the license at http://www.panda3d.org/license.txt . 00013 // 00014 // To contact the maintainers of this program write to 00015 // panda3d@yahoogroups.com . 00016 // 00017 //////////////////////////////////////////////////////////////////// 00018 00019 00020 //////////////////////////////////////////////////////////////////// 00021 // Function: CollisionHandlerFloor::set_offset 00022 // Access: Public 00023 // Description: Sets the linear offset to add to (or subtract from) 00024 // the highest detected collision point to determine the 00025 // actual height at which to set the collider. 00026 //////////////////////////////////////////////////////////////////// 00027 INLINE void CollisionHandlerFloor:: 00028 set_offset(float offset) { 00029 _offset = offset; 00030 } 00031 00032 //////////////////////////////////////////////////////////////////// 00033 // Function: CollisionHandlerFloor::get_offset 00034 // Access: Public 00035 // Description: Returns the linear offset to add to (or subtract from) 00036 // the highest detected collision point to determine the 00037 // actual height at which to set the collider. 00038 //////////////////////////////////////////////////////////////////// 00039 INLINE float CollisionHandlerFloor:: 00040 get_offset() const { 00041 return _offset; 00042 } 00043 00044 //////////////////////////////////////////////////////////////////// 00045 // Function: CollisionHandlerFloor::set_max_velocity 00046 // Access: Public 00047 // Description: Sets the maximum speed at which the object will be 00048 // allowed to descend towards a floor below it, in units 00049 // per second. Set this to zero to allow it to 00050 // instantly teleport any distance. 00051 //////////////////////////////////////////////////////////////////// 00052 INLINE void CollisionHandlerFloor:: 00053 set_max_velocity(float max_velocity) { 00054 _max_velocity = max_velocity; 00055 } 00056 00057 //////////////////////////////////////////////////////////////////// 00058 // Function: CollisionHandlerFloor::get_max_velocity 00059 // Access: Public 00060 // Description: Retrieves the maximum speed at which the object will 00061 // be allowed to descend towards a floor below it, in 00062 // units per second. See set_max_velocity(). 00063 //////////////////////////////////////////////////////////////////// 00064 INLINE float CollisionHandlerFloor:: 00065 get_max_velocity() const { 00066 return _max_velocity; 00067 }