| Line |  | 
|---|
| 1 | /*! | 
|---|
| 2 | * @file billboard.h | 
|---|
| 3 | *  Definition of a billboard | 
|---|
| 4 | */ | 
|---|
| 5 |  | 
|---|
| 6 | #ifndef _BILLBOARD_H | 
|---|
| 7 | #define _BILLBOARD_H | 
|---|
| 8 |  | 
|---|
| 9 |  | 
|---|
| 10 | #include "element_2d.h" | 
|---|
| 11 |  | 
|---|
| 12 | #include "vector.h" | 
|---|
| 13 |  | 
|---|
| 14 |  | 
|---|
| 15 |  | 
|---|
| 16 | class Model; | 
|---|
| 17 | class Material; | 
|---|
| 18 | class TiXmlElement; | 
|---|
| 19 |  | 
|---|
| 20 | //! A class that enables the | 
|---|
| 21 | class Billboard :  public Element2D | 
|---|
| 22 | { | 
|---|
| 23 |  | 
|---|
| 24 | public: | 
|---|
| 25 | Billboard(const TiXmlElement* root = NULL); | 
|---|
| 26 | virtual ~Billboard(); | 
|---|
| 27 |  | 
|---|
| 28 | void init(); | 
|---|
| 29 | void loadParams(const TiXmlElement* root); | 
|---|
| 30 |  | 
|---|
| 31 | void setSize(float sizeX, float sizeY); | 
|---|
| 32 | void setTexture(const std::string& textureFile); | 
|---|
| 33 | void attachTo(PNode* pnode); | 
|---|
| 34 |  | 
|---|
| 35 | virtual void tick(float dt); | 
|---|
| 36 | virtual void draw() const; | 
|---|
| 37 |  | 
|---|
| 38 |  | 
|---|
| 39 | private: | 
|---|
| 40 | Material*        material;             //!< a material for the Billboard | 
|---|
| 41 | float            rotationSpeed;        //!< Speed of the Rotation. | 
|---|
| 42 |  | 
|---|
| 43 | PNode*           source;               //!< the source attached to it | 
|---|
| 44 |  | 
|---|
| 45 | }; | 
|---|
| 46 |  | 
|---|
| 47 | #endif /* _BILLBOARD_H */ | 
|---|
       
      
      Note: See 
TracBrowser
        for help on using the repository browser.