RRay
Class in Math Module
Header: #include <src/core/math/RRay.h>
Inherits: RXLine
Inherited by: RRayData
Description
Section titled “Description”Low-level mathematical representation of a ray.
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”RRay() |
|
RRay(const RLine &line) |
|
RRay(const RVector &basePoint, const RVector &directionVector)Creates a ray object with the given base point and direction. |
|
RRay(const RVector &basePoint, double angle, double distance) |
|
| virtual | ~RRay() |
| virtual QSharedPointer< RShape > | clone() const |
| QSharedPointer< RRay > | cloneToRay() const |
| virtual RLine | getClippedLine(const RBox &box) const |
| virtual QList< RVector > | getPointsWithDistanceToEnd(double distance, int from) const |
| virtual RShape::Type | getShapeType() const |
| virtual QList< RVector > | getVectorProperties() const |
| virtual RVector | getVectorTo(const RVector &point, bool limited=true, double strictRange=RMAXDOUBLE) const |
| virtual bool | reverse() |
| virtual QList< QSharedPointer< RShape > > | splitAt(const QList< RVector > &points) const |
| virtual bool | stretch(const RPolyline &area, const RVector &offset) |
| virtual bool | trimEndPoint(const RVector &trimPoint, const RVector &clickPoint=RVector::invalid, bool extend=false) |
Protected Functions
Section titled “Protected Functions”| virtual void | print(QDebug dbg) const |
Member Documentation
Section titled “Member Documentation”RRay::RRay()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 ray object with invalid start and end points.
RRay::RRay(const RLine &line)RRay::RRay(const RVector &basePoint, const RVector &directionVector)Creates a ray object with the given base point and direction.
RRay::RRay(const RVector &basePoint, double angle, double distance)virtual RRay::~RRay()virtual
virtual QSharedPointer< RShape > RRay::clone() constvirtual inline const
Reimplemented from clone.
cloneToRay
Section titled “cloneToRay”QSharedPointer< RRay > RRay::cloneToRay() constinline const
getClippedLine
Section titled “getClippedLine”virtual RLine RRay::getClippedLine(const RBox &box) constvirtual const
Reimplemented from getClippedLine.
getPointsWithDistanceToEnd
Section titled “getPointsWithDistanceToEnd”virtual QList< RVector > RRay::getPointsWithDistanceToEnd(double distance, int from) constvirtual const
Returns: All points on this shape with the given distance to an endpoint.
Reimplemented from getPointsWithDistanceToEnd.
getShapeType
Section titled “getShapeType”virtual RShape::Type RRay::getShapeType() constvirtual inline const
Reimplemented from getShapeType.
getVectorProperties
Section titled “getVectorProperties”virtual QList< RVector > RRay::getVectorProperties() constvirtual const
Reimplemented from getVectorProperties.
getVectorTo
Section titled “getVectorTo”virtual RVector RRay::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.
reverse
Section titled “reverse”virtual bool RRay::reverse()virtual
Reimplemented from reverse.
Reimplemented in reverse.
splitAt
Section titled “splitAt”virtual QList< QSharedPointer< RShape > > RRay::splitAt(const QList< RVector > &points) constvirtual const
Returns: Array of shapes which represent the given shape split up at the given points.
Parameters:
points: Array of RVector, assumed to be on shape.
Reimplemented from splitAt.
stretch
Section titled “stretch”virtual bool RRay::stretch(const RPolyline &area, const RVector &offset)virtual
Reimplemented from stretch.
Reimplemented in stretch.
trimEndPoint
Section titled “trimEndPoint”virtual bool RRay::trimEndPoint(const RVector &trimPoint, const RVector &clickPoint=RVector::invalid, bool extend=false)virtual
Parameters:
trimPoint: Trim start point or end point to this coordinate.clickPoint: Point that was clicked by user.extend: True if the shape is to be extended. Used for polylines to determine that the last segment has to be trimmed even if another segment was clicked.
Reimplemented from trimEndPoint.
Reimplemented in trimEndPoint.
virtual void RRay::print(QDebug dbg) constvirtual const protected
Reimplemented from print.