Terminus
track.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <memory>
4 
6 #include <util/polyline.h>
7 
8 namespace terminus
9 {
10 
17 {
18 public:
19  Track(World & world, bool isRightTrack);
20 
24  Polyline & course();
25 
30  void setCourse(Polyline * course);
31 
36  bool isRightTrack();
37 
38 protected:
39  virtual bool localRenderEnabled() const override;
40 
41 protected:
42  std::unique_ptr<Polyline> m_course;
43 
45 };
46 
47 }
The Polyline class implements a sequence of line segments and is used to approximate a real spline...
Definition: polyline.h:14
Track(World &world, bool isRightTrack)
Definition: track.cpp:8
Polyline & course()
Definition: track.cpp:15
void setCourse(Polyline *course)
change the course of this track
Definition: track.cpp:21
std::unique_ptr< Polyline > m_course
Definition: track.h:42
The AbstractGraphicsObject class is the root of a class hierarchy of objects that contain independen ...
Definition: abstractgraphicsobject.h:27
bool m_isOtherTrackLeft
Definition: track.h:44
bool isRightTrack()
Definition: track.cpp:26
virtual bool localRenderEnabled() const override
override this method to disable or enable rendering conditionally
Definition: track.cpp:31
The World class represents a running game instance and contains all graphical (3D) elements of the sc...
Definition: world.h:46
Definition: eventhandler.cpp:18
The Track class represents a track that a Train moves on. It is currently not rendered. The course is represented by a Polyline instance.
Definition: track.h:16