Skip to content

RSnapAuto

Class in Snap Module
Header: #include <src/snap/RSnapAuto.h>
Inherits: RSnap

Auto snapper implementation.

Scriptable: This class is available in script environments.

enum Mode { None, Intersections, EndPoints, MiddlePoints, CenterPoints, PerpendicularPoints, TangentialPoints, ReferencePoints, GridPoints, PointsOnEntity, FreePositioning }
RSnapAuto()
virtual ~RSnapAuto()
virtual void reset()
virtual RVector snap(const RVector &position, RGraphicsView &view, double range=RNANDOUBLE)
static bool getCenterPoints()
static bool getEndPoints()
static bool getFreePositioning()
static bool getGridPoints()
static bool getIntersections()
static bool getMiddlePoints()
static bool getMode(RSnapAuto::Mode mode)
static RSnapAuto::Modes getModes()
static bool getPerpendicular()
static bool getPointsOnEntity()
static bool getReferencePoints()
static bool getTangential()
static void init(bool force=false)
static void setCenterPoints(bool on)
static void setEndPoints(bool on)
static void setFreePositioning(bool on)
static void setGridPoints(bool on)
static void setIntersections(bool on)
static void setMiddlePoints(bool on)
static void setMode(RSnapAuto::Mode mode, bool on)
static void setModes(RSnapAuto::Modes m)
static void setPerpendicular(bool on)
static void setPointsOnEntity(bool on)
static void setReferencePoints(bool on)
static void setTangential(bool on)
static bool initialized
static Modes modes

enum Mode
Value Description
None = 0x0000
Intersections = 0x0001
EndPoints = 0x0002
MiddlePoints = 0x0004
CenterPoints = 0x0008
PerpendicularPoints = 0x0010
TangentialPoints = 0x0020
ReferencePoints = 0x0040
GridPoints = 0x0080
PointsOnEntity = 0x0100
FreePositioning = 0x0200

RSnapAuto::RSnapAuto()

inline

virtual RSnapAuto::~RSnapAuto()

virtual inline

virtual void RSnapAuto::reset()

virtual inline

Reimplemented from reset.

virtual RVector RSnapAuto::snap(const RVector &position, RGraphicsView &view, double range=RNANDOUBLE)

virtual

Returns: The snapped position (closest relevant position) for the given mouse position.

Reimplemented from snap.

static bool RSnapAuto::getCenterPoints()

static inline

static bool RSnapAuto::getEndPoints()

static inline

static bool RSnapAuto::getFreePositioning()

static inline

static bool RSnapAuto::getGridPoints()

static inline

static bool RSnapAuto::getIntersections()

static inline

static bool RSnapAuto::getMiddlePoints()

static inline

static bool RSnapAuto::getMode(RSnapAuto::Mode mode)

static inline

static RSnapAuto::Modes RSnapAuto::getModes()

static inline

static bool RSnapAuto::getPerpendicular()

static inline

static bool RSnapAuto::getPointsOnEntity()

static inline

static bool RSnapAuto::getReferencePoints()

static inline

static bool RSnapAuto::getTangential()

static inline

static void RSnapAuto::init(bool force=false)

static

static void RSnapAuto::setCenterPoints(bool on)

static inline

static void RSnapAuto::setEndPoints(bool on)

static inline

static void RSnapAuto::setFreePositioning(bool on)

static inline

static void RSnapAuto::setGridPoints(bool on)

static inline

static void RSnapAuto::setIntersections(bool on)

static inline

static void RSnapAuto::setMiddlePoints(bool on)

static inline

static void RSnapAuto::setMode(RSnapAuto::Mode mode, bool on)

static inline

static void RSnapAuto::setModes(RSnapAuto::Modes m)

static inline

static void RSnapAuto::setPerpendicular(bool on)

static inline

static void RSnapAuto::setPointsOnEntity(bool on)

static inline

static void RSnapAuto::setReferencePoints(bool on)

static inline

static void RSnapAuto::setTangential(bool on)

static inline

static bool RSnapAuto::initialized = false

static private

All rights reserved.

This file is part of the QCAD project.

QCAD is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

QCAD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with QCAD.

static RSnapAuto::Modes RSnapAuto::modes = RSnapAuto::None

static private