3 #include "vehicletype.h"
9 Axle3D::Axle3D(const Vehicle3D &v, unsigned a):
10 VehiclePart3D(v, *v.get_type().get_axle_object(a)),
12 axle(vehicle.get_vehicle().get_axle(a))
15 bogie = &vehicle.get_vehicle().get_bogie(axle.type->bogie->index);
18 void Axle3D::update_matrix()
20 matrix = vehicle.Object3D::get_matrix();
24 matrix.translate(bogie->type->position, 0, 0);
25 matrix.rotate(bogie->direction, 0, 0, 1);
28 matrix.translate(axle.type->local_position, 0, axle.type->wheel_dia/2);
29 matrix.rotate(axle.angle, 0, 1, 0);