Last change
on this file since 10753 was
10698,
checked in by snellen, 17 years ago
|
merged adm, hud, vs-enhancements : beni's responsible for this commit. blame him!
|
File size:
1.3 KB
|
Line | |
---|
1 | /*! |
---|
2 | * @file billboard.h |
---|
3 | */ |
---|
4 | |
---|
5 | #ifndef _BILLBOARD_H |
---|
6 | #define _BILLBOARD_H |
---|
7 | |
---|
8 | #include "world_entity.h" |
---|
9 | |
---|
10 | class Material; |
---|
11 | class TiXmlElement; |
---|
12 | class Color; |
---|
13 | |
---|
14 | class 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 | //!< Pulsing Capability, changes size of the grid |
---|
29 | inline void togglePluse () {this->bPulse = !bPulse; }; |
---|
30 | inline void setPulse () { this->bPulse = true; }; |
---|
31 | inline void setPulse ( bool state ) {this->bPulse = state; }; |
---|
32 | inline float getPulse () { return this->bPulse; }; |
---|
33 | |
---|
34 | inline void setPulseMagnitude(float mag) {this->pulseMagnitude = mag; }; |
---|
35 | |
---|
36 | virtual void tick(float dt); |
---|
37 | virtual void draw() const; |
---|
38 | |
---|
39 | inline void setUpdateFunction(float (*updateFct)(float value)) { if( updateFct) this->updatePulse = updateFct;}; |
---|
40 | |
---|
41 | private: |
---|
42 | |
---|
43 | float (*updatePulse)(float value); |
---|
44 | |
---|
45 | Material* material; |
---|
46 | Color* texColor; |
---|
47 | float sizeX; |
---|
48 | float sizeY; |
---|
49 | |
---|
50 | bool bPulse; |
---|
51 | float pulseMagnitude; |
---|
52 | float curMagnitude; |
---|
53 | float angle; |
---|
54 | float angularSpeed; |
---|
55 | }; |
---|
56 | |
---|
57 | #endif /* _BILLBOARD_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.