RPoint
Class in Math Module
Header: #include <src/core/math/RPoint.h>
Inherits: RShape
Inherited by: RPointData, RTextLabel, RViewportData
Description
Section titled “Description”Low-level mathematical representation of a point.
Scriptable: This class is available in script environments.
Shared Pointer Support: Objects can be used in QSharedPointer.
Copyable: Objects are cleaned up automatically by the garbage collector of the script engine.
Stream Operator: Object has a stream operator to present itself as string, for example when using toString() in a script.
Public Functions
Section titled “Public Functions”RPoint() |
|
RPoint(const RVector &position)Creates a point object with the given position. |
|
RPoint(double x, double y) |
|
| virtual | ~RPoint() |
| virtual QSharedPointer< RShape > | clone() const |
| QSharedPointer< RPoint > | cloneToPoint() const |
| virtual bool | flipHorizontal() |
| virtual bool | flipVertical() |
| virtual double | getAngleAt(double distance, RS::From from=RS::FromStart) const |
| virtual RBox | getBoundingBox() const |
| virtual QList< RVector > | getCenterPoints() const |
| virtual QList< RVector > | getEndPoints() const |
| virtual double | getLength() const |
| virtual QList< RVector > | getMiddlePoints() const |
| virtual QList< RVector > | getPointCloud(double segmentLength) const |
| virtual QList< RVector > | getPointsWithDistanceToEnd(double distance, int from=RS::FromAny) const |
| RVector | getPosition() const |
| virtual RShape::Type | getShapeType() const |
| virtual QSharedPointer< RShape > | getTransformed(const QTransform &transform) const |
| virtual QList< RVector > | getVectorProperties() const |
| virtual RVector | getVectorTo(const RVector &point, bool limited=true, double strictRange=RMAXDOUBLE) const |
| virtual bool | mirror(const RLine &axis) |
| virtual bool | move(const RVector &offset) |
| virtual bool | rotate(double rotation, const RVector ¢er=RDEFAULT_RVECTOR) |
| virtual bool | scale(const RVector &scaleFactors, const RVector ¢er=RDEFAULT_RVECTOR) |
| void | setPosition(const RVector &p) |
| virtual void | setZ(double z) |
Public Attributes
Section titled “Public Attributes”| RVector | position Getter function for this property: getPosition. |
Protected Functions
Section titled “Protected Functions”| virtual void | print(QDebug dbg) const |
Member Documentation
Section titled “Member Documentation”RPoint
Section titled “RPoint”RPoint::RPoint()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. Creates a point object with an invalid position
RPoint
Section titled “RPoint”RPoint::RPoint(const RVector &position)Creates a point object with the given position.
Parameters:
position: the position
RPoint
Section titled “RPoint”RPoint::RPoint(double x, double y)~RPoint
Section titled “~RPoint”virtual RPoint::~RPoint()virtual
virtual QSharedPointer< RShape > RPoint::clone() constvirtual inline const
Reimplemented from clone.
Reimplemented in clone.
cloneToPoint
Section titled “cloneToPoint”QSharedPointer< RPoint > RPoint::cloneToPoint() constinline const
flipHorizontal
Section titled “flipHorizontal”virtual bool RPoint::flipHorizontal()virtual
Reimplemented from flipHorizontal.
Reimplemented in flipHorizontal, flipHorizontal.
flipVertical
Section titled “flipVertical”virtual bool RPoint::flipVertical()virtual
Reimplemented from flipVertical.
Reimplemented in flipVertical, flipVertical.
getAngleAt
Section titled “getAngleAt”virtual double RPoint::getAngleAt(double distance, RS::From from=RS::FromStart) constvirtual const
Returns: Angle on the entity at the given distance from the start point.
Reimplemented from getAngleAt.
getBoundingBox
Section titled “getBoundingBox”virtual RBox RPoint::getBoundingBox() constvirtual const
Returns: The bounding box of this shape.
Reimplemented from getBoundingBox.
Reimplemented in getBoundingBox.
getCenterPoints
Section titled “getCenterPoints”virtual QList< RVector > RPoint::getCenterPoints() constvirtual const
Returns: The center point(s) of this shape.
Reimplemented from getCenterPoints.
getEndPoints
Section titled “getEndPoints”virtual QList< RVector > RPoint::getEndPoints() constvirtual const
Returns: The end point(s) of this shape.
Reimplemented from getEndPoints.
getLength
Section titled “getLength”virtual double RPoint::getLength() constvirtual const
Returns: The total length of this shape if applicable or NaN if not.
Reimplemented from getLength.
getMiddlePoints
Section titled “getMiddlePoints”virtual QList< RVector > RPoint::getMiddlePoints() constvirtual const
Returns: The middle point(s) of this shape.
Reimplemented from getMiddlePoints.
getPointCloud
Section titled “getPointCloud”virtual QList< RVector > RPoint::getPointCloud(double segmentLength) constvirtual const
Reimplemented from getPointCloud.
getPointsWithDistanceToEnd
Section titled “getPointsWithDistanceToEnd”virtual QList< RVector > RPoint::getPointsWithDistanceToEnd(double distance, int from=RS::FromAny) constvirtual const
Returns: All points on this shape with the given distance to an endpoint.
Reimplemented from getPointsWithDistanceToEnd.
getPosition
Section titled “getPosition”RVector RPoint::getPosition() constinline const
getShapeType
Section titled “getShapeType”virtual RShape::Type RPoint::getShapeType() constvirtual inline const
Reimplemented from getShapeType.
getTransformed
Section titled “getTransformed”virtual QSharedPointer< RShape > RPoint::getTransformed(const QTransform &transform) constvirtual const
Reimplemented from getTransformed.
getVectorProperties
Section titled “getVectorProperties”virtual QList< RVector > RPoint::getVectorProperties() constvirtual const
Reimplemented from getVectorProperties.
getVectorTo
Section titled “getVectorTo”virtual RVector RPoint::getVectorTo(const RVector &point, bool limited=true, double strictRange=RMAXDOUBLE) constvirtual const
Returns: Shortest vector from this shape to the given point.
Parameters:
point: the given pointlimited: If false, the shape is treated as an unlimited shape that extends in a logical way. For example an unlimited line for a line, full circle for an arc or a plane for a triangle.
Reimplemented from getVectorTo.
Reimplemented in getVectorTo, getVectorTo.
mirror
Section titled “mirror”virtual bool RPoint::mirror(const RLine &axis)virtual
Reimplemented from mirror.
Reimplemented in mirror, mirror.
virtual bool RPoint::move(const RVector &offset)virtual
Reimplemented from move.
rotate
Section titled “rotate”virtual bool RPoint::rotate(double rotation, const RVector ¢er=RDEFAULT_RVECTOR)virtual
Reimplemented from rotate.
Reimplemented in rotate, rotate.
virtual bool RPoint::scale(const RVector &scaleFactors, const RVector ¢er=RDEFAULT_RVECTOR)virtual
Reimplemented from scale.
Reimplemented in scale, scale.
setPosition
Section titled “setPosition”void RPoint::setPosition(const RVector &p)inline
virtual void RPoint::setZ(double z)virtual
Reimplemented from setZ.
position
Section titled “position”RVector RPoint::positionGetter function for this property: getPosition.
Setter function for this property: setPosition
virtual void RPoint::print(QDebug dbg) constvirtual const protected
Reimplemented from print.
Reimplemented in print.