1 #include "trackappearance.h"
8 TrackAppearance::TrackAppearance():
14 float TrackAppearance::get_rail_elevation() const
16 return ballast_profile.get_height()+rail_profile.get_height();
20 TrackAppearance::Loader::Loader(TrackAppearance &a):
21 ObjectLoader<TrackAppearance>(a)
23 add("ballast_profile", &Loader::ballast_profile);
24 add("gauge", &Loader::gauge);
25 add("rail_profile", &Loader::rail_profile);
26 add("technique", &TrackAppearance::technique);
27 add("tie_length", &Loader::tie_length);
28 add("tie_profile", &Loader::tie_profile);
29 add("tie_spacing", &Loader::tie_spacing);
32 void TrackAppearance::Loader::ballast_profile()
34 load_sub(obj.ballast_profile);
37 void TrackAppearance::Loader::gauge(float g)
42 void TrackAppearance::Loader::rail_profile()
44 load_sub(obj.rail_profile);
47 void TrackAppearance::Loader::tie_length(float l)
49 obj.tie_length = l/1000;
52 void TrackAppearance::Loader::tie_profile()
54 load_sub(obj.tie_profile);
57 void TrackAppearance::Loader::tie_spacing(float s)
59 obj.tie_spacing = s/1000;