Changeset 5769 in orxonox.OLD for trunk/src/lib/coord/p_node.h
- Timestamp:
- Nov 24, 2005, 11:18:39 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/coord/p_node.h
r5750 r5769 30 30 typedef enum 31 31 { 32 PNODE_LOCAL_ROTATE = 1, //!< Rotates all the children around their centers. 33 PNODE_ROTATE_MOVEMENT = 2, //!< Moves all the children around the center of their parent, without the rotation around their own centers. 32 // PARENTAL FOLLOWING 33 PNODE_LOCAL_ROTATE = 0x00000001, //!< Rotates all the children around their centers. 34 PNODE_ROTATE_MOVEMENT = 0x00000002, //!< Moves all the children around the center of their parent, without the rotation around their own centers. 34 35 35 PNODE_MOVEMENT =4, //!< Moves all children along with the parent.36 PNODE_MOVEMENT = 0x00000004, //!< Moves all children along with the parent. 36 37 // special linkage modes 37 PNODE_ALL = 3, //!< Moves all children around the center of their parent, and also rotates their centers 38 PNODE_ROTATE_AND_MOVE = 5 //!< Rotates all children around their axis, and moves them as the Parent Moves, but does not rotate around the center of their parent. 38 PNODE_ALL = 0x00000003, //!< Moves all children around the center of their parent, and also rotates their centers 39 PNODE_ROTATE_AND_MOVE = 0x00000005, //!< Rotates all children around their axis, and moves them as the Parent Moves, but does not rotate around the center of their parent. 40 41 42 PNODE_INACTIVE_NODE = 0x00000010, //!< If the node is Active (if not, it and its child wont be updated). 43 44 // REPARENTING 45 PNODE_REPARENT_TO_NULLPARENT = 0x00000100, 46 PNODE_REPARENT_KEEP_POSITION = 0x00000200, 47 48 49 // DELETION 50 PNODE_PROHIBIT_CHILD_DELETE = 0x00010000, 51 PNODE_PROHIBIT_DELETE_WITH_PARENT = 0x00020000, 39 52 40 53 } PARENT_MODE; 41 54 42 55 //! The default mode of the translation-binding. 43 #define PNODE_PARENT_MODE_DEFAULT PNODE_ALL 56 #define PNODE_PARENT_MODE_DEFAULT PNODE_ALL | PNODE_REPARENT_KEEP_POSITION 44 57 45 58 … … 101 114 void addChild (const char* childName); 102 115 void removeChild (PNode* child); 103 void remove ();116 void removeNode(); 104 117 105 118 void setParent (PNode* parent); … … 108 121 inline PNode* getParent () const { return this->parent; }; 109 122 /** @returns the List of Children of this PNode */ 110 inline const tList<PNode>* getChildren() const { return this->children; };123 // inline const tList<PNode>* getChildren() const { return this->children; }; 111 124 112 125 void setParentSoft(PNode* parentNode, float bias = 1.0); … … 119 132 int getParentMode() const { return this->parentMode; }; 120 133 121 void update (float dt);134 void updateNode (float dt); 122 135 123 void debug (unsigned int depth = 1, unsigned int level = 0) const; 136 void countChildNodes(int& nodes) const; 137 void debugNode (unsigned int depth = 1, unsigned int level = 0) const; 124 138 void debugDraw(unsigned int depth = 1, float size = 1.0, const Vector& color = Vector(1, 0, 0), unsigned int level = 0) const; 125 139
Note: See TracChangeset
for help on using the changeset viewer.