CARLA
载入中...
搜索中...
未找到
LibCarla
source
carla
rpc
GearPhysicsControl.h
浏览该文件的文档.
1
// Copyright (c) 2019 Intel Corporation
2
//
3
// This work is licensed under the terms of the MIT license.
4
// For a copy, see <https://opensource.org/licenses/MIT>.
5
6
#pragma once
7
8
#include "
carla/MsgPack.h
"
9
#ifdef LIBCARLA_INCLUDED_FROM_UE4
10
#include <
compiler/enable-ue4-macros.h
>
11
#include "
Vehicle/VehiclePhysicsControl.h
"
12
#include <
compiler/disable-ue4-macros.h
>
13
#endif
14
15
namespace
carla
{
16
namespace
rpc {
17
18
class
GearPhysicsControl
{
19
public
:
20
21
GearPhysicsControl
() =
default
;
22
23
GearPhysicsControl
(
24
float
in_ratio,
25
float
in_down_ratio,
26
float
in_up_ratio)
27
:
ratio
(in_ratio),
28
down_ratio
(in_down_ratio),
29
up_ratio
(in_up_ratio) {}
30
31
float
ratio
= 1.0f;
32
float
down_ratio
= 0.5f;
33
float
up_ratio
= 0.65f;
34
35
bool
operator!=
(
const
GearPhysicsControl
&rhs)
const
{
36
return
37
ratio
!= rhs.
ratio
||
38
down_ratio
!= rhs.
down_ratio
||
39
up_ratio
!= rhs.
up_ratio
;
40
}
41
42
bool
operator==
(
const
GearPhysicsControl
&rhs)
const
{
43
return
!(*
this
!= rhs);
44
}
45
#ifdef LIBCARLA_INCLUDED_FROM_UE4
46
47
GearPhysicsControl
(
const
FGearPhysicsControl
&Gear)
48
:
ratio
(Gear.Ratio),
49
down_ratio
(Gear.DownRatio),
50
up_ratio
(Gear.UpRatio) {}
51
52
operator
FGearPhysicsControl
()
const
{
53
FGearPhysicsControl
Gear;
54
Gear.
Ratio
=
ratio
;
55
Gear.
DownRatio
=
down_ratio
;
56
Gear.
UpRatio
=
up_ratio
;
57
return
Gear;
58
}
59
#endif
60
61
MSGPACK_DEFINE_ARRAY(
ratio
,
62
down_ratio
,
63
up_ratio
)
64
};
65
66
}
67
}
MsgPack.h
VehiclePhysicsControl.h
carla::rpc::GearPhysicsControl
Definition
GearPhysicsControl.h:18
carla::rpc::GearPhysicsControl::GearPhysicsControl
GearPhysicsControl(const FGearPhysicsControl &Gear)
Definition
GearPhysicsControl.h:47
carla::rpc::GearPhysicsControl::GearPhysicsControl
GearPhysicsControl()=default
carla::rpc::GearPhysicsControl::ratio
float ratio
Definition
GearPhysicsControl.h:31
carla::rpc::GearPhysicsControl::operator==
bool operator==(const GearPhysicsControl &rhs) const
Definition
GearPhysicsControl.h:42
carla::rpc::GearPhysicsControl::operator!=
bool operator!=(const GearPhysicsControl &rhs) const
Definition
GearPhysicsControl.h:35
carla::rpc::GearPhysicsControl::up_ratio
float up_ratio
Definition
GearPhysicsControl.h:33
carla::rpc::GearPhysicsControl::GearPhysicsControl
GearPhysicsControl(float in_ratio, float in_down_ratio, float in_up_ratio)
Definition
GearPhysicsControl.h:23
carla::rpc::GearPhysicsControl::down_ratio
float down_ratio
Definition
GearPhysicsControl.h:32
disable-ue4-macros.h
enable-ue4-macros.h
carla
This file contains definitions of common data structures used in traffic manager.
Definition
Carla.cpp:133
FGearPhysicsControl
Definition
Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Vehicle/VehiclePhysicsControl.h:15
FGearPhysicsControl::DownRatio
float DownRatio
Definition
Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Vehicle/VehiclePhysicsControl.h:22
FGearPhysicsControl::Ratio
float Ratio
Definition
Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Vehicle/VehiclePhysicsControl.h:19
FGearPhysicsControl::UpRatio
float UpRatio
Definition
Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Vehicle/VehiclePhysicsControl.h:25
制作者
1.10.0