Line | |
---|
1 | /*! |
---|
2 | * @file action_box.h |
---|
3 | */ |
---|
4 | |
---|
5 | #ifndef _ACTION_BOX_H_ |
---|
6 | #define _ACTION_BOX_H_ |
---|
7 | |
---|
8 | #include "world_entity.h" |
---|
9 | #include "plane.h" |
---|
10 | |
---|
11 | class Track; |
---|
12 | |
---|
13 | class ActionBox : public WorldEntity |
---|
14 | { |
---|
15 | public: |
---|
16 | virtual void tick (float time); |
---|
17 | virtual void draw () const; |
---|
18 | |
---|
19 | ActionBox( Track* _track, float width_2, float height_2, float depth, float stretch ); |
---|
20 | ~ActionBox(); |
---|
21 | |
---|
22 | |
---|
23 | bool isPointInBox( const Vector& pos ); |
---|
24 | |
---|
25 | private: |
---|
26 | void updatePlanes(); |
---|
27 | |
---|
28 | float width_2; //! width/2 of near plane |
---|
29 | float height_2; //! height/2 of near plane |
---|
30 | float depth; //! distance between near and far plane |
---|
31 | float stretch; //! far plane will be stretched by this factor |
---|
32 | |
---|
33 | Track* track; |
---|
34 | |
---|
35 | Plane planes[6]; //! planes for collision. normale must point towards middle |
---|
36 | }; |
---|
37 | |
---|
38 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.