5 #include "VectorMath.h"
8 #include "PathedVehicle.h"
17 static const float TRAIN_CLOSE_ENOUGH_TO_TARGET_DISTANCE = 10.0;
18 static const float TRAIN_CLOSE_ENOUGH_DISTANCE_SQR = TRAIN_CLOSE_ENOUGH_TO_TARGET_DISTANCE * TRAIN_CLOSE_ENOUGH_TO_TARGET_DISTANCE;
19 static const float TRAIN_DISTANCE_FROM_DEAD_END_TO_STOP = 5.0f;
20 static const float TRAIN_CENTER_OF_LANE_OFFSET = 0.55f;
21 static const float TRAIN_TURNING_ANGLE = 1.5f;
22 static const float TRAIN_CARRIAGE_SEPARATION = 3.65f;
23 static const float TRAIN_BOUNDS_RADIUS = 15.f;
32 : position(Eegeo::dv3::Zero())
33 , dir(Eegeo::v3::Zero())
42 static const float TRAIN_FADE_OUT_IN_SECONDS;
44 float TrainLengthInM()
const;
45 float SecondsToFullySpawn();
47 std::deque<TrainPreviousPosition> m_previousPostions;
49 float m_secondsSinceDespawning;
50 float m_secondsSinceSpawning;
51 bool m_playingDeathCeremony;
52 const float m_defaultVelocity;
60 const Eegeo::dv3& GetWorldPosition()
const {
return m_pathedVehicle->GetWorldPosition(); }
61 const Eegeo::v3& GetForwardsVector()
const {
return m_pathedVehicle->GetForwardsVector(); }
63 const std::string& GetFullModelNodeName()
const {
return m_pathedVehicle->GetFullModelNodeName(); }
66 bool GetInitialised() {
return m_pathedVehicle->GetInitialised(); }
67 void ClearNextCell() { m_pathedVehicle->ClearNextCell(); }
68 void Update(
float elapsedSeconds,
float speedMultiplier,
const dv3& ecefInterestPoint);
69 void Initialise(
const dv3& ecefInterestPoint) { m_pathedVehicle->Initialise(ecefInterestPoint); }
73 void AddCarriage(
TrainCarriage* carriage,
float carriageLength);
75 bool VehicleMarkedToRemove();
76 void FadeOutThenDestroyVehicle();
77 bool IsPlayingDeathCeremony();
79 bool CanCollide()
const;
81 float GetCollisionRadius()
const;
82 float GetBoundsRadius()
const;
83 float GetScale()
const;
85 void SetModelNodeNameSuffix(
const std::string &suffix) { m_pathedVehicle->SetModelNodeNameSuffix(suffix);}
87 bool IsUnderground()
const;
88 bool NeedsUndergroundCheck();
89 void SetIsUnderground(
bool isUnderground);