~ubuntu-branches/ubuntu/utopic/slic3r/utopic

« back to all changes in this revision

Viewing changes to xs/src/MultiPoint.hpp

  • Committer: Package Import Robot
  • Author(s): Chow Loong Jin
  • Date: 2014-06-17 01:27:26 UTC
  • Revision ID: package-import@ubuntu.com-20140617012726-2wrs4zdo251nr4vg
Tags: upstream-1.1.4+dfsg
ImportĀ upstreamĀ versionĀ 1.1.4+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef slic3r_MultiPoint_hpp_
 
2
#define slic3r_MultiPoint_hpp_
 
3
 
 
4
#include <myinit.h>
 
5
#include <algorithm>
 
6
#include <vector>
 
7
#include "Line.hpp"
 
8
#include "Point.hpp"
 
9
 
 
10
namespace Slic3r {
 
11
 
 
12
class BoundingBox;
 
13
 
 
14
class MultiPoint
 
15
{
 
16
    public:
 
17
    Points points;
 
18
    
 
19
    operator Points() const;
 
20
    void scale(double factor);
 
21
    void translate(double x, double y);
 
22
    void rotate(double angle, const Point &center);
 
23
    void reverse();
 
24
    Point first_point() const;
 
25
    virtual Point last_point() const = 0;
 
26
    virtual Lines lines() const = 0;
 
27
    double length() const;
 
28
    bool is_valid() const;
 
29
    int find_point(const Point &point) const;
 
30
    void bounding_box(BoundingBox* bb) const;
 
31
    
 
32
    static Points _douglas_peucker(const Points &points, const double tolerance);
 
33
    
 
34
    #ifdef SLIC3RXS
 
35
    void from_SV(SV* poly_sv);
 
36
    void from_SV_check(SV* poly_sv);
 
37
    SV* to_AV();
 
38
    SV* to_SV_pureperl() const;
 
39
    #endif
 
40
};
 
41
 
 
42
}
 
43
 
 
44
#endif