00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef __BULLET_BASE_CHARACTER_CONTROLLER_NODE_H__
00016 #define __BULLET_BASE_CHARACTER_CONTROLLER_NODE_H__
00017
00018 #include "pandabase.h"
00019
00020 #include "bullet_includes.h"
00021 #include "bullet_utils.h"
00022 #include "bulletShape.h"
00023
00024 #include "pandaNode.h"
00025 #include "collideMask.h"
00026
00027
00028
00029
00030
00031 class EXPCL_PANDABULLET BulletBaseCharacterControllerNode : public PandaNode {
00032
00033 PUBLISHED:
00034 BulletBaseCharacterControllerNode(const char *name="character");
00035
00036 public:
00037 virtual CollideMask get_legal_collide_mask() const;
00038
00039 virtual bool safe_to_flatten() const;
00040 virtual bool safe_to_transform() const;
00041 virtual bool safe_to_modify_transform() const;
00042 virtual bool safe_to_combine() const;
00043 virtual bool safe_to_combine_children() const;
00044 virtual bool safe_to_flatten_below() const;
00045
00046 INLINE virtual btPairCachingGhostObject *get_ghost() const = 0;
00047 INLINE virtual btCharacterControllerInterface *get_character() const = 0;
00048
00049 virtual void sync_p2b(PN_stdfloat dt, int num_substeps) = 0;
00050 virtual void sync_b2p() = 0;
00051
00052
00053 public:
00054 static TypeHandle get_class_type() {
00055 return _type_handle;
00056 }
00057 static void init_type() {
00058 PandaNode::init_type();
00059 register_type(_type_handle, "BulletBaseCharacterControllerNode",
00060 PandaNode::get_class_type());
00061 }
00062 virtual TypeHandle get_type() const {
00063 return get_class_type();
00064 }
00065 virtual TypeHandle force_init_type() {
00066 init_type();
00067 return get_class_type();
00068 }
00069
00070 private:
00071 static TypeHandle _type_handle;
00072 };
00073
00074 #include "bulletBaseCharacterControllerNode.I"
00075
00076 #endif // __BULLET_BASE_CHARACTER_CONTROLLER_NODE_H__
00077