Panda3D
|
00001 // Filename: bulletBaseCharacterControllerNode.cxx 00002 // Created by: enn0x (21Nov10) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 #include "bulletBaseCharacterControllerNode.h" 00016 00017 TypeHandle BulletBaseCharacterControllerNode::_type_handle; 00018 00019 //////////////////////////////////////////////////////////////////// 00020 // Function: BulletBaseCharacterControllerNode::Constructor 00021 // Access: Published 00022 // Description: 00023 //////////////////////////////////////////////////////////////////// 00024 BulletBaseCharacterControllerNode:: 00025 BulletBaseCharacterControllerNode(const char *name) : PandaNode(name) { 00026 00027 // Default collide mask 00028 set_into_collide_mask(CollideMask::all_on()); 00029 } 00030 00031 //////////////////////////////////////////////////////////////////// 00032 // Function: BulletBaseCharacterControllerNode::get_legal_collide_mask 00033 // Access: Public, virtual 00034 // Description: Returns the subset of CollideMask bits that may be 00035 // set for this particular type of PandaNode. For 00036 // CharacterControllerNodes this returns all bits on. 00037 //////////////////////////////////////////////////////////////////// 00038 CollideMask BulletBaseCharacterControllerNode:: 00039 get_legal_collide_mask() const { 00040 00041 return CollideMask::all_on(); 00042 } 00043 00044 //////////////////////////////////////////////////////////////////// 00045 // Function: BulletBaseCharacterControllerNode::safe_to_flatten 00046 // Access: Public, Virtual 00047 // Description: Returns true if it is generally safe to flatten out 00048 // this particular kind of Node by duplicating 00049 // instances, false otherwise (for instance, a Camera 00050 // cannot be safely flattened, because the Camera 00051 // pointer itself is meaningful). 00052 //////////////////////////////////////////////////////////////////// 00053 bool BulletBaseCharacterControllerNode:: 00054 safe_to_flatten() const { 00055 00056 return false; 00057 } 00058 00059 //////////////////////////////////////////////////////////////////// 00060 // Function: BulletBaseCharacterControllerNode::safe_to_modify_transform 00061 // Access: Public, Virtual 00062 // Description: Returns true if it is safe to automatically adjust 00063 // the transform on this kind of node. Usually, this is 00064 // only a bad idea if the user expects to find a 00065 // particular transform on the node. 00066 // 00067 // ModelNodes with the preserve_transform flag set are 00068 // presently the only kinds of nodes that should not 00069 // have their transform even adjusted. 00070 //////////////////////////////////////////////////////////////////// 00071 bool BulletBaseCharacterControllerNode:: 00072 safe_to_modify_transform() const { 00073 00074 return false; 00075 } 00076 00077 //////////////////////////////////////////////////////////////////// 00078 // Function: BulletBaseCharacterControllerNode::safe_to_combine 00079 // Access: Public, Virtual 00080 // Description: Returns true if it is generally safe to combine this 00081 // particular kind of PandaNode with other kinds of 00082 // PandaNodes of compatible type, adding children or 00083 // whatever. For instance, an LODNode should not be 00084 // combined with any other PandaNode, because its set of 00085 // children is meaningful. 00086 //////////////////////////////////////////////////////////////////// 00087 bool BulletBaseCharacterControllerNode:: 00088 safe_to_combine() const { 00089 00090 return false; 00091 } 00092 00093 //////////////////////////////////////////////////////////////////// 00094 // Function: BulletBaseCharacterControllerNode::safe_to_combine_children 00095 // Access: Public, Virtual 00096 // Description: Returns true if it is generally safe to combine the 00097 // children of this PandaNode with each other. For 00098 // instance, an LODNode's children should not be 00099 // combined with each other, because the set of children 00100 // is meaningful. 00101 //////////////////////////////////////////////////////////////////// 00102 bool BulletBaseCharacterControllerNode:: 00103 safe_to_combine_children() const { 00104 00105 return false; 00106 } 00107 00108 //////////////////////////////////////////////////////////////////// 00109 // Function: BulletBaseCharacterControllerNode::safe_to_flatten_below 00110 // Access: Public, Virtual 00111 // Description: Returns true if a flatten operation may safely 00112 // continue past this node, or false if nodes below this 00113 // node may not be molested. 00114 //////////////////////////////////////////////////////////////////// 00115 bool BulletBaseCharacterControllerNode:: 00116 safe_to_flatten_below() const { 00117 00118 return false; 00119 } 00120 00121 //////////////////////////////////////////////////////////////////// 00122 // Function: BulletBaseCharacterControllerNode::safe_to_transform 00123 // Access: Public, Virtual 00124 // Description: Returns true if it is generally safe to transform 00125 // this particular kind of Node by calling the xform() 00126 // method, false otherwise. For instance, it's usually 00127 // a bad idea to attempt to xform a Character. 00128 //////////////////////////////////////////////////////////////////// 00129 bool BulletBaseCharacterControllerNode:: 00130 safe_to_transform() const { 00131 00132 return false; 00133 } 00134