Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4850 in orxonox.OLD for orxonox/trunk/src/lib/graphics/render2D


Ignore:
Timestamp:
Jul 13, 2005, 7:23:20 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: Text is now too a Element2D, and it does not need the TextEngine anymore to draw it.
optimizing…

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/graphics/render2D/element_2d.h

    r4849 r4850  
    4545class Element2D : virtual public BaseObject {
    4646
    47  public:
    48   Element2D();
    49   virtual ~Element2D();
     47  public:
     48    Element2D();
     49    virtual ~Element2D();
    5050
    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; };
    5757
    58   /** @returns the visibility state */
    59   inline bool isVisible() { return this->visible; };
     58    /** @returns the visibility state */
     59    inline bool isVisible() { return this->visible; };
    6060
    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;
    6464
    6565  private:
    6666    void init();
    6767
    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;
    7375
    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
    7677};
    7778
Note: See TracChangeset for help on using the changeset viewer.