Cafu Engine
PathRecorder.hpp
1 /*
2 Cafu Engine, http://www.cafu.de/
3 Copyright (c) Carsten Fuchs and other contributors.
4 This project is licensed under the terms of the MIT license.
5 */
6 
7 #ifndef CAFU_CLIENT_PATH_RECORDER_HPP_INCLUDED
8 #define CAFU_CLIENT_PATH_RECORDER_HPP_INCLUDED
9 
10 #include "Math3D/Vector3.hpp"
11 #include <fstream>
12 
13 
14 /// This class records the path that an entity takes through a level into a file.
16 {
17  public:
18 
19  PathRecorderT(const std::string& FileName);
20  ~PathRecorderT();
21 
22  const std::string& GetFileName() const { return m_FileName; }
23  void WritePath(const Vector3dT& Origin, unsigned short Heading, float FrameTime);
24 
25 
26  private:
27 
28  const std::string m_FileName;
29  std::ofstream m_OutStream;
30  float m_Time;
31  unsigned long m_LineCount;
32  float m_OldTime;
33  Vector3dT m_OldOrigin;
34  unsigned short m_OldHeading;
35 };
36 
37 #endif
This class records the path that an entity takes through a level into a file.
Definition: PathRecorder.hpp:15