00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef COLLISIONHANDLERPUSHER_H
00016 #define COLLISIONHANDLERPUSHER_H
00017
00018 #include "pandabase.h"
00019
00020 #include "collisionHandlerPhysical.h"
00021
00022
00023
00024
00025
00026
00027
00028
00029 class EXPCL_PANDA_COLLIDE CollisionHandlerPusher : public CollisionHandlerPhysical {
00030 PUBLISHED:
00031 CollisionHandlerPusher();
00032 virtual ~CollisionHandlerPusher();
00033
00034 INLINE void set_horizontal(bool flag);
00035 INLINE bool get_horizontal() const;
00036
00037 protected:
00038 virtual bool handle_entries();
00039 virtual void apply_net_shove(
00040 ColliderDef &def, const LVector3 &net_shove,
00041 const LVector3 &force_normal);
00042 virtual void apply_linear_force(ColliderDef &def, const LVector3 &force);
00043
00044 bool _horizontal;
00045
00046
00047 public:
00048 static TypeHandle get_class_type() {
00049 return _type_handle;
00050 }
00051 static void init_type() {
00052 CollisionHandlerPhysical::init_type();
00053 register_type(_type_handle, "CollisionHandlerPusher",
00054 CollisionHandlerPhysical::get_class_type());
00055 }
00056 virtual TypeHandle get_type() const {
00057 return get_class_type();
00058 }
00059 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00060
00061 private:
00062 static TypeHandle _type_handle;
00063 };
00064
00065 #include "collisionHandlerPusher.I"
00066
00067 #endif
00068
00069
00070