| Rev | Line | |
|---|
| [6514] | 1 | /*! |
|---|
| 2 | * @file crosshair.h |
|---|
| 3 | * Definition of ... |
|---|
| 4 | |
|---|
| 5 | */ |
|---|
| 6 | |
|---|
| 7 | #ifndef _IMAGE_ENTITY_H |
|---|
| 8 | #define _IMAGE_ENTITY_H |
|---|
| 9 | |
|---|
| 10 | #include "p_node.h" |
|---|
| 11 | #include "element_2d.h" |
|---|
| 12 | #include "event_listener.h" |
|---|
| 13 | |
|---|
| 14 | #include "vector.h" |
|---|
| 15 | |
|---|
| 16 | |
|---|
| 17 | // FORWARD DECLARATION |
|---|
| 18 | class Model; |
|---|
| 19 | class Material; |
|---|
| 20 | class TiXmlElement; |
|---|
| 21 | |
|---|
| 22 | //! A class that enables the |
|---|
| 23 | class ImageEntity : public PNode, public Element2D { |
|---|
| 24 | |
|---|
| 25 | public: |
|---|
| 26 | ImageEntity(const TiXmlElement* root = NULL); |
|---|
| 27 | virtual ~ImageEntity(); |
|---|
| 28 | |
|---|
| 29 | void init(); |
|---|
| 30 | void loadParams(const TiXmlElement* root); |
|---|
| 31 | |
|---|
| [6520] | 32 | void setSize(float sizeX, float sizeY); |
|---|
| [6514] | 33 | void setTexture(const char* textureFile); |
|---|
| 34 | /** @param rotationSpeed the speed at what the crosshair should rotate */ |
|---|
| 35 | void setRotationSpeed(float rotationSpeed) { this->rotationSpeed = rotationSpeed; }; |
|---|
| 36 | void toggleBillboard(); |
|---|
| 37 | |
|---|
| 38 | virtual void tick(float dt); |
|---|
| 39 | virtual void draw() const; |
|---|
| 40 | |
|---|
| 41 | private: |
|---|
| 42 | Material* material; //!< a material for the Aim. |
|---|
| 43 | float rotationSpeed; //!< Speed of the Rotation. |
|---|
| 44 | bool bBillboarding; //!< true if billboarding is on |
|---|
| 45 | }; |
|---|
| 46 | |
|---|
| 47 | #endif /* _IMAGE_ENTITY_H */ |
|---|
Note: See
TracBrowser
for help on using the repository browser.