Changeset 5082 in orxonox.OLD for trunk/src/lib/graphics/render2D/element_2d.h
- Timestamp:
- Aug 19, 2005, 1:29:18 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/render2D/element_2d.h
r5081 r5082 40 40 typedef enum 41 41 { 42 E2D_ LOCAL_ROTATE= 1, //!< Rotates all the children around their centers.43 E2D_ ROTATE_MOVEMENT= 2, //!< Moves all the children around the center of their parent, without the rotation around their own centers.44 45 E2D_ MOVEMENT= 4, //!< Moves all children along with the parent.42 E2D_PARENT_LOCAL_ROTATE = 1, //!< Rotates all the children around their centers. 43 E2D_PARENT_ROTATE_MOVEMENT = 2, //!< Moves all the children around the center of their parent, without the rotation around their own centers. 44 45 E2D_PARENT_MOVEMENT = 4, //!< Moves all children along with the parent. 46 46 // special linkage modes 47 E2D_ ALL= 3, //!< Moves all children around the center of their parent, and also rotates their centers48 E2D_ 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.47 E2D_PARENT_ALL = 3, //!< Moves all children around the center of their parent, and also rotates their centers 48 E2D_PARENT_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. 49 49 } E2D_PARENT_MODE; 50 #define E2D_DEFAULT_PARENTING_MODE E2D_ ALL50 #define E2D_DEFAULT_PARENTING_MODE E2D_PARENT_ALL 51 51 52 52 //! A Struct defining the Position of an Element in 2D-space … … 137 137 Element2D* getParent () const { return this->parent; }; 138 138 139 void softReparent (PNode* parentNode, float bias = 1.0);140 void softReparent (const char* parentName, float bias = 1.0);139 void softReparent2D(Element2D* parentNode, float bias = 1.0); 140 void softReparent2D(const char* parentName, float bias = 1.0); 141 141 142 142 /** @param parentMode sets the parentingMode of this Node */ … … 152 152 153 153 // helper functions // 154 static const char* parentingModeToChar (int parentingMode);155 static E2D_PARENT_MODE charToParentingMode (const char* parentingMode);154 static const char* parentingModeToChar2D(int parentingMode); 155 static E2D_PARENT_MODE charToParentingMode2D(const char* parentingMode); 156 156 157 157 private: … … 213 213 }; 214 214 215 //! The top joint of all Element2D's every Element2D is somehow connected to this one. 216 class NullElement2D : public Element2D { 217 218 public: 219 /** @returns a Pointer to the only object of this Class */ 220 inline static NullElement2D* getInstance() { if (!singletonRef) singletonRef = new NullElement2D(); return singletonRef; }; 221 virtual ~NullElement2D (); 222 223 private: 224 NullElement2D (); 225 virtual void draw() const {}; 226 227 private: 228 static NullElement2D* singletonRef; //!< A reference to the NullElement2D 229 230 }; 215 231 216 232 #endif /* _ELEMENT_2D_H */
Note: See TracChangeset
for help on using the changeset viewer.