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  virtual ~RSnapAuto() {}
40 
41  virtual RVector snap(
42  const RVector& position,
43  RGraphicsView& view,
44  double range=RNANDOUBLE
45  );
46 
47  static void init(bool force = false);
48 
49 private:
50  static bool initialized;
51 
52  static bool intersections;
53  static bool endPoints;
54  static bool middlePoints;
55  static bool centerPoints;
56  static bool perpendicular;
57  static bool referencePoints;
58  static bool gridPoints;
59  static bool pointsOnEntity;
60  static bool freePositioning;
61 };
62 
64 
65 #endif
static bool initialized
Copyright (c) 2011-2015 by Andrew Mustun.
Definition: RSnapAuto.h:50
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:53
static bool middlePoints
Definition: RSnapAuto.h:54
static bool referencePoints
Definition: RSnapAuto.h:57
static bool perpendicular
Definition: RSnapAuto.h:56
static bool freePositioning
Definition: RSnapAuto.h:60
#define RNANDOUBLE
Definition: RMath.h:55
static bool centerPoints
Definition: RSnapAuto.h:55
static bool gridPoints
Definition: RSnapAuto.h:58
Q_DECLARE_METATYPE(RMath *)
static bool intersections
Definition: RSnapAuto.h:52
virtual RVector snap(const RVector &position, RGraphicsView &view, double range=RNANDOUBLE)=0
A mouse event for a graphics scene.
Definition: RMouseEvent.h:42
void init(void basePath)
Definition: AddBlockInit.js:2
#define QCADSNAP_EXPORT
Definition: snap_global.h:10
virtual ~RSnapAuto()
Definition: RSnapAuto.h:39
Auto snapper implementation.
Definition: RSnapAuto.h:37
static bool pointsOnEntity
Definition: RSnapAuto.h:59
Graphics view.
Definition: RGraphicsView.h:58