QCAD
Open Source 2D CAD
RSnapAuto.h
Go to the documentation of this file.
1 
20 #ifndef RSNAPAUTO_H
21 #define RSNAPAUTO_H
22 
23 #include "snap_global.h"
24 
25 #include "RSnap.h"
26 
27 class RMouseEvent;
28 class RGraphicsView;
29 
38 public:
39  RSnapAuto() : RSnap(RSnap::Unknown) {}
40  virtual ~RSnapAuto() {}
41 
42  virtual RVector snap(
43  const RVector& position,
44  RGraphicsView& view,
45  double range=RNANDOUBLE
46  );
47 
48  static void init(bool force = false);
49 
50 private:
51  static bool initialized;
52 
53  static bool intersections;
54  static bool endPoints;
55  static bool middlePoints;
56  static bool centerPoints;
57  static bool perpendicular;
58  static bool tangential;
59  static bool referencePoints;
60  static bool gridPoints;
61  static bool pointsOnEntity;
62  static bool freePositioning;
63 };
64 
66 
67 #endif
snap_global.h
QCADSNAP_EXPORT
#define QCADSNAP_EXPORT
Definition: snap_global.h:10
RSnapAuto::pointsOnEntity
static bool pointsOnEntity
Definition: RSnapAuto.h:61
RSnapAuto::freePositioning
static bool freePositioning
Definition: RSnapAuto.h:62
RMouseEvent
A mouse event for a graphics scene.
Definition: RMouseEvent.h:42
RSnapAuto::centerPoints
static bool centerPoints
Definition: RSnapAuto.h:56
RVector
Represents a 3d vector (x/y/z).
Definition: RVector.h:46
RSnapAuto::referencePoints
static bool referencePoints
Definition: RSnapAuto.h:59
RSnapAuto::middlePoints
static bool middlePoints
Definition: RSnapAuto.h:55
RSnapAuto::initialized
static bool initialized
Copyright (c) 2011-2018 by Andrew Mustun.
Definition: RSnapAuto.h:51
RSnapAuto::perpendicular
static bool perpendicular
Definition: RSnapAuto.h:57
RSnapAuto::RSnapAuto
RSnapAuto()
Definition: RSnapAuto.h:39
RSnapAuto::tangential
static bool tangential
Definition: RSnapAuto.h:58
RGraphicsView
Graphics view.
Definition: RGraphicsView.h:58
RSnapAuto::intersections
static bool intersections
Definition: RSnapAuto.h:53
Q_DECLARE_METATYPE
Q_DECLARE_METATYPE(RMath *)
RNANDOUBLE
#define RNANDOUBLE
Definition: RMath.h:71
RSnap
Abstract base class for all grid and object snap implementations.
Definition: RSnap.h:44
RSnapAuto::gridPoints
static bool gridPoints
Definition: RSnapAuto.h:60
RSnap::snap
virtual RVector snap(const RVector &position, RGraphicsView &view, double range=RNANDOUBLE)=0
RSnapAuto
Auto snapper implementation.
Definition: RSnapAuto.h:37
RSnapAuto::endPoints
static bool endPoints
Definition: RSnapAuto.h:54
init
void init(void basePath)
Definition: AddBlockInit.js:2
RSnap.h
RSnapAuto::~RSnapAuto
virtual ~RSnapAuto()
Definition: RSnapAuto.h:40