Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/network/src/lib/graphics/render2D/billboard.h @ 6781

Last change on this file since 6781 was 6781, checked in by patrick, 20 years ago

network: billboard compiles again

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