Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/world_entities/weapons/aim.h @ 5711

Last change on this file since 5711 was 5557, checked in by bensch, 19 years ago

orxonox/trunk: more around the aim-class

File size: 1.0 KB
RevLine 
[4779]1/*!
[5556]2 * @file aim.h
3 *  Definition of
4 */
[3329]5
[5556]6#ifndef _AIM_H
7#define _AIM_H
[1853]8
[4849]9#include "p_node.h"
10#include "element_2d.h"
[5557]11
[5405]12// FORWARD DECLARATION
[4830]13class Model;
14class Material;
[4832]15class TiXmlElement;
[3543]16
[5556]17//! An Aim for zooming in on Targets.
18class Aim : public PNode, public Element2D {
[2036]19
[1904]20 public:
[5556]21  Aim(const TiXmlElement* root = NULL);
22  virtual ~Aim();
[1853]23
[4832]24  void init();
25  void loadParams(const TiXmlElement* root);
[3245]26
[5557]27  inline void selectTarget(PNode* target) { this->setParent(target); };
28  inline PNode* getTarget(PNode* target) { return this->getParent(); };
29
30
[4832]31  void setSize(float size);
32  void setTexture(const char* textureFile);
33  /** @param rotationSpeed the speed at what the crosshair should rotate */
[5557]34  inline void setRotationSpeed(float rotationSpeed) { this->rotationSpeed = rotationSpeed; };
[4832]35
[4849]36  virtual void tick(float dt);
37  virtual void draw() const;
[4779]38
[3245]39 private:
[4830]40   Material*        material;             //!< a material for the Aim.
[4832]41   float            rotationSpeed;        //!< Speed of the Rotation.
[1853]42};
43
[5556]44#endif /* _AIM_H */
Note: See TracBrowser for help on using the repository browser.