Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5769 in orxonox.OLD for trunk/src/lib/coord/p_node.h


Ignore:
Timestamp:
Nov 24, 2005, 11:18:39 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: sync

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/coord/p_node.h

    r5750 r5769  
    3030typedef enum
    3131{
    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.
    3435
    35   PNODE_MOVEMENT              =   4,    //!< Moves all children along with the parent.
     36  PNODE_MOVEMENT                       = 0x00000004,    //!< Moves all children along with the parent.
    3637// 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,
    3952
    4053} PARENT_MODE;
    4154
    4255//! 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
    4457
    4558
     
    101114  void addChild (const char* childName);
    102115  void removeChild (PNode* child);
    103   void remove();
     116  void removeNode();
    104117
    105118  void setParent (PNode* parent);
     
    108121  inline PNode* getParent () const { return this->parent; };
    109122  /** @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; };
    111124
    112125  void setParentSoft(PNode* parentNode, float bias = 1.0);
     
    119132  int getParentMode() const { return this->parentMode; };
    120133
    121   void update (float dt);
     134  void updateNode (float dt);
    122135
    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;
    124138  void debugDraw(unsigned int depth = 1, float size = 1.0, const Vector& color = Vector(1, 0, 0), unsigned int level = 0) const;
    125139
Note: See TracChangeset for help on using the changeset viewer.