Last change
on this file since 3050 was
3028,
checked in by bensch, 20 years ago
|
orxonox/branches/bezierTrack: now Camera follows Path. heavy cleanUp of not used stuff like elyptical Camera and so on…
|
File size:
1.5 KB
|
Line | |
---|
1 | /*! |
---|
2 | \file track.h |
---|
3 | \brief Basic level architecture |
---|
4 | */ |
---|
5 | |
---|
6 | #ifndef TRACK_H |
---|
7 | #define TRACK_H |
---|
8 | |
---|
9 | #include "stdincl.h" |
---|
10 | #include "curve.h" |
---|
11 | |
---|
12 | //! The Red Line through a level |
---|
13 | /** |
---|
14 | Handles level boundaries, bound movement mapping, camera placement and scripting. |
---|
15 | To create special levels with special camera movement, rules or whatever, derive from this base class. |
---|
16 | */ |
---|
17 | class Track : public Coordinate |
---|
18 | { |
---|
19 | private: |
---|
20 | Uint32 ID; |
---|
21 | Vector* offset; |
---|
22 | Vector* end; |
---|
23 | BezierCurve curve; |
---|
24 | |
---|
25 | float mainTime; |
---|
26 | // Vector* direction; // unity direction vector: it is costy to always recalculate it |
---|
27 | //Vector* up; // direction where up is ment to be - diffuse in space, eh? |
---|
28 | //Vector* traverse; // right-left |
---|
29 | Uint32 nextID; |
---|
30 | |
---|
31 | Track* next; |
---|
32 | Track* previous; |
---|
33 | |
---|
34 | public: |
---|
35 | Track (); |
---|
36 | |
---|
37 | ~Track (); |
---|
38 | virtual void init(); |
---|
39 | |
---|
40 | void addPoint (Vector point); |
---|
41 | void addHotPoint (Vector hotPoint); |
---|
42 | |
---|
43 | Vector getPos(void); |
---|
44 | Vector getPos(float t); |
---|
45 | Vector getDir (void); |
---|
46 | Vector getDir (float t); |
---|
47 | Quaternion getQuat (void); |
---|
48 | Quaternion getQuat (float t); |
---|
49 | Coord getCoord (void); |
---|
50 | Coord getCoord (float t); |
---|
51 | |
---|
52 | |
---|
53 | virtual void post_enter (WorldEntity* entity); // handle coordinate transition in here !!! (when dist < 0 or dist > lasttracklenght) |
---|
54 | virtual void post_leave (WorldEntity* entity); |
---|
55 | virtual void tick (float deltaT); |
---|
56 | virtual void map_camera (Location* lookat, Placement* camplc); |
---|
57 | virtual bool map_coords (Location* loc, Placement* plc); // this should return true if the entity left track boundaries |
---|
58 | }; |
---|
59 | |
---|
60 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.