Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/branches/bezierTrack/src/track.h @ 3128

Last change on this file since 3128 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
RevLine 
[2141]1/*!
2    \file track.h
3    \brief Basic level architecture
4*/ 
[2068]5
6#ifndef TRACK_H
7#define TRACK_H
8
[2101]9#include "stdincl.h"
[3018]10#include "curve.h"
[2101]11
[2141]12//!     The Red Line through a level
13/**
[2551]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.
[2141]16*/
[3028]17class Track : public Coordinate
[2068]18{
19 private:
[2551]20  Uint32 ID;
21  Vector* offset;
22  Vector* end;
[3010]23  BezierCurve curve;
[3028]24
25  float mainTime;
[2551]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 
[3010]31  Track* next;
32  Track* previous;
[2068]33       
34 public:
[2636]35  Track ();
[3010]36 
[2068]37  ~Track ();
[2636]38  virtual void init();
[3010]39
[3013]40  void addPoint (Vector point);
41  void addHotPoint (Vector hotPoint);
[2636]42 
[3028]43  Vector getPos(void);
[3014]44  Vector getPos(float t);
[3028]45  Vector getDir (void);
[3015]46  Vector getDir (float t);
[3028]47  Quaternion getQuat (void);
48  Quaternion getQuat (float t);
49  Coord getCoord (void);
50  Coord getCoord (float t);
[3015]51
[3014]52 
[2636]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
[2068]58};
59
60#endif
Note: See TracBrowser for help on using the repository browser.