CARLA
载入中...
搜索中...
未找到
Unreal
CarlaUE4
Plugins
Carla
Source
Carla
Recorder
CarlaRecorderVisualTime.cpp
浏览该文件的文档.
1
// Copyright (c) 2020 Computer Vision Center (CVC) at the Universitat Autonoma
2
// de Barcelona (UAB).
3
//
4
// This work is licensed under the terms of the MIT license.
5
// For a copy, see <https://opensource.org/licenses/MIT>.
6
7
#include "
CarlaRecorderVisualTime.h
"
8
#include "
CarlaRecorder.h
"
9
#include "
CarlaRecorderHelpers.h
"
10
11
void
CarlaRecorderVisualTime::SetTime
(
double
ThisTime)
12
{
13
Time
= ThisTime;
14
}
15
16
void
CarlaRecorderVisualTime::Read
(std::ifstream &InFile)
17
{
18
ReadValue<double>(InFile, this->
Time
);
19
}
20
21
void
CarlaRecorderVisualTime::Write
(std::ofstream &OutFile)
22
{
23
// write the packet id
24
WriteValue<char>(OutFile,
static_cast<
char
>
(
CarlaRecorderPacketId::VisualTime
));
25
26
// write packet size
27
uint32_t Total =
sizeof
(double);
28
WriteValue<uint32_t>(OutFile, Total);
29
30
WriteValue<double>(OutFile, this->
Time
);
31
}
CarlaRecorderHelpers.h
CarlaRecorderVisualTime.h
CarlaRecorder.h
CarlaRecorderPacketId::VisualTime
@ VisualTime
CarlaRecorderVisualTime::Read
void Read(std::ifstream &InFile)
Definition
CarlaRecorderVisualTime.cpp:16
CarlaRecorderVisualTime::Write
void Write(std::ofstream &OutFile)
Definition
CarlaRecorderVisualTime.cpp:21
CarlaRecorderVisualTime::Time
double Time
Definition
CarlaRecorderVisualTime.h:15
CarlaRecorderVisualTime::SetTime
void SetTime(double ThisTime)
Definition
CarlaRecorderVisualTime.cpp:11
制作者
1.10.0