QCAD
Open Source 2D CAD
Loading...
Searching...
No Matches
RShapesExporter.h
Go to the documentation of this file.
1
19#ifndef RSHAPESEXPORTER_H
20#define RSHAPESEXPORTER_H
21
22#include "core_global.h"
23
24#include "RShape.h"
25#include "RExporter.h"
26
31public:
32 RShapesExporter(RExporter& exporter, const QList<QSharedPointer<RShape> >& shapes, double offset);
33 virtual void exportLineSegment(const RLine& line, double angle = RNANDOUBLE);
34
36 return exporter.getLinetypePattern();
37 }
39 return exporter.getLineTypePatternScale(p);
40 }
41
42 virtual void exportPainterPaths(const QList<RPainterPath>& paths, double z = 0.0) {
43 exporter.exportPainterPaths(paths, z);
44 }
45
46 virtual void exportPainterPaths(const QList<RPainterPath>& paths, double angle, const RVector& pos);
47
48 virtual void exportXLine(const RXLine& ) {}
49 virtual void exportRay(const RRay& ) { }
50 virtual void exportPoint(const RPoint& ) { }
51 virtual void exportTriangle(const RTriangle& ) { }
52
53 RVector getPointAt(double d, int* index = NULL);
54 double getAngleAt(double d);
55 int getShapeAt(double d);
56 void exportShapesBetween(int i1, const RVector& p1, int i2, const RVector& p2, double angle);
57
58private:
60 QList<QSharedPointer<RShape> > shapes;
61 std::vector<double> lengthAt;
62};
63
64#endif
#define RNANDOUBLE
Definition RMath.h:74
Abstract base class for exporters.
Definition RExporter.h:78
virtual void exportPainterPaths(const QList< RPainterPath > &paths, double z=0.0)
Definition RExporter.cpp:1640
virtual RLinetypePattern getLinetypePattern()
Definition RExporter.cpp:981
virtual void exportLineSegment(const RLine &line, double angle=RNANDOUBLE)=0
Exports a line segment (a line without pattern).
virtual double getLineTypePatternScale(const RLinetypePattern &p) const
Definition RExporter.cpp:1694
Low-level mathematical representation of a line.
Definition RLine.h:41
Copyright (c) 2011-2018 by Andrew Mustun.
Definition RLinetypePattern.h:42
Low-level mathematical representation of a point.
Definition RPoint.h:40
Low-level mathematical representation of a ray.
Definition RRay.h:41
Copyright (c) 2011-2018 by Andrew Mustun.
Definition RShapesExporter.h:30
RExporter & exporter
Definition RShapesExporter.h:59
virtual void exportPoint(const RPoint &)
Exports a point with the current attributes.
Definition RShapesExporter.h:50
virtual void exportPainterPaths(const QList< RPainterPath > &paths, double z=0.0)
Definition RShapesExporter.h:42
virtual RLinetypePattern getLinetypePattern()
Definition RShapesExporter.h:35
std::vector< double > lengthAt
Definition RShapesExporter.h:61
virtual void exportRay(const RRay &)
Exports an infinite ray.
Definition RShapesExporter.h:49
virtual void exportXLine(const RXLine &)
Exports an infinite line.
Definition RShapesExporter.h:48
QList< QSharedPointer< RShape > > shapes
Definition RShapesExporter.h:60
double getLineTypePatternScale(const RLinetypePattern &p) const
Definition RShapesExporter.h:38
virtual void exportTriangle(const RTriangle &)
Exports a triangle with the current attributes.
Definition RShapesExporter.h:51
Low-level mathematical representation of a triangle.
Definition RTriangle.h:49
Represents a 3d vector (x/y/z).
Definition RVector.h:47
Low-level mathematical representation of an infinite line.
Definition RXLine.h:42
#define QCADCORE_EXPORT
Definition core_global.h:10
#define NULL
Definition opennurbs_system.h:256