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
static bool initialized
Copyright (c) 2011-2016 by Andrew Mustun.
Definition: RSnapAuto.h:51
Abstract base class for all grid and object snap implementations.
Definition: RSnap.h:44
Represents a 3d vector (x/y/z).
Definition: RVector.h:46
static bool endPoints
Definition: RSnapAuto.h:54
static bool middlePoints
Definition: RSnapAuto.h:55
static bool referencePoints
Definition: RSnapAuto.h:59
static bool perpendicular
Definition: RSnapAuto.h:57
static bool freePositioning
Definition: RSnapAuto.h:62
#define RNANDOUBLE
Definition: RMath.h:71
static bool centerPoints
Definition: RSnapAuto.h:56
static bool gridPoints
Definition: RSnapAuto.h:60
Q_DECLARE_METATYPE(RMath *)
static bool intersections
Definition: RSnapAuto.h:53
RSnapAuto()
Definition: RSnapAuto.h:39
virtual RVector snap(const RVector &position, RGraphicsView &view, double range=RNANDOUBLE)=0
A mouse event for a graphics scene.
Definition: RMouseEvent.h:42
static bool tangential
Definition: RSnapAuto.h:58
void init(void basePath)
Definition: AddBlockInit.js:2
#define QCADSNAP_EXPORT
Definition: snap_global.h:10
virtual ~RSnapAuto()
Definition: RSnapAuto.h:40
Auto snapper implementation.
Definition: RSnapAuto.h:37
static bool pointsOnEntity
Definition: RSnapAuto.h:61
Graphics view.
Definition: RGraphicsView.h:58