Last change
on this file since 10533 was
10368,
checked in by patrick, 18 years ago
|
merged the branche playability into the trunk
|
File size:
1.1 KB
|
Line | |
---|
1 | /*! |
---|
2 | * @file wobblegrid.h |
---|
3 | */ |
---|
4 | |
---|
5 | #ifndef _WOBBLEGRID_H |
---|
6 | #define _WOBBLEGRID_H |
---|
7 | |
---|
8 | #include "world_entity.h" |
---|
9 | |
---|
10 | class Material; |
---|
11 | class TiXmlElement; |
---|
12 | class Grid; |
---|
13 | |
---|
14 | class 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 | inline void setUpdateFunction(float (*updateFct)(float value)) { if( updateFct) this->updateWobble = updateFct;}; |
---|
32 | |
---|
33 | private: |
---|
34 | float (*updateWobble)(float value); |
---|
35 | |
---|
36 | void orient(); |
---|
37 | |
---|
38 | Material* material; |
---|
39 | Grid* grid; //!< current projected positions transformed into billboard state |
---|
40 | |
---|
41 | int subdivision; |
---|
42 | |
---|
43 | int size; |
---|
44 | |
---|
45 | float angle; |
---|
46 | float angularSpeed; |
---|
47 | }; |
---|
48 | |
---|
49 | #endif /* _WOBBLEGRID_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.