Panda3D
bulletBaseCharacterControllerNode.h
Go to the documentation of this file.
1 /**
2  * PANDA 3D SOFTWARE
3  * Copyright (c) Carnegie Mellon University. All rights reserved.
4  *
5  * All use of this software is subject to the terms of the revised BSD
6  * license. You should have received a copy of this license along
7  * with this source code in a file named "LICENSE."
8  *
9  * @file bulletBaseCharacterControllerNode.h
10  * @author enn0x
11  * @date 2010-11-21
12  */
13 
14 #ifndef __BULLET_BASE_CHARACTER_CONTROLLER_NODE_H__
15 #define __BULLET_BASE_CHARACTER_CONTROLLER_NODE_H__
16 
17 #include "pandabase.h"
18 
19 #include "bullet_includes.h"
20 #include "bullet_utils.h"
21 #include "bulletShape.h"
22 
23 #include "pandaNode.h"
24 #include "collideMask.h"
25 
26 /**
27  *
28  */
29 class EXPCL_PANDABULLET BulletBaseCharacterControllerNode : public PandaNode {
30 PUBLISHED:
31  explicit BulletBaseCharacterControllerNode(const char *name="character");
32 
33 public:
34  virtual CollideMask get_legal_collide_mask() const;
35 
36  virtual bool safe_to_flatten() const;
37  virtual bool safe_to_transform() const;
38  virtual bool safe_to_modify_transform() const;
39  virtual bool safe_to_combine() const;
40  virtual bool safe_to_combine_children() const;
41  virtual bool safe_to_flatten_below() const;
42 
43  virtual btPairCachingGhostObject *get_ghost() const = 0;
44  virtual btCharacterControllerInterface *get_character() const = 0;
45 
46  virtual void do_sync_p2b(PN_stdfloat dt, int num_substeps) = 0;
47  virtual void do_sync_b2p() = 0;
48 
49 public:
50  static TypeHandle get_class_type() {
51  return _type_handle;
52  }
53  static void init_type() {
54  PandaNode::init_type();
55  register_type(_type_handle, "BulletBaseCharacterControllerNode",
56  PandaNode::get_class_type());
57  }
58  virtual TypeHandle get_type() const {
59  return get_class_type();
60  }
61  virtual TypeHandle force_init_type() {
62  init_type();
63  return get_class_type();
64  }
65 
66 private:
67  static TypeHandle _type_handle;
68 };
69 
71 
72 #endif // __BULLET_BASE_CHARACTER_CONTROLLER_NODE_H__
pandaNode.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
pandabase.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
register_type
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
Definition: register_type.I:22
bulletBaseCharacterControllerNode.I
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
BitMask< uint32_t, 32 >
bullet_includes.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
BulletBaseCharacterControllerNode
Definition: bulletBaseCharacterControllerNode.h:29
TypeHandle
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:81
PandaNode::safe_to_transform
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:204
collideMask.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
bullet_utils.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PandaNode::safe_to_flatten_below
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:247
bulletShape.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PandaNode::safe_to_flatten
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:195
PandaNode::safe_to_modify_transform
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:217
PandaNode::safe_to_combine_children
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:238
PandaNode::get_legal_collide_mask
get_legal_collide_mask
Returns the subset of CollideMask bits that may be set for this particular type of PandaNode.
Definition: pandaNode.h:265
PandaNode
A basic node of the scene graph or data graph.
Definition: pandaNode.h:65
PandaNode::safe_to_combine
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:228