From: Mikko Rasa Date: Mon, 4 Apr 2011 16:46:40 +0000 (+0000) Subject: Determine the border of tracktypes with custom object X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=26e741a3e8f1c83e717318f69ff02eed9b0ef6de;p=r2c2.git Determine the border of tracktypes with custom object --- diff --git a/source/3d/tracktype.cpp b/source/3d/tracktype.cpp index 47c85ab..a60c9a6 100644 --- a/source/3d/tracktype.cpp +++ b/source/3d/tracktype.cpp @@ -95,7 +95,17 @@ TrackType3D::TrackType3D(Catalogue3D &cat3d, const TrackType &tt): if(!obj_name.empty()) { object = catalogue.get(obj_name); - // XXX border + const GL::Mesh *m = object->get_mesh(); + const GL::VertexArray &vertices = m->get_vertices(); + int vertex_offs = vertices.get_format().offset(GL::VERTEX2); + if(vertex_offs>=0) + { + for(unsigned i=0; i