]> git.tdb.fi Git - r2c2.git/blobdiff - source/3d/axle.cpp
Add a vehicle property for swapping directions
[r2c2.git] / source / 3d / axle.cpp
index 5123106e5c805f8736292d7996ec47d7f97080c6..c8a6dd573091d743c126449ec2d2db43e95920db 100644 (file)
@@ -16,10 +16,10 @@ using namespace Msp;
 namespace R2C2 {
 
 Axle3D::Axle3D(const Vehicle3D &v, unsigned a):
-       GL::ObjectInstance(*v.get_type().get_axle_object(a)),
+       GL::ObjectInstance(*v.get_type().get_fixed_axle_object(a)),
        vehicle(v.get_vehicle()),
        bogie(0),
-       axle(vehicle.get_axle(a))
+       axle(vehicle.get_fixed_axle(a))
 { }
 
 Axle3D::Axle3D(const Vehicle3D &v, unsigned b, unsigned a):
@@ -41,7 +41,7 @@ void Axle3D::setup_render(GL::Renderer &renderer, const GL::Tag &) const
 {
        GL::Matrix matrix;
 
-       const Point &pos = vehicle.get_position();
+       const Vector &pos = vehicle.get_position();
        matrix.translate(pos.x, pos.y, pos.z);
        matrix.rotate(vehicle.get_direction(), 0, 0, 1);