Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/vs-enhencements/src/world_entities/effects/billboard.h @ 10635

Last change on this file since 10635 was 10635, checked in by nicolasc, 17 years ago

pulse grid update, drawing corrections

File size: 1.2 KB
Line 
1/*!
2 * @file billboard.h
3 */
4
5#ifndef _BILLBOARD_H
6#define _BILLBOARD_H
7
8#include "world_entity.h"
9
10class Material;
11class TiXmlElement;
12class Color;
13
14class Billboard : public WorldEntity
15{
16  ObjectListDeclaration(Billboard);
17  public:
18    Billboard(const TiXmlElement* root = NULL);
19    virtual ~Billboard();
20
21    void init();
22    void loadParams(const TiXmlElement* root);
23
24    void setSize(float sizeX, float sizeY);
25    void setTexture(const std::string& textureFile);
26    void colorTexture(const Color col);
27
28    inline void togglePluse () {this->bPulse = !bPulse; };
29    inline void setPulse () { this->bPulse = true; };
30    inline void setPulse ( bool state ) {this->bPulse = state; };
31    inline float getPulse () { return this->bPulse; };
32
33    inline void setPulseMagnitude(float mag) {this->pulseMagnitude = mag; };
34
35    virtual void tick(float dt);
36    virtual void draw() const;
37
38    inline void setUpdateFunction(float (*updateFct)(float value)) { if( updateFct)  this->updatePulse = updateFct;};
39
40  private:
41
42    float (*updatePulse)(float value);
43
44    Material*        material;
45    Color*           texColor;
46    float sizeX;
47    float sizeY;
48
49    bool bPulse;
50    float pulseMagnitude;
51    float angle;
52    float angularSpeed;
53};
54
55#endif /* _BILLBOARD_H */
Note: See TracBrowser for help on using the repository browser.