Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/world_entities/elements/image_entity.h @ 7730

Last change on this file since 7730 was 7730, checked in by bensch, 18 years ago

orxonox/trunk: testing if it works on WIndows like this

File size: 1.0 KB
Line 
1/*!
2 * @file image_entity.h
3 *  Definition of an ImageEntity
4 */
5
6#ifndef _IMAGE_ENTITY_H
7#define _IMAGE_ENTITY_H
8
9#include "p_node.h"
10#include "element_2d.h"
11#include "event_listener.h"
12#include "material.h"
13
14//! A class that enables the
15class ImageEntity : public PNode, public Element2D {
16
17 public:
18  ImageEntity(const TiXmlElement* root = NULL);
19  virtual ~ImageEntity();
20
21  void init();
22  virtual void loadParams(const TiXmlElement* root);
23
24  void setSize(float sizeX, float sizeY);
25  void setTexture(const std::string& textureFile);
26  /** @param rotationSpeed the speed at what the crosshair should rotate */
27  void setRotationSpeed(float rotationSpeed) { this->rotationSpeed = rotationSpeed; };
28  void toggleBillboarding();
29
30  virtual void tick(float dt);
31  virtual void draw() const;
32
33 private:
34   Material         material;             //!< a material for the Aim.
35   float            rotationSpeed;        //!< Speed of the Rotation.
36   bool             bBillboarding;        //!< true if billboarding is on
37};
38
39#endif /* _IMAGE_ENTITY_H */
Note: See TracBrowser for help on using the repository browser.