Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 6928 was 6852, checked in by bensch, 19 years ago

orxonox/trunk: small little necessities

File size: 1.1 KB
RevLine 
[6514]1/*!
[6815]2 * @file image_entity.h
3 *  Definition of an ImageEntity
4 */
[6514]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
13#include "vector.h"
14
15
16// FORWARD DECLARATION
17class Model;
18class Material;
19class TiXmlElement;
20
21//! A class that enables the
22class ImageEntity : public PNode, public Element2D {
23
24 public:
25  ImageEntity(const TiXmlElement* root = NULL);
26  virtual ~ImageEntity();
27
28  void init();
[6852]29  virtual void loadParams(const TiXmlElement* root);
[6514]30
[6520]31  void setSize(float sizeX, float sizeY);
[6514]32  void setTexture(const char* textureFile);
33  /** @param rotationSpeed the speed at what the crosshair should rotate */
34  void setRotationSpeed(float rotationSpeed) { this->rotationSpeed = rotationSpeed; };
[6815]35  void toggleBillboarding();
[6514]36
37  virtual void tick(float dt);
38  virtual void draw() const;
39
40 private:
41   Material*        material;             //!< a material for the Aim.
42   float            rotationSpeed;        //!< Speed of the Rotation.
43   bool             bBillboarding;        //!< true if billboarding is on
44};
45
46#endif /* _IMAGE_ENTITY_H */
Note: See TracBrowser for help on using the repository browser.