diff options
author | Marius Kintel <marius@kintel.net> | 2013-02-12 04:33:31 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2013-05-10 11:45:28 (GMT) |
commit | 130e10778e9d74ceb07dfc813b85d75a52a71e10 (patch) | |
tree | f11ad6722ff461864d83906b29bbabe148858693 /src/dxftess-glu.cc | |
parent | b5079a189aa70cf36e9a4ded6d891df6ae78ac58 (diff) |
Initial code to support scaling of linear_extrude(). Part of Issue #273
Diffstat (limited to 'src/dxftess-glu.cc')
-rw-r--r-- | src/dxftess-glu.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/dxftess-glu.cc b/src/dxftess-glu.cc index 3f87729..38b09e9 100644 --- a/src/dxftess-glu.cc +++ b/src/dxftess-glu.cc @@ -201,7 +201,7 @@ inline void do_emplace( boost::unordered_multimap<int, pair_ii> &tri_by_atan2, i rot: CLOCKWISE rotation around positive Z axis */ -void dxf_tesselate(PolySet *ps, DxfData &dxf, double rot, bool up, bool do_triangle_splitting, double h) +void dxf_tesselate(PolySet *ps, DxfData &dxf, double rot, double scale, bool up, bool do_triangle_splitting, double h) { GLUtesselator *tobj = gluNewTess(); @@ -244,8 +244,8 @@ void dxf_tesselate(PolySet *ps, DxfData &dxf, double rot, bool up, bool do_trian dxf.points[dxf.paths[i].indices[j]][1], h) = std::pair<int,int>(i, j); vl.push_back(tess_vdata()); - vl.back().v[0] = dxf.points[dxf.paths[i].indices[j]][0]; - vl.back().v[1] = dxf.points[dxf.paths[i].indices[j]][1]; + vl.back().v[0] = scale * dxf.points[dxf.paths[i].indices[j]][0]; + vl.back().v[1] = scale * dxf.points[dxf.paths[i].indices[j]][1]; vl.back().v[2] = h; gluTessVertex(tobj, vl.back().v, vl.back().v); } |