X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibr2c2%2Fprofile.cpp;h=96b06a2c185a1f174d3afa99f1f6de3b67a76569;hb=e77b01f9fed6d5f653dbd0123f0f1f61a13c3dfa;hp=1b1aeeed7810f9e8a36d61587e875009bec228b9;hpb=754ac497179474d0266b55e881a084fef7d5d6a1;p=r2c2.git diff --git a/source/libr2c2/profile.cpp b/source/libr2c2/profile.cpp index 1b1aeee..96b06a2 100644 --- a/source/libr2c2/profile.cpp +++ b/source/libr2c2/profile.cpp @@ -13,7 +13,7 @@ using namespace Msp; namespace R2C2 { -void Profile::append_vertex(const Point &p, bool smooth) +void Profile::append_vertex(const Vector &p, bool smooth) { if(vertices.size()>1 && !vertices.back().smooth) vertices.push_back(vertices.back()); @@ -32,7 +32,7 @@ void Profile::append_vertex(const Point &p, bool smooth) if(vertices.back().smooth) { - Point &n = vertices.back().normal; + Vector &n = vertices.back().normal; n.x += v.normal.x; n.y += v.normal.y; len = sqrt(n.x*n.x+n.y*n.y); @@ -76,12 +76,12 @@ Profile::Loader::Loader(Profile &p): void Profile::Loader::point(float x, float y) { - obj.append_vertex(Point(x/1000, y/1000), false); + obj.append_vertex(Vector(x/1000, y/1000), false); } void Profile::Loader::smooth_point(float x, float y) { - obj.append_vertex(Point(x/1000, y/1000), true); + obj.append_vertex(Vector(x/1000, y/1000), true); } } // namespace R2C2