-/* $Id$
-
-This file is part of R²C²
-Copyright © 2010-2011 Mikkosoft Productions, Mikko Rasa
-Distributed under the GPL
-*/
-
#include <cmath>
#include <msp/gl/matrix.h>
#include <msp/gl/misc.h>
{
if(tag=="unlit")
{
- Vector p = track.get_track().get_endpoint_position(index);
- float a = track.get_track().get_endpoint_direction(index)+M_PI;
+ Snap sn = track.get_track().get_snap_node(index);
GL::MatrixStack::Push push_mtx(renderer.matrix_stack());
GL::Matrix matrix;
- matrix.translate(p.x, p.y, p.z);
- matrix.rotate(a, 0, 0, 1);
+ matrix.translate(sn.position);
+ matrix.rotate(sn.rotation+Angle::half_turn(), 0, 0, 1);
renderer.matrix_stack() *= matrix;
if(track.get_track().get_link(index))