Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
Jul 2, 2005, 2:23:41 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: addChild and setParentMode via XML-loading

File:
1 edited

Legend:

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

    r4761 r4765  
    3232template<class T> class tList;
    3333
    34 // linkage modes
    35 #define PNODE_LOCAL_ROTATE       1    //!< Rotates all the children around their centers.
    36 #define PNODE_ROTATE_MOVEMENT    2    //!< Moves all the children around the center of their parent, without the rotation around their own centers.
    37 #define PNODE_MOVEMENT           4    //!< Moves all children along with the parent.
     34//! Parental linkage modes
     35typedef enum
     36{
     37  PNODE_LOCAL_ROTATE          =   1,    //!< Rotates all the children around their centers.
     38  PNODE_ROTATE_MOVEMENT       =   2,    //!< Moves all the children around the center of their parent, without the rotation around their own centers.
     39
     40  PNODE_MOVEMENT              =   4,    //!< Moves all children along with the parent.
    3841// special linkage modes
    39 #define PNODE_ALL                3    //!< Moves all children around the center of their parent, and also rotates their centers
    40 #define 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.
     42  PNODE_ALL                   =   3,    //!< Moves all children around the center of their parent, and also rotates their centers
     43  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.
     44
     45} PARENT_MODE;
    4146
    4247//! The default mode of the translation-binding.
     
    8489
    8590  void addChild (PNode* pNode, int parentingMode = DEFAULT_MODE);
     91  void addChild (const char* childName);
    8692  void removeChild (PNode* pNode);
    8793  void remove();
     
    9096  void setParent (const char* name);
    9197
    92   void setParentMode (unsigned int parentingMode);
     98  void setParentMode (PARENT_MODE parentMode);
     99  void setParentMode (const char* parentingMode);
    93100  /** \returns the Parenting mode of this node */
    94101  int getParentMode() const { return this->parentMode; };
Note: See TracChangeset for help on using the changeset viewer.