+ struct RodConstraint
+ {
+ enum Type
+ {
+ MOVE,
+ SLIDE,
+ ROTATE
+ };
+
+ enum Target
+ {
+ BODY,
+ BOGIE,
+ AXLE,
+ ROD
+ };
+
+ class Loader: public Msp::DataFile::ObjectLoader<RodConstraint>
+ {
+ private:
+ TagMap &tags;
+
+ public:
+ Loader(RodConstraint &, TagMap &);
+ private:
+ void axis(float, float, float);
+ void local_position(float, float, float);
+ void target_axle(unsigned);
+ void target_position(float, float, float);
+ void target_rod(const std::string &);
+ };
+
+ Type type;
+ Target target;
+ unsigned target_index;
+ Vector target_position;
+ Vector local_position;
+ Vector axis;
+
+ RodConstraint();
+ };
+
+ struct Rod
+ {
+ class Loader: public Msp::DataFile::ObjectLoader<Rod>
+ {
+ private:
+ TagMap &tags;
+
+ public:
+ Loader(Rod &, TagMap &);
+ private:
+ template<RodConstraint::Type>
+ void constraint();
+ void initial_position(float, float, float);
+ };
+
+ Vector initial_position;
+ std::vector<RodConstraint> constraints;
+ std::string object;
+ bool mirror_object;
+
+ Rod();
+ };
+
+ class MirrorParametersLoader: public Msp::DataFile::Loader
+ {
+ public:
+ std::string filter;
+ Angle phase_offset;
+
+ MirrorParametersLoader();
+ private:
+ void filt(const std::string &);
+ void phase_offs(float);
+ };
+
+ typedef std::vector<Axle> AxleArray;
+ typedef std::vector<Bogie> BogieArray;
+ typedef std::vector<Rod> RodArray;
+ typedef std::map<unsigned, std::string> FunctionMap;
+