Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

added a pulsing capability for the billboard ( I need it for the Plasma Projectile)

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    virtual void tick(float dt);
34    virtual void draw() const;
35
36    inline void setUpdateFunction(float (*updateFct)(float value)) { if( updateFct)  this->updatePulse = updateFct;};
37
38  private:
39
40    float (*updatePulse)(float value);
41
42    Material*        material;
43    Color*           texColor;
44    float sizeX;
45    float sizeY;
46
47    bool bPulse;
48    float pulseMagnitude;
49    float angle;
50    float angularSpeed;
51};
52
53#endif /* _BILLBOARD_H */
Note: See TracBrowser for help on using the repository browser.