+void Gear::set_axis(const Vec3 &axis)
+{
+ this->axis = normalize(axis);
+ xform_valid = false;
+}
+
+const Vec3 &Gear::get_axis() const
+{
+ return axis;
+}
+
+void Gear::set_position(const Vec3 &pos)
+{
+ if(!supergear) {
+ this->pos = pos;
+ xform_valid = false;
+ } else {
+ if(fabs(this->pos.z - pos.z) > 1e-5) {
+ this->pos.z = pos.z;
+ xform_valid = false;
+ }
+ }
+}
+
+const Vec3 &Gear::get_position() const
+{
+ return pos;
+}
+
+Vec3 Gear::get_global_position() const
+{
+ const Mat4 &m = get_matrix();
+ return m * Vec3(0, 0, 0);
+}
+
+void Gear::set_angle(float angle)
+{
+ this->angle = angle;
+ xform_valid = false;
+}
+
+float Gear::get_angle() const
+{
+ return angle;
+}
+
+float Gear::get_vis_rotation() const