-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathActor.cpp
More file actions
128 lines (121 loc) · 2.82 KB
/
Copy pathActor.cpp
File metadata and controls
128 lines (121 loc) · 2.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
#include "Actor.h"
// Actor::Actor()
// {
// actortype = VEHICLE;
// objname = NULL;
// name = NULL;
// category = NULL;
// boundingx = NULL;
// boundingy = NULL;
// boundingz = NULL;
// boundingw = NULL;
// boundingl = NULL;
// boundingh = NULL;
// positiontype = WORLD;
// worldPosition.x = NULL;
// worldPosition.y = NULL;
// worldPosition.z = NULL;
// worldPosition.h = NULL;
// lanePosition.roadId = NULL;
// lanePosition.laneId = NULL;
// lanePosition.offset = NULL;
// lanePosition.s = NULL;
// vehparas.maxSpeed = NULL;
// vehparas.maxAcceleration = NULL;
// vehparas.maxDeceleration = NULL;
// vehparas.frontAxleMaxSteering = NULL;
// vehparas.frontAxleWheelDiameter = NULL;
// vehparas.frontAxleTrackWidth = NULL;
// vehparas.frontAxlePositionX = NULL;
// vehparas.frontAxlePositionZ = NULL;
// vehparas.rearAxleMaxSteering = NULL;
// vehparas.rearAxleWheelDiameter = NULL;
// vehparas.rearAxleTrackWidth = NULL;
// vehparas.rearAxlePositionX = NULL;
// vehparas.rearAxlePositionZ = NULL;
// vehparas.controllerName = NULL;
// pedparas.mass = NULL;
// pedparas.model = NULL;
// miscparas.mass = NULL;
// pair<const char*, const char*> tmp;
// tmp.first = NULL;
// tmp.second = NULL;
// vehparas.Throttle = tmp;
// vehparas.Brake = tmp;
// vehparas.Clutch = tmp;
// vehparas.ParkingBrake = tmp;
// vehparas.SteeringWheel = tmp;
// vehparas.Gear = tmp;
// }
Actor::~Actor()
{
}
SETRES Actor::setType(ACTORTYPE type)
{
actortype = type;
return SET_OK;
}
SETRES Actor::setObjName(const char *str)
{
objname = str;
return SET_OK;
}
SETRES Actor::setName(const char *str)
{
name = str;
return SET_OK;
}
SETRES Actor::setCategory(const char *str)
{
category = str;
return SET_OK;
}
SETRES Actor::addPara(Parameter para)
{
paras.push_back(para);
return SET_OK;
}
SETRES Actor::setBoundingBoxCenter(const char *x, const char *y, const char *z)
{
boundingx = x;
boundingy = y;
boundingz = z;
return SET_OK;
}
SETRES Actor::setBoundingBoxDimensions(const char *w, const char *l, const char *h)
{
boundingw = w;
boundingl = l;
boundingh = h;
return SET_OK;
}
SETRES Actor::setWorldPosition(WorldPosition pos)
{
position.worldPosition = pos;
return SET_OK;
}
SETRES Actor::setLanePosition(LanePosition pos)
{
position.lanePosition = pos;
return SET_OK;
}
SETRES Actor::addProp(pair<const char*, const char*> prop)
{
props.push_back(prop);
return SET_OK;
}
SETRES Actor::setVehicle(Vehicle *v)
{
vehparas = *v;
return SET_OK;
}
SETRES Actor::setPedestrian(Pedestrian *p)
{
pedparas = *p;
return SET_OK;
}
SETRES Actor::setMiscObject(MiscObject *m)
{
miscparas = *m;
return SET_OK;
}