Panda3D
 All Classes Functions Variables Enumerations
bulletBaseCharacterControllerNode.h
1 // Filename: bulletBaseCharacterControllerNode.h
2 // Created by: enn0x (21Nov10)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef __BULLET_BASE_CHARACTER_CONTROLLER_NODE_H__
16 #define __BULLET_BASE_CHARACTER_CONTROLLER_NODE_H__
17 
18 #include "pandabase.h"
19 
20 #include "bullet_includes.h"
21 #include "bullet_utils.h"
22 #include "bulletShape.h"
23 
24 #include "pandaNode.h"
25 #include "collideMask.h"
26 
27 ////////////////////////////////////////////////////////////////////
28 // Class : BulletBaseCharacterControllerNode
29 // Description :
30 ////////////////////////////////////////////////////////////////////
31 class EXPCL_PANDABULLET BulletBaseCharacterControllerNode : public PandaNode {
32 
33 PUBLISHED:
34  BulletBaseCharacterControllerNode(const char *name="character");
35 
36 public:
37  virtual CollideMask get_legal_collide_mask() const;
38 
39  virtual bool safe_to_flatten() const;
40  virtual bool safe_to_transform() const;
41  virtual bool safe_to_modify_transform() const;
42  virtual bool safe_to_combine() const;
43  virtual bool safe_to_combine_children() const;
44  virtual bool safe_to_flatten_below() const;
45 
46  virtual btPairCachingGhostObject *get_ghost() const = 0;
47  virtual btCharacterControllerInterface *get_character() const = 0;
48 
49  virtual void sync_p2b(PN_stdfloat dt, int num_substeps) = 0;
50  virtual void sync_b2p() = 0;
51 
52 ////////////////////////////////////////////////////////////////////
53 public:
54  static TypeHandle get_class_type() {
55  return _type_handle;
56  }
57  static void init_type() {
58  PandaNode::init_type();
59  register_type(_type_handle, "BulletBaseCharacterControllerNode",
60  PandaNode::get_class_type());
61  }
62  virtual TypeHandle get_type() const {
63  return get_class_type();
64  }
65  virtual TypeHandle force_init_type() {
66  init_type();
67  return get_class_type();
68  }
69 
70 private:
71  static TypeHandle _type_handle;
72 };
73 
74 #include "bulletBaseCharacterControllerNode.I"
75 
76 #endif // __BULLET_BASE_CHARACTER_CONTROLLER_NODE_H__
77 
A basic node of the scene graph or data graph.
Definition: pandaNode.h:72
virtual bool safe_to_modify_transform() const
Returns true if it is safe to automatically adjust the transform on this kind of node.
Definition: pandaNode.cxx:266
virtual bool safe_to_combine_children() const
Returns true if it is generally safe to combine the children of this PandaNode with each other...
Definition: pandaNode.cxx:295
virtual bool safe_to_combine() const
Returns true if it is generally safe to combine this particular kind of PandaNode with other kinds of...
Definition: pandaNode.cxx:281
virtual CollideMask get_legal_collide_mask() const
Returns the subset of CollideMask bits that may be set for this particular type of PandaNode...
Definition: pandaNode.cxx:2069
virtual bool safe_to_transform() const
Returns true if it is generally safe to transform this particular kind of PandaNode by calling the xf...
Definition: pandaNode.cxx:249
virtual bool safe_to_flatten_below() const
Returns true if a flatten operation may safely continue past this node, or false if nodes below this ...
Definition: pandaNode.cxx:307
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85
virtual bool safe_to_flatten() const
Returns true if it is generally safe to flatten out this particular kind of PandaNode by duplicating ...
Definition: pandaNode.cxx:237