X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2F3d%2Ftracktype.h;h=e43dc428f1867a217a19ef8204fdeb159d6caca7;hb=f8a7788cee0261babfc4c804a58515aad6dfbc3d;hp=e0bd9388af3814d5c00da2f4ee62cfd9730f740f;hpb=7e382cc3cad8c4f6945b0c9d89e2ca917b42b740;p=r2c2.git diff --git a/source/3d/tracktype.h b/source/3d/tracktype.h index e0bd938..e43dc42 100644 --- a/source/3d/tracktype.h +++ b/source/3d/tracktype.h @@ -1,43 +1,46 @@ /* $Id$ -This file is part of the MSP Märklin suite -Copyright © 2010 Mikkosoft Productions, Mikko Rasa +This file is part of R²C² +Copyright © 2010-2011 Mikkosoft Productions, Mikko Rasa Distributed under the GPL */ -#ifndef MARKLIN3D_TRACKTYPE_H_ -#define MARKLIN3D_TRACKTYPE_H_ +#ifndef R2C2_3D_TRACKTYPE_H_ +#define R2C2_3D_TRACKTYPE_H_ #include #include -#include "libmarklin/profile.h" -#include "libmarklin/tracktype.h" +#include +#include "libr2c2/profile.h" +#include "libr2c2/tracktype.h" -namespace Marklin { +namespace R2C2 { class Catalogue3D; class TrackType3D { private: - Msp::GL::Mesh ballast_mesh; - Msp::GL::Mesh rail_mesh; - std::vector border; + Catalogue3D &catalogue; + Msp::GL::Mesh *mesh; + Msp::GL::Object *object; + std::vector path_meshes; + std::vector border; float min_z; float max_z; public: - TrackType3D(const Catalogue3D &, const TrackType &); + TrackType3D(Catalogue3D &, const TrackType &); + ~TrackType3D(); - void get_bounds(float, Point &, Point &) const; - - void render() const; + void get_bounds(float, Vector &, Vector &) const; + const Msp::GL::Object &get_object() const { return *object; } + const Msp::GL::Mesh &get_path_mesh(unsigned) const; private: - void build_part(const TrackPart &, const Profile &, const Point &, Msp::GL::MeshBuilder &, unsigned &); - //void optimize_border(); + void build_part(const TrackPart &, const Profile &, const Vector &, bool, Msp::GL::MeshBuilder &, unsigned &); }; -} // namespace Marklin +} // namespace R2C2 #endif