Last change
on this file since 4845 was
4843,
checked in by bensch, 19 years ago
|
orxonox/trunk: included libORXquadtree.a
|
File size:
1.3 KB
|
Line | |
---|
1 | /*! |
---|
2 | * @file element_2d.h |
---|
3 | * @brief Definition of the 2D elements rendered on top through the GraphicsEngine |
---|
4 | */ |
---|
5 | |
---|
6 | #ifndef _ELEMENT_2D_H |
---|
7 | #define _ELEMENT_2D_H |
---|
8 | |
---|
9 | #include "base_object.h" |
---|
10 | |
---|
11 | // FORWARD DECLARATION |
---|
12 | class PNode; |
---|
13 | |
---|
14 | //!< An enumerator defining the Depth of a 2D-element. |
---|
15 | typedef enum |
---|
16 | { |
---|
17 | E2D_TOP, //!< Will be rendered on top of everything else |
---|
18 | E2D_MEDIUM, //!< Will be rendered on the medium Layer. |
---|
19 | E2D_BOTTOM, //!< Will be rendered on the bottom Layer |
---|
20 | E2D_BELOW_ALL //!< Will be rendered below the 3D-scene. @todo make this work. |
---|
21 | } E2DLayer; |
---|
22 | |
---|
23 | |
---|
24 | typedef enum |
---|
25 | { |
---|
26 | ELEM2D_ALIGN_LEFT, |
---|
27 | ELEM2D_ALIGN_RIGHT, |
---|
28 | ELEM2D_ALIGN_CENTER, |
---|
29 | ELEM2D_ALIGN_SCREEN_CENTER |
---|
30 | } ELEM2D_ALIGNMENT; |
---|
31 | |
---|
32 | |
---|
33 | //! A class for ... |
---|
34 | class Element2D : public BaseObject { |
---|
35 | |
---|
36 | public: |
---|
37 | Element2D(); |
---|
38 | virtual ~Element2D(); |
---|
39 | |
---|
40 | |
---|
41 | void setPosition(int xCoord, int yCoord); |
---|
42 | void setLayer(E2DLayer layer); |
---|
43 | |
---|
44 | |
---|
45 | void positioning(); |
---|
46 | virtual void draw() const = NULL; |
---|
47 | |
---|
48 | private: |
---|
49 | bool visible; |
---|
50 | int position2D[2]; //!< X-coord, Y-Coord |
---|
51 | E2DLayer layer; |
---|
52 | |
---|
53 | ELEM2D_ALIGNMENT alignment; |
---|
54 | PNode* bindNode; //!< a node over which to display this 2D-element |
---|
55 | }; |
---|
56 | |
---|
57 | |
---|
58 | #endif /* _ELEMENT_2D_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.