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
RevLine 
[7111]1/*!
[8255]2 * @file billboard.h
[7113]3 */
[7111]4
[8255]5#ifndef _BILLBOARD_H
6#define _BILLBOARD_H
[7111]7
8#include "world_entity.h"
9
10class Material;
[8255]11class TiXmlElement;
[10433]12class Color;
[7111]13
[8255]14class Billboard : public WorldEntity
[7111]15{
[9869]16  ObjectListDeclaration(Billboard);
[7111]17  public:
[8255]18    Billboard(const TiXmlElement* root = NULL);
19    virtual ~Billboard();
[7111]20
[8255]21    void init();
22    void loadParams(const TiXmlElement* root);
[7111]23
[8255]24    void setSize(float sizeX, float sizeY);
25    void setTexture(const std::string& textureFile);
[10433]26    void colorTexture(const Color col);
[8255]27
[10633]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
[8255]33    virtual void tick(float dt);
[7111]34    virtual void draw() const;
35
[10633]36    inline void setUpdateFunction(float (*updateFct)(float value)) { if( updateFct)  this->updatePulse = updateFct;};
37
[7111]38  private:
[10633]39
40    float (*updatePulse)(float value);
41
[8255]42    Material*        material;
[10433]43    Color*           texColor;
[8255]44    float sizeX;
45    float sizeY;
[10633]46
47    bool bPulse;
48    float pulseMagnitude;
49    float angle;
50    float angularSpeed;
[7111]51};
52
[8255]53#endif /* _BILLBOARD_H */
Note: See TracBrowser for help on using the repository browser.