QCAD
Open Source 2D CAD
RDirected.h
Go to the documentation of this file.
1 
20 #ifndef RDIRECTED_H
21 #define RDIRECTED_H
22 
23 #include "../core_global.h"
24 
25 #include <QSharedPointer>
26 
27 #include "RShape.h"
28 
37 public:
38  virtual ~RDirected() {}
39 
40  virtual double getDirection1() const = 0;
41  virtual double getDirection2() const = 0;
42 
43  virtual RVector getStartPoint() const = 0;
44  virtual RVector getEndPoint() const = 0;
45 
46  virtual bool reverse() = 0;
47 
48  virtual void trimStartPoint(const RVector& p) = 0;
49  virtual void trimEndPoint(const RVector& p) = 0;
50 
55  virtual RS::Ending getTrimEnd(const RVector& coord, const RVector& trimPoint) = 0;
56 
61  virtual double getDistanceFromStart(const RVector& p) const {
62  Q_UNUSED(p)
63  return RMAXDOUBLE;
64  }
65 };
66 
69 Q_DECLARE_METATYPE(QSharedPointer<RDirected>)
70 Q_DECLARE_METATYPE(QSharedPointer<RDirected>*)
71 
72 #endif
Ending
Entity ending.
Definition: RS.h:136
Represents a 3d vector (x/y/z).
Definition: RVector.h:46
#define QCADCORE_EXPORT
Definition: core_global.h:10
virtual ~RDirected()
Definition: RDirected.h:38
virtual double getDistanceFromStart(const RVector &p) const
Definition: RDirected.h:61
Q_DECLARE_METATYPE(RMath *)
void trimEndPoint(void shape, void p)
Definition: library.js:464
#define RMAXDOUBLE
Definition: RMath.h:50
Copyright (c) 2011-2015 by Andrew Mustun.
Definition: RDirected.h:36
void trimStartPoint(void shape, void p)
Definition: library.js:720