All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
TrainCarriage.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "IVehicle.h"
6 #include "Types.h"
7 #include "VectorMath.h"
8 #include <string>
9 
10 namespace Eegeo
11 {
12  namespace Traffic
13  {
14  class TrainVehicle;
15 
16  class TrainCarriage : public IVehicle, protected Eegeo::NonCopyable
17  {
18  private:
19  Eegeo::dv3 m_followPosition;
20  Eegeo::v3 m_followDirection;
21 
22  TrainVehicle* m_parent;
23  float m_carriageOffset;
24  const std::string &m_modelName;
25  std::string m_fullModelNodeName;
26 
27  public:
28  TrainCarriage(TrainVehicle* parentVehicle, const std::string& modelName, const std::string& modelNameSuffix, float carriageOffset);
29  ~TrainCarriage() { }
30  const Eegeo::dv3& GetWorldPosition() const { return m_followPosition; }
31  const Eegeo::v3& GetForwardsVector() const { return m_followDirection; }
32 
33  const std::string& GetFullModelNodeName() const { return m_fullModelNodeName; }
34  TrafficSimulationCell* GetNextCell() { return NULL; } // this never moves cell itself, the parent moves cell.
35 
36  bool GetInitialised() { return true; }
37  void ClearNextCell() { };
38  void Update(float elapsedSeconds, float speedMultiplier, const dv3& ecefInterestPoint);
39  void Initialise(const dv3& ecefInterestPoint) { };
40  float Alpha();
41  bool VehicleMarkedToRemove();
42  void FadeOutThenDestroyVehicle() { }
43  bool IsPlayingDeathCeremony() { return false; }
44  float GetBoundsRadius() const;
45  float GetCollisionRadius() const;
46  float GetScale() const;
47  bool CanCollide() const;
48  void SetModelNodeNameSuffix(const std::string &suffix);
49 
50  bool IsUnderground() const;
51  bool NeedsUndergroundCheck();
52  void SetIsUnderground(bool isUnderground);
53  };
54  }
55 }