Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 3017 was 3015, checked in by bensch, 20 years ago

orxonox/branches/bezierCurve: better algorithm

File size: 1.3 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"
10
[2141]11//!     The Red Line through a level
12/**
[2551]13   Handles level boundaries, bound movement mapping, camera placement and scripting.
14   To create special levels with special camera movement, rules or whatever, derive from this base class.
[2141]15*/
[2068]16class Track
17{
18 private:
[2551]19  Uint32 ID;
20  Vector* offset;
21  Vector* end;
[3010]22  BezierCurve curve;
[2551]23  // Vector* direction; // unity direction vector: it is costy to always recalculate it
24  //Vector* up; // direction where up is ment to be - diffuse in space, eh?
25  //Vector* traverse; // right-left
26  Uint32 nextID;
27 
[3010]28  Track* next;
29  Track* previous;
[2068]30       
31 public:
[2636]32  Track ();
[3010]33 
[2068]34  ~Track ();
[2636]35  virtual void init();
[3010]36
[3013]37  void addPoint (Vector point);
38  void addHotPoint (Vector hotPoint);
[2636]39 
[3014]40  Vector getPos(float t);
[3015]41  Vector getDir (float t);
42
[3014]43 
[2636]44  virtual void post_enter (WorldEntity* entity);        // handle coordinate transition in here !!! (when dist < 0 or dist > lasttracklenght)
45  virtual void post_leave (WorldEntity* entity);
46  virtual void tick (float deltaT);
47  virtual void map_camera (Location* lookat, Placement* camplc);
48  virtual bool map_coords (Location* loc, Placement* plc);      // this should return true if the entity left track boundaries
[2068]49};
50
51#endif
Note: See TracBrowser for help on using the repository browser.