00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef COLLISIONHANDLERFLOOR_H
00016 #define COLLISIONHANDLERFLOOR_H
00017
00018 #include "pandabase.h"
00019
00020 #include "collisionHandlerPhysical.h"
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 class EXPCL_PANDA_COLLIDE CollisionHandlerFloor : public CollisionHandlerPhysical {
00032 PUBLISHED:
00033 CollisionHandlerFloor();
00034 virtual ~CollisionHandlerFloor();
00035
00036 INLINE void set_offset(PN_stdfloat offset);
00037 INLINE PN_stdfloat get_offset() const;
00038
00039 INLINE void set_reach(PN_stdfloat reach);
00040 INLINE PN_stdfloat get_reach() const;
00041
00042 INLINE void set_max_velocity(PN_stdfloat max_vel);
00043 INLINE PN_stdfloat get_max_velocity() const;
00044
00045 protected:
00046 PN_stdfloat set_highest_collision(const NodePath &target_node_path, const NodePath &from_node_path, const Entries &entries);
00047 virtual bool handle_entries();
00048 virtual void apply_linear_force(ColliderDef &def, const LVector3 &force);
00049
00050 private:
00051 PN_stdfloat _offset;
00052 PN_stdfloat _reach;
00053 PN_stdfloat _max_velocity;
00054
00055
00056 public:
00057 static TypeHandle get_class_type() {
00058 return _type_handle;
00059 }
00060 static void init_type() {
00061 CollisionHandlerPhysical::init_type();
00062 register_type(_type_handle, "CollisionHandlerFloor",
00063 CollisionHandlerPhysical::get_class_type());
00064 }
00065 virtual TypeHandle get_type() const {
00066 return get_class_type();
00067 }
00068 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00069
00070 private:
00071 static TypeHandle _type_handle;
00072 };
00073
00074 #include "collisionHandlerFloor.I"
00075
00076 #endif
00077
00078
00079