Last change
on this file since 10767 was
10698,
checked in by snellen, 18 years ago
|
merged adm, hud, vs-enhancements : beni's responsible for this commit. blame him!
|
File size:
988 bytes
|
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 | float getWidth_2(){ return width_2; } |
---|
26 | float getHeight_2(){ return height_2; } |
---|
27 | float getDepth(){ return depth; } |
---|
28 | float getStretch(){ return stretch; } |
---|
29 | |
---|
30 | private: |
---|
31 | void updatePlanes(); |
---|
32 | |
---|
33 | float width_2; //! width/2 of near plane |
---|
34 | float height_2; //! height/2 of near plane |
---|
35 | float depth; //! distance between near and far plane |
---|
36 | float stretch; //! far plane will be stretched by this factor |
---|
37 | |
---|
38 | Track* track; |
---|
39 | |
---|
40 | Plane planes[6]; //! planes for collision. normale must point towards middle |
---|
41 | }; |
---|
42 | |
---|
43 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.