X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2F3d%2Ftracktype.h;h=27bf7fe97723ec8e9e0c39d2f4b63ade8bcd0c89;hb=5116fff210cdc3f0fbdae13046cc60450aad5e8f;hp=7bf1b2d5b9241ab931afefe140ec242366afa6e1;hpb=1ff06c5bc46a677fa389ef86c6b26664368f1653;p=r2c2.git diff --git a/source/3d/tracktype.h b/source/3d/tracktype.h index 7bf1b2d..27bf7fe 100644 --- a/source/3d/tracktype.h +++ b/source/3d/tracktype.h @@ -1,16 +1,10 @@ -/* $Id$ - -This file is part of R²C² -Copyright © 2010 Mikkosoft Productions, Mikko Rasa -Distributed under the GPL -*/ - #ifndef R2C2_3D_TRACKTYPE_H_ #define R2C2_3D_TRACKTYPE_H_ +#include #include #include -#include +#include #include "libr2c2/profile.h" #include "libr2c2/tracktype.h" @@ -18,28 +12,24 @@ namespace R2C2 { class Catalogue3D; -class TrackType3D: public Msp::GL::Renderable +class TrackType3D { private: - const Catalogue3D &catalogue; - Msp::GL::Mesh ballast_mesh; - Msp::GL::Mesh rail_mesh; - std::vector path_meshes; - std::vector border; - float min_z; - float max_z; + Catalogue3D &catalogue; + Msp::GL::Mesh *mesh; + Msp::GL::Object *object; + bool own_data; + std::map path_meshes; public: - TrackType3D(const Catalogue3D &, const TrackType &); + TrackType3D(Catalogue3D &, const TrackType &); ~TrackType3D(); - void get_bounds(float, Point &, Point &) const; - const Msp::GL::Mesh &get_path_mesh(unsigned) const; - - virtual void render(const Msp::GL::Tag &) const; + const Msp::GL::Object &get_object() const { return *object; } + const Msp::GL::Mesh &get_path_mesh(int, int) const; private: - void build_part(const TrackPart &, const Profile &, const Point &, Msp::GL::MeshBuilder &, unsigned &); + void build_part(const TrackPart &, const Profile &, const Vector &, bool, Msp::GL::MeshBuilder &, unsigned &); }; } // namespace R2C2