Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 3020 was 3018, checked in by bensch, 20 years ago

orxonox/branches/bezierTrack: moved Curve to its own file. I expect this class to be bigger than I thought at the beginning:

  1. Class Curve and its subclasses: a) BezierCurve b) closedBezierCurve c) Nurbs d) any other curve that might occure

this will take some time and many hours of thinking so please help

File size: 1.3 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*/
17class Track
18{
19 private:
20  Uint32 ID;
21  Vector* offset;
22  Vector* end;
23  BezierCurve curve;
24  // Vector* direction; // unity direction vector: it is costy to always recalculate it
25  //Vector* up; // direction where up is ment to be - diffuse in space, eh?
26  //Vector* traverse; // right-left
27  Uint32 nextID;
28 
29  Track* next;
30  Track* previous;
31       
32 public:
33  Track ();
34 
35  ~Track ();
36  virtual void init();
37
38  void addPoint (Vector point);
39  void addHotPoint (Vector hotPoint);
40 
41  Vector getPos(float t);
42  Vector getDir (float t);
43
44 
45  virtual void post_enter (WorldEntity* entity);        // handle coordinate transition in here !!! (when dist < 0 or dist > lasttracklenght)
46  virtual void post_leave (WorldEntity* entity);
47  virtual void tick (float deltaT);
48  virtual void map_camera (Location* lookat, Placement* camplc);
49  virtual bool map_coords (Location* loc, Placement* plc);      // this should return true if the entity left track boundaries
50};
51
52#endif
Note: See TracBrowser for help on using the repository browser.