Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/terrain/src/world_entities/elements/image_entity.h @ 10642

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

orxonox/trunk: merged the new_class_id branche back to the trunk.
merged with command:
svn merge https://svn.orxonox.net/orxonox/branches/new_class_id trunk -r9683:HEAD
no conflicts… puh..

File size: 1.1 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
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  ObjectListDeclaration(ImageEntity);
24
25 public:
26  ImageEntity(const TiXmlElement* root = NULL);
27  virtual ~ImageEntity();
28
29  void init();
30  virtual void loadParams(const TiXmlElement* root);
31
32  void setSize(float sizeX, float sizeY);
33  void setTexture(const std::string& textureFile);
34  /** @param rotationSpeed the speed at what the crosshair should rotate */
35  void setRotationSpeed(float rotationSpeed) { this->rotationSpeed = rotationSpeed; };
36  void toggleBillboarding();
37
38  virtual void tick(float dt);
39  virtual void draw() const;
40
41 private:
42   Material*        material;             //!< a material for the Aim.
43   float            rotationSpeed;        //!< Speed of the Rotation.
44   bool             bBillboarding;        //!< true if billboarding is on
45};
46
47#endif /* _IMAGE_ENTITY_H */
Note: See TracBrowser for help on using the repository browser.