Changeset 4850 in orxonox.OLD for orxonox/trunk/src/lib/graphics/render2D
- Timestamp:
- Jul 13, 2005, 7:23:20 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/graphics/render2D/element_2d.h
r4849 r4850 45 45 class Element2D : virtual public BaseObject { 46 46 47 public:48 Element2D();49 virtual ~Element2D();47 public: 48 Element2D(); 49 virtual ~Element2D(); 50 50 51 void setPosition(int xCoord, int yCoord);52 void setLayer(E2DLayer layer);53 /** @param visible true if the Element should be visible false otherwise (will not be rendered) */54 inline void setVisibility(bool visible) { this->visible = visible; };55 /** @param bindNode the Node this 2D-element should follow. if NULL the Element will not follow anything */56 inline void setBindNode(const PNode* bindNode) { this->bindNode = bindNode; };51 void setPosition2D(int xCoord, int yCoord); 52 void setLayer(E2DLayer layer); 53 /** @param visible true if the Element should be visible false otherwise (will not be rendered) */ 54 inline void setVisibility(bool visible) { this->visible = visible; }; 55 /** @param bindNode the Node this 2D-element should follow. if NULL the Element will not follow anything */ 56 // inline void setBindNode(const PNode* bindNode) { this->bindNode = bindNode; }; 57 57 58 /** @returns the visibility state */59 inline bool isVisible() { return this->visible; };58 /** @returns the visibility state */ 59 inline bool isVisible() { return this->visible; }; 60 60 61 void positioning();62 virtual void tick(float dt);63 virtual void draw() const = NULL;61 void positioning(); 62 virtual void tick(float dt); 63 virtual void draw() const = NULL; 64 64 65 65 private: 66 66 void init(); 67 67 68 private: 69 bool visible; 70 int relPos2D[2]; //!< X-coord, Y-Coord (relative to the Coordinates of the alignment if given.) 71 Position2D absPos2D; //!< The absolute position of the 2D-Element. 72 E2DLayer layer; 68 protected: 69 const PNode* bindNode; //!< a node over which to display this 2D-element 70 private: 71 bool visible; 72 int relPos2D[2]; //!< X-coord, Y-Coord (relative to the Coordinates of the alignment if given.) 73 Position2D absPos2D; //!< The absolute position of the 2D-Element. 74 E2DLayer layer; 73 75 74 E2D_ALIGNMENT alignment; //!< How the Element is aligned around its Position 75 const PNode* bindNode; //!< a node over which to display this 2D-element 76 E2D_ALIGNMENT alignment; //!< How the Element is aligned around its Position 76 77 }; 77 78
Note: See TracChangeset
for help on using the changeset viewer.