X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=antikythera;a=blobdiff_plain;f=src%2Fgear.h;h=5f99dd505c72bdb1c7d704960d0f1875e19bf553;hp=f6058a10a7f4590af3a6780c4e9f23dabcc7cbf4;hb=HEAD;hpb=ccc1a688b59e25bb934a0d3e2bbf477960068d4f diff --git a/src/gear.h b/src/gear.h index f6058a1..5f99dd5 100644 --- a/src/gear.h +++ b/src/gear.h @@ -52,12 +52,13 @@ public: */ std::string name; Vec3 pos, axis; // implicitly defines a plane eqn. - float pdist; // derived: distance of plane from origin + float pdist; // derived from the above: distance of plane from origin float init_angle; // initial starting angle float angle; // current angle of the gear int nteeth; // number of teeth + float tooth_pitch; float radius; // total radius of the gear, including teeth float teeth_length; // how far teeth extend past the radius @@ -87,7 +88,7 @@ public: // sets the supplied number of teeth, and calculates the radius // of the gear, to achieve the required tooth pitch - void set_teeth(int nt, float tooth_pitch); + void set_teeth(int nt, float tooth_pitch = 0.0f); void set_axis(const Vec3 &axis); const Vec3 &get_axis() const; void set_position(const Vec3 &pos);