-/* $Id$
-
-This file is part of R²C²
-Copyright © 2011 Mikkosoft Productions, Mikko Rasa
-Distributed under the GPL
-*/
-
#include <msp/gl/matrix.h>
#include <msp/gl/renderer.h>
#include "bogie.h"
{
GL::Matrix matrix;
- const Point &pos = vehicle.get_position();
- matrix.translate(pos.x, pos.y, pos.z);
- matrix.rotate(vehicle.get_direction(), 0, 0, 1);
+ matrix.translate(vehicle.get_position());
+ matrix.rotate(vehicle.get_rotation(), 0, 0, 1);
matrix.translate(bogie.type->position, 0, 0);
- float dir = bogie.direction;
+ Angle dir = bogie.direction;
if(bogie.type->rotate_object)
- dir += M_PI;
+ dir += Angle::half_turn();
matrix.rotate(dir, 0, 0, 1);
renderer.matrix_stack() *= matrix;