5 #include <gmath/gmath.h>
8 /* distance unit: millimeters
21 /* position in polar coordinates on the parent gear */
22 float pos_dist, pos_angle;
24 GearSlot *conn_slot; /* slot connection */
31 /* position in polar coordinates on the parent gear */
32 float pos_dist_min, pos_dist_max, pos_angle;
34 GearPin *conn_pin; /* pin connection */
42 void calc_matrix() const;
44 float contour(float u);
47 Vec3 pos, axis; /* implicitly defines a plane eqn. */
48 float pdist; /* derived: distance of plane from origin */
50 float angle; /* current angle of the gear */
52 int nteeth; /* number of teeth */
54 float radius; /* total radius of the gear, including teeth */
55 float teeth_length; /* how far teeth extend past the radius */
56 float thickness; /* thickness of the gear along the Z axis */
58 float bevel; /* bevel size */
60 std::vector<GearPin> pins;
61 std::vector<GearSlot> slots;