Panda3D
bulletBaseCharacterControllerNode.cxx
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.cxx
10  * @author enn0x
11  * @date 2010-11-21
12  */
13 
15 
16 TypeHandle BulletBaseCharacterControllerNode::_type_handle;
17 
18 /**
19  *
20  */
21 BulletBaseCharacterControllerNode::
22 BulletBaseCharacterControllerNode(const char *name) : PandaNode(name) {
23 
24  // Default collide mask
25  set_into_collide_mask(CollideMask::all_on());
26 }
27 
28 /**
29  * Returns the subset of CollideMask bits that may be set for this particular
30  * type of PandaNode. For CharacterControllerNodes this returns all bits on.
31  */
34 
35  return CollideMask::all_on();
36 }
37 
38 /**
39  * Returns true if it is generally safe to flatten out this particular kind of
40  * Node by duplicating instances, false otherwise (for instance, a Camera
41  * cannot be safely flattened, because the Camera pointer itself is
42  * meaningful).
43  */
45 safe_to_flatten() const {
46 
47  return false;
48 }
49 
50 /**
51  * Returns true if it is safe to automatically adjust the transform on this
52  * kind of node. Usually, this is only a bad idea if the user expects to find
53  * a particular transform on the node.
54  *
55  * ModelNodes with the preserve_transform flag set are presently the only
56  * kinds of nodes that should not have their transform even adjusted.
57  */
60 
61  return false;
62 }
63 
64 /**
65  * Returns true if it is generally safe to combine this particular kind of
66  * PandaNode with other kinds of PandaNodes of compatible type, adding
67  * children or whatever. For instance, an LODNode should not be combined with
68  * any other PandaNode, because its set of children is meaningful.
69  */
71 safe_to_combine() const {
72 
73  return false;
74 }
75 
76 /**
77  * Returns true if it is generally safe to combine the children of this
78  * PandaNode with each other. For instance, an LODNode's children should not
79  * be combined with each other, because the set of children is meaningful.
80  */
83 
84  return false;
85 }
86 
87 /**
88  * Returns true if a flatten operation may safely continue past this node, or
89  * false if nodes below this node may not be molested.
90  */
93 
94  return false;
95 }
96 
97 /**
98  * Returns true if it is generally safe to transform this particular kind of
99  * Node by calling the xform() method, false otherwise. For instance, it's
100  * usually a bad idea to attempt to xform a Character.
101  */
104 
105  return false;
106 }
A basic node of the scene graph or data graph.
Definition: pandaNode.h:64
virtual bool safe_to_combine_children() const
Returns true if it is generally safe to combine the children of this PandaNode with each other.
static BitMask< WType, nbits > all_on()
Returns a BitMask whose bits are all on.
Definition: bitMask.I:32
virtual CollideMask get_legal_collide_mask() const
Returns the subset of CollideMask bits that may be set for this particular type of PandaNode.
virtual bool safe_to_combine() const
Returns true if it is generally safe to combine this particular kind of PandaNode with other kinds of...
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 ...
virtual bool safe_to_transform() const
Returns true if it is generally safe to transform this particular kind of Node by calling the xform()...
virtual bool safe_to_modify_transform() const
Returns true if it is safe to automatically adjust the transform on this kind of node.
virtual bool safe_to_flatten() const
Returns true if it is generally safe to flatten out this particular kind of Node by duplicating insta...
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:81
A general bitmask class.
Definition: bitMask.h:32
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.