1 #ifndef MSP_GL_TRANSFORM_H_
2 #define MSP_GL_TRANSFORM_H_
4 #include <msp/datafile/objectloader.h>
11 Stores a coordinate space transform as individual components. Primarily
12 intended for loading data from external sources. At runtime transforms
13 should generally be stored as matrices.
18 class Loader: public DataFile::ObjectLoader<Transform>
24 void position(float, float, float);
25 void euler(float, float, float);
26 void rotation(float, float, float, float);
27 void scale_uniform(float);
28 void scale(float, float, float);
31 typedef Geometry::Angle<float> Angle;
32 typedef LinAl::Vector<Angle, 3> AngleVector3;
42 static Transform from_matrix(const Matrix &);
44 void set_position(const Vector3 &);
45 void set_euler(const AngleVector3 &);
46 void set_rotation(const Angle &, const Vector3 &);
47 void set_scale(float);
48 void set_scale(const Vector3 &);
49 const Vector3 &get_position() const { return position; }
50 const AngleVector3 &get_euler() const { return euler; }
51 const Vector3 &get_scale() const { return scale; }
53 Matrix to_matrix() const;