Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/playability/src/world_entities/effects/wobblegrid.h @ 10154

Last change on this file since 10154 was 10154, checked in by marcscha, 17 years ago

Wobblegrid addition for alienweapons

File size: 895 bytes
Line 
1/*!
2 * @file wobblegrid.h
3 */
4
5#ifndef _WOBBLEGRID_H
6#define _WOBBLEGRID_H
7
8#include "world_entity.h"
9
10class Material;
11class TiXmlElement;
12class Grid;
13
14class Wobblegrid : public WorldEntity
15{
16  ObjectListDeclaration(Wobblegrid);
17  public:
18    Wobblegrid(int size, const TiXmlElement* root = NULL);
19    Wobblegrid( const TiXmlElement* root = NULL);
20    virtual ~Wobblegrid();
21
22    void init();
23    void loadParams(const TiXmlElement* root);
24
25    void setTexture(const std::string& textureFile);
26
27    inline float sgn(float x) { if(likely(x==0)) return 0.0f; else return x / fabsf(x);};
28    virtual void tick(float dt);
29    virtual void draw() const;
30
31  private:
32    Material*        material;
33    Grid*            grid;      //!< current projected positions transformed into billboard state
34
35    int subdivision;
36
37    int size;
38
39    float angle;
40    float angularSpeed;
41};
42
43#endif /* _WOBBLEGRID_H */
Note: See TracBrowser for help on using the repository browser.