X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibr2c2%2Fprofile.cpp;h=2741cac2958c3a848ba39b48aa7ba304b72289da;hb=ce29d0ccf89840c9581314301de0ea2b5b261c43;hp=257b898f39d14fa390e8d58b3b918faf24cc520f;hpb=c5f5ec54e81a6a85f911fa1075a0939a7352fbfd;p=r2c2.git diff --git a/source/libr2c2/profile.cpp b/source/libr2c2/profile.cpp index 257b898..2741cac 100644 --- a/source/libr2c2/profile.cpp +++ b/source/libr2c2/profile.cpp @@ -1,10 +1,3 @@ -/* $Id$ - -This file is part of R²C² -Copyright © 2010 Mikkosoft Productions, Mikko Rasa -Distributed under the GPL -*/ - #include #include "profile.h" @@ -13,7 +6,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 +25,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 +69,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