Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
Mar 15, 2005, 7:27:44 PM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: patched the pNode, now there exists the ability for advanced linkage-modes

File:
1 edited

Legend:

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

    r3554 r3565  
    3030
    3131//! enumeration for the different translation-binding-types
    32 typedef enum parentingMode {MOVEMENT = 0, ROTATION, ALL};
     32//typedef enum parentingMode {PNODE_LOCAL_ROTATE, PNODE_ROTATE_MOVEMENT, PNODE_ALL, PNODE_MOVEMENT, PNODE_ROTATE_AND_MOVE};
     33// linkage modes
     34#define PNODE_LOCAL_ROTATE       1    //!< Rotates all the children around their centers.
     35#define PNODE_ROTATE_MOVEMENT    2    //!< Moves all the children around the center of their parent, without the rotation around their own centers.
     36#define PNODE_MOVEMENT           4    //!< Moves all children along with the parent.
     37// special linkage modes
     38#define PNODE_ALL                3    //!< Moves all children around the center of their parent, and also rotates their centers
     39#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.
     40
    3341//! The default mode of the translation-binding.
    34 #define DEFAULT_MODE ALL
     42#define DEFAULT_MODE PNODE_ALL
    3543
    3644//! Patent Node is a Engine to calculate the position of an Object in respect to the position of its parent.
     
    6371
    6472  void addChild (PNode* pNode);
    65   void addChild (PNode* pNode, parentingMode mode);
     73  void addChild (PNode* pNode, int parentingMode);
    6674  void removeChild (PNode* pNode);
    6775  void remove();
     
    7179  void parentCoorChanged ();
    7280  void parentDirChanged ();
    73   void setMode (parentingMode mode);
    74   parentingMode getMode();
     81  void setMode (int parentingMode);
     82  int getMode();
    7583
    7684  virtual void update ();
     
    99107  Quaternion absDirection; //!< absolute direvtion in the world ( from (0,0,1) )
    100108
    101   parentingMode mode;       //!< the mode of the binding
     109  int mode;                //!< the mode of the binding
    102110
    103111};
Note: See TracChangeset for help on using the changeset viewer.