00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef COLLISIONHANDLER_H
00016 #define COLLISIONHANDLER_H
00017
00018 #include "pandabase.h"
00019
00020 #include "typedReferenceCount.h"
00021 #include "nodePath.h"
00022
00023 class CollisionEntry;
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 class EXPCL_PANDA_COLLIDE CollisionHandler : public TypedReferenceCount {
00034 public:
00035 CollisionHandler();
00036
00037 virtual void begin_group();
00038 virtual void add_entry(CollisionEntry *entry);
00039 virtual bool end_group();
00040
00041 INLINE bool wants_all_potential_collidees() const;
00042 INLINE void set_root(const NodePath &root);
00043
00044 PUBLISHED:
00045 static TypeHandle get_class_type() {
00046 return _type_handle;
00047 }
00048
00049 public:
00050 static void init_type() {
00051 TypedReferenceCount::init_type();
00052 register_type(_type_handle, "CollisionHandler",
00053 TypedReferenceCount::get_class_type());
00054 }
00055 virtual TypeHandle get_type() const {
00056 return get_class_type();
00057 }
00058 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00059
00060 protected:
00061 bool _wants_all_potential_collidees;
00062 const NodePath *_root;
00063
00064 private:
00065 static TypeHandle _type_handle;
00066
00067 friend class CollisionTraverser;
00068 };
00069
00070 #include "collisionHandler.I"
00071
00072 #endif
00073
00074
00075