RVector
Class in Math Module
Header: #include <src/core/math/RVector.h>
Inherited by: RRefPoint
Nested classes: RVectorAngleSort, RVectorDistanceSort, RVectorLeftRightTopBottomSort
Description
Section titled “Description”Represents a 3d vector (x/y/z).
Scriptable: This class is available in script environments.
Copyable: Objects are cleaned up automatically by the garbage collector of the script engine.
Public Functions
Section titled “Public Functions”RVector()Constructor for a valid null vector (0/0/0). |
|
RVector(const QList< double > &tuples)Constructor from a list of up to three doubles (x, y, z). |
|
RVector(double vx, double vy, double vz=0.0, bool valid_in=true)Constructor for a point with given valid flag. |
|
~RVector() |
|
| RVector | axonometricProjection(RS::IsoProjectionType type)Axonometric projection (isometric, dimetric, trimetric). |
| double | dot(const RVector &other) const |
| bool | equalsFuzzy(const RVector &v, double tol=RS::PointTolerance) const |
| bool | equalsFuzzy2D(const RVector &v, double tol=RS::PointTolerance) const |
| RVector | flipHorizontal()Mirrors this vector at the Y-axis. |
| RVector | flipVertical()Mirrors this vector at the X-axis. |
| RVector | get2D() const |
| RVector | getAbsolute() const |
| double | getAngle() const |
| double | getAngleTo(const RVector &v) const |
| double | getAngleToPlaneXY() const |
| RVector | getCeil() const |
| RVector | getClosest(const QList< RVector > &list) const |
| RVector | getClosest2D(const QList< RVector > &list) const |
| double | getClosestDistance(const QList< RVector > &list, int counts) |
| int | getClosestIndex(const QList< RVector > &list, bool ignoreZ=false) const |
| int | getClosestIndex2D(const QList< RVector > &list) const |
| double | getDistanceTo(const RVector &v) const |
| double | getDistanceTo2D(const RVector &v) const |
| RVector | getDividedComponents(const RVector &v) const |
| RVector | getFloor() const |
| RVector | getLerp(const RVector &v, double t) constLinear interpolation between this and v by fraction ‘t’. |
| double | getMagnitude() const |
| double | getMagnitude2D() const |
| RVector | getMirrored(const RLine &axis) const |
| RVector | getMultipliedComponents(const RVector &v) const |
| RVector | getNegated() const |
| RVector | getNormalized() const |
| RVector | getRotated(double rotation, const RVector ¢er) const |
| RVector | getScaled(const RVector &factors, const RVector ¢er) const |
| double | getSquaredMagnitude() const |
| RVector | getTransformed(const RMatrix &m) const |
| RVector | getTransformed2D(const QTransform &t) const |
| RVector | getTransformed2DM(const RMatrix &m) const |
| RVector | getUnitVector() const |
| double | getX() const |
| double | getY() const |
| double | getZ() const |
| bool | gteXY(const RVector &v) const |
| bool | isInside(const RBox &b) const |
| bool | isInWindow(const RVector &firstCorner, const RVector &secondCorner) const |
| bool | isNaN() const |
| RVector | isoProject(RS::IsoProjectionType type)Changes this vector into its isometric projection. |
| bool | isSane() const |
| bool | isValid() const |
| bool | isZero() const |
| bool | lteXY(const RVector &v) const |
| RVector | mirror(const RLine &axis)Mirrors this vector at the given axis. |
| RVector | mirror(const RVector &axis1, const RVector &axis2)Mirrors this vector at the axis defined by two points. |
| RVector | move(const RVector &offset)Moves this vector by the given offset. |
| RVector | normalize()Normalizes this vector and returns a reference to this vector. |
| RVector | obliqueProjection(RS::IsoProjectionType type) |
| bool | operator!=(const RVector &v) const |
| RVector | operator*(double s) constbinary * operator. |
| void | operator*=(double s)*= operator |
| RVector | operator+(const RVector &v) constbinary + operator. |
| void | operator+=(const RVector &v)+= operator. |
| RVector | operator-() constunary - operator. |
| RVector | operator-(const RVector &v) constbinary - operator. |
| void | operator-=(const RVector &v)-= operator. |
| RVector | operator/(double s) constbinary / operator. |
| void | operator/=(double s)/= operator |
| bool | operator==(const RVector &v) const== operator |
| RVector | rotate(double rotation)Rotates this vector around the origin by the given angle (in rad). |
| RVector | rotate(double rotation, const RVector ¢er)Rotates this vector around the given center by the given angle. |
| RVector | rotate3D(const QQuaternion &quaternion)Rotates this vector by the given quaternion. |
| RVector | rotate3D(const RLine &axis, double rotation)Rotates this vector around the given 3D axis line by the given angle (in rad). |
| RVector | scale(const RVector &factors, const RVector ¢er=nullVector)Scales this vector by the given factors with the given center. |
| RVector | scale(double factor, const RVector ¢er=nullVector)Scales this vector by the given factor with the given center. |
| void | set(double vx, double vy, double vz=0.0)Sets new values for the vector and makes the vector valid. |
| void | setAngle(double a)Sets the direction of this vector to the given angle (in rad), preserving its magnitude. |
| void | setMagnitude2D(double m)Sets the vector magnitude without changing the direction. |
| void | setPolar(double radius, double angle)Sets a new position for the vector in polar coordinates. |
| void | setX(double x) |
| void | setY(double y) |
| void | setZ(double z) |
| RVector | stretch(const RPolyline &area, const RVector &offset)Moves this vector by offset if it is inside the given area. |
| RVector | transform(const RMatrix &m)Generic 3d transformation. |
| RVector | transform2D(const QTransform &t)Transforms this vector with the given transformation matrix. |
| RVector | transform2DM(const RMatrix &m)Generic 2d transformation. |
Static Public Functions
Section titled “Static Public Functions”| static bool | containsFuzzy(const QList< RVector > &vectors, const RVector &v, double tol=RS::PointTolerance) |
| static RVector | createPolar(double radius, double angle) |
| static int | findFirstFuzzy(const QList< RVector > &vectors, const RVector &v, double tol=RS::PointTolerance) |
| static RVector | getAverage(const QList< RVector > &vectors) |
| static RVector | getAverage(const RVector &v1, const RVector &v2)Convenience function. |
| static RVector | getCrossProduct(const RVector &v1, const RVector &v2) |
| static double | getDotProduct(const RVector &v1, const RVector &v2)Scalarproduct (dot product). |
| static QList< RVector > | getIntersection(const QList< RVector > &vectorsA, const QList< RVector > &vectorsB, double tol=RS::PointTolerance) |
| static RVector | getMaximum(const QList< RVector > &vectors) |
| static RVector | getMaximum(const RVector &v1, const RVector &v2) |
| static RVector | getMaximumX(const QList< RVector > &vectors) |
| static RVector | getMaximumY(const QList< RVector > &vectors) |
| static RVector | getMinimum(const QList< RVector > &vectors) |
| static RVector | getMinimum(const RVector &v1, const RVector &v2) |
| static RVector | getMinimumX(const QList< RVector > &vectors) |
| static RVector | getMinimumY(const QList< RVector > &vectors) |
| static QList< RVector > | getSortedByAngle(const QList< RVector > &list, const RVector ¢er, double angle) |
| static QList< RVector > | getSortedByDistance(const QList< RVector > &list, const RVector &v) |
| static QList< RVector > | getSortedLeftRightTopBottom(const QList< RVector > &list) |
| static QList< RVector > | getUnique(const QList< RVector > &vectors, double tol=RS::PointTolerance) |
| static QList< double > | getXList(const QList< RVector > &vectors) |
| static QList< double > | getYList(const QList< RVector > &vectors) |
| static QList< double > | getZList(const QList< RVector > &vectors) |
| static bool | greaterThanEqualXY(const RVector &v1, const RVector &v2) |
| static bool | greaterThanX(const RVector &v1, const RVector &v2) |
| static bool | greaterThanY(const RVector &v1, const RVector &v2) |
| static bool | lessThanEqualXY(const RVector &v1, const RVector &v2) |
| static bool | lessThanX(const RVector &v1, const RVector &v2) |
| static bool | lessThanY(const RVector &v1, const RVector &v2) |
| static void | moveList(QList< RVector > &list, const RVector &offset)Moves all vectors in the list by the given offset. |
| static void | rotateList(QList< RVector > &list, double rotation)Rotates all vectors in the list around the origin by the given angle (in rad). |
| static void | rotateList(QList< RVector > &list, double rotation, const RVector ¢er)Rotates all vectors in the list around center by the given angle (in rad). |
| static void | scaleList(QList< RVector > &list, const RVector &factors, const RVector ¢er=nullVector)Scales all vectors in the list by the given per-axis factors around center. |
| static void | scaleList(QList< RVector > &list, double factor, const RVector ¢er=nullVector)Scales all vectors in the list by the given uniform factor around center. |
Public Attributes
Section titled “Public Attributes”| bool | valid Getter function for this property: isValid. |
| double | x Getter function for this property: getX. |
| double | y Getter function for this property: getY. |
| double | z Getter function for this property: getZ. |
Static Public Attributes
Section titled “Static Public Attributes”| static const RVector | invalid invalid vector |
| static const RVector | nanVector NaN vector. |
| static const RVector | nullVector null vector |
| static const RVector | zAxis Z axis vector (default extrusion direction). |
Member Documentation
Section titled “Member Documentation”RVector
Section titled “RVector”RVector::RVector()inline
Constructor for a valid null vector (0/0/0).
RVector
Section titled “RVector”explicit RVector::RVector(const QList< double > &tuples)explicit
Constructor from a list of up to three doubles (x, y, z).
Missing components default to 0.
RVector
Section titled “RVector”RVector::RVector(double vx, double vy, double vz=0.0, bool valid_in=true)Constructor for a point with given valid flag.
Parameters:
v: true: a valid vector with default coordinates is created. false: an invalid vector is created Constructor for a point with given coordinates.
~RVector
Section titled “~RVector”RVector::~RVector()axonometricProjection
Section titled “axonometricProjection”RVector RVector::axonometricProjection(RS::IsoProjectionType type)Axonometric projection (isometric, dimetric, trimetric).
double RVector::dot(const RVector &other) constinline const
equalsFuzzy
Section titled “equalsFuzzy”bool RVector::equalsFuzzy(const RVector &v, double tol=RS::PointTolerance) constconst
Returns: True if this vector and the given vector are almost equal (see RS::PointTolerance).
Parameters:
tol: Tolerance in X, Y and Z.
equalsFuzzy2D
Section titled “equalsFuzzy2D”bool RVector::equalsFuzzy2D(const RVector &v, double tol=RS::PointTolerance) constconst
Returns: True if this vector and the given vector are almost equal (see RS::PointTolerance) in 2D space (x,y).
Parameters:
tol: Tolerance in X, Y.
flipHorizontal
Section titled “flipHorizontal”RVector RVector::flipHorizontal()Mirrors this vector at the Y-axis.
flipVertical
Section titled “flipVertical”RVector RVector::flipVertical()Mirrors this vector at the X-axis.
RVector RVector::get2D() constinline const
getAbsolute
Section titled “getAbsolute”RVector RVector::getAbsolute() constconst
Returns: A new vector with all components replaced by their absolute values.
getAngle
Section titled “getAngle”double RVector::getAngle() constconst
Returns: The angle from zero to this vector (in rad), in range [0, 2*PI).
getAngleTo
Section titled “getAngleTo”double RVector::getAngleTo(const RVector &v) constconst
Returns: The angle from this and the given coordinate (in rad).
getAngleToPlaneXY
Section titled “getAngleToPlaneXY”double RVector::getAngleToPlaneXY() constconst
Returns: Elevation angle above the XY plane (in rad). Positive above, negative below. Returns PI/2 for zero-length vectors.
getCeil
Section titled “getCeil”RVector RVector::getCeil() constconst
Returns: Vector with all components ceiled to the next higher integer.
getClosest
Section titled “getClosest”RVector RVector::getClosest(const QList< RVector > &list) constconst
Returns: The vector in list closest to this vector (3D distance), with Z set to 0, or an invalid vector if the list contains no valid vectors.
getClosest2D
Section titled “getClosest2D”RVector RVector::getClosest2D(const QList< RVector > &list) constconst
Returns: The vector in list closest to this vector (2D distance, Z ignored), or an invalid vector if the list contains no valid vectors.
getClosestDistance
Section titled “getClosestDistance”double RVector::getClosestDistance(const QList< RVector > &list, int counts)getClosestIndex
Section titled “getClosestIndex”int RVector::getClosestIndex(const QList< RVector > &list, bool ignoreZ=false) constconst
getClosestIndex2D
Section titled “getClosestIndex2D”int RVector::getClosestIndex2D(const QList< RVector > &list) constinline const
getDistanceTo
Section titled “getDistanceTo”double RVector::getDistanceTo(const RVector &v) constconst
Returns: The distance between this and the given coordinate.
getDistanceTo2D
Section titled “getDistanceTo2D”double RVector::getDistanceTo2D(const RVector &v) constconst
Returns: The distance between this and the given coordinate on the XY plane.
getDividedComponents
Section titled “getDividedComponents”RVector RVector::getDividedComponents(const RVector &v) constconst
Returns: A new vector with all components divided by the components given in vector v. Note that the division of two vectors is not defined. This is merely a helper function that does what it does.
getFloor
Section titled “getFloor”RVector RVector::getFloor() constconst
Returns: Vector with all components floored to the next lower integer.
getLerp
Section titled “getLerp”RVector RVector::getLerp(const RVector &v, double t) constconst
Linear interpolation between this and v by fraction ‘t’.
getMagnitude
Section titled “getMagnitude”double RVector::getMagnitude() constconst
Returns: Magnitude (length) of the vector.
getMagnitude2D
Section titled “getMagnitude2D”double RVector::getMagnitude2D() constconst
Returns: Magnitude (length) of the vector projected to the x/y plane (2d).
getMirrored
Section titled “getMirrored”RVector RVector::getMirrored(const RLine &axis) constconst
Returns: A new vector equal to this vector mirrored at the given axis line.
getMultipliedComponents
Section titled “getMultipliedComponents”RVector RVector::getMultipliedComponents(const RVector &v) constconst
Returns: A new vector with all components multiplied by the components given in vector v. Note that the multiplication of two vectors is not defined. This is merely a helper function that does what it does.
getNegated
Section titled “getNegated”RVector RVector::getNegated() constconst
Returns: New vector with negated components.
getNormalized
Section titled “getNormalized”RVector RVector::getNormalized() constconst
Returns: A new unit vector with the same direction as this vector.
getRotated
Section titled “getRotated”RVector RVector::getRotated(double rotation, const RVector ¢er) constconst
Returns: A new vector equal to this vector rotated by rotation around center.
getScaled
Section titled “getScaled”RVector RVector::getScaled(const RVector &factors, const RVector ¢er) constconst
Returns: A new vector equal to this vector scaled by factors around center.
getSquaredMagnitude
Section titled “getSquaredMagnitude”double RVector::getSquaredMagnitude() constconst
Returns: Square of magnitude (length).
getTransformed
Section titled “getTransformed”RVector RVector::getTransformed(const RMatrix &m) constconst
Returns: A new vector which is the result of this vector transformed by the given matrix.
getTransformed2D
Section titled “getTransformed2D”RVector RVector::getTransformed2D(const QTransform &t) constconst
Returns: A new vector which is the result of this vector transformed by the given transformation matrix.
getTransformed2DM
Section titled “getTransformed2DM”RVector RVector::getTransformed2DM(const RMatrix &m) constconst
Returns: A new vector which is the result of this vector transformed by the given matrix.
getUnitVector
Section titled “getUnitVector”RVector RVector::getUnitVector() constconst
Returns: Unit vector for this vector.
double RVector::getX() constconst
double RVector::getY() constconst
double RVector::getZ() constconst
bool RVector::gteXY(const RVector &v) constinline const
isInside
Section titled “isInside”bool RVector::isInside(const RBox &b) constconst
Returns: True if this vector is inside the given box, false otherwise.
isInWindow
Section titled “isInWindow”bool RVector::isInWindow(const RVector &firstCorner, const RVector &secondCorner) constconst
Returns: true if this vector is within the given range (2d).
bool RVector::isNaN() constconst
Returns: True if any component is NaN.
isoProject
Section titled “isoProject”RVector RVector::isoProject(RS::IsoProjectionType type)Changes this vector into its isometric projection.
isSane
Section titled “isSane”bool RVector::isSane() constconst
Returns: True if this vector is valid and all components are finite (not NaN or Inf).
isValid
Section titled “isValid”bool RVector::isValid() constconst
Returns: True if this vector is valid (not explicitly marked invalid).
isZero
Section titled “isZero”bool RVector::isZero() constconst
Returns: True if all components are within PointTolerance of zero.
bool RVector::lteXY(const RVector &v) constinline const
mirror
Section titled “mirror”RVector RVector::mirror(const RLine &axis)Mirrors this vector at the given axis.
mirror
Section titled “mirror”RVector RVector::mirror(const RVector &axis1, const RVector &axis2)Mirrors this vector at the axis defined by two points.
RVector RVector::move(const RVector &offset)Moves this vector by the given offset.
Equal to the operator +=.
normalize
Section titled “normalize”RVector RVector::normalize()Normalizes this vector and returns a reference to this vector.
obliqueProjection
Section titled “obliqueProjection”RVector RVector::obliqueProjection(RS::IsoProjectionType type)operator!=
Section titled “operator!=”bool RVector::operator!=(const RVector &v) constinline const
operator*
Section titled “operator*”RVector RVector::operator*(double s) constconst
binary * operator.
operator*=
Section titled “operator*=”void RVector::operator*=(double s)*= operator
operator+
Section titled “operator+”RVector RVector::operator+(const RVector &v) constconst
binary + operator.
operator+=
Section titled “operator+=”void RVector::operator+=(const RVector &v)+= operator.
The result is only valid if both vectors are valid.
operator-
Section titled “operator-”RVector RVector::operator-() constconst
unary - operator.
operator-
Section titled “operator-”RVector RVector::operator-(const RVector &v) constconst
binary - operator.
operator-=
Section titled “operator-=”void RVector::operator-=(const RVector &v)-= operator.
The result is only valid if both vectors are valid.
operator/
Section titled “operator/”RVector RVector::operator/(double s) constconst
binary / operator.
operator/=
Section titled “operator/=”void RVector::operator/=(double s)/= operator
operator==
Section titled “operator==”bool RVector::operator==(const RVector &v) constconst
== operator
rotate
Section titled “rotate”RVector RVector::rotate(double rotation)Rotates this vector around the origin by the given angle (in rad).
rotate
Section titled “rotate”RVector RVector::rotate(double rotation, const RVector ¢er)Rotates this vector around the given center by the given angle.
rotate3D
Section titled “rotate3D”RVector RVector::rotate3D(const QQuaternion &quaternion)Rotates this vector by the given quaternion.
rotate3D
Section titled “rotate3D”RVector RVector::rotate3D(const RLine &axis, double rotation)Rotates this vector around the given 3D axis line by the given angle (in rad).
The axis direction is taken as startPoint - endPoint.
RVector RVector::scale(const RVector &factors, const RVector ¢er=nullVector)Scales this vector by the given factors with the given center.
RVector RVector::scale(double factor, const RVector ¢er=nullVector)Scales this vector by the given factor with the given center.
void RVector::set(double vx, double vy, double vz=0.0)inline
Sets new values for the vector and makes the vector valid.
setAngle
Section titled “setAngle”void RVector::setAngle(double a)Sets the direction of this vector to the given angle (in rad), preserving its magnitude.
setMagnitude2D
Section titled “setMagnitude2D”void RVector::setMagnitude2D(double m)Sets the vector magnitude without changing the direction.
setPolar
Section titled “setPolar”void RVector::setPolar(double radius, double angle)Sets a new position for the vector in polar coordinates.
Parameters:
radius: the radius or the distanceangle: the angle in rad
void RVector::setX(double x)void RVector::setY(double y)void RVector::setZ(double z)stretch
Section titled “stretch”RVector RVector::stretch(const RPolyline &area, const RVector &offset)Moves this vector by offset if it is inside the given area.
transform
Section titled “transform”RVector RVector::transform(const RMatrix &m)Generic 3d transformation.
m must be a 3x3 matrix.
transform2D
Section titled “transform2D”RVector RVector::transform2D(const QTransform &t)Transforms this vector with the given transformation matrix.
transform2DM
Section titled “transform2DM”RVector RVector::transform2DM(const RMatrix &m)Generic 2d transformation.
m must be a 3x2 matrix.
containsFuzzy
Section titled “containsFuzzy”static bool RVector::containsFuzzy(const QList< RVector > &vectors, const RVector &v, double tol=RS::PointTolerance)static
Returns: True if vectors contains a vector approximately equal to v within tol.
createPolar
Section titled “createPolar”static RVector RVector::createPolar(double radius, double angle)static inline
findFirstFuzzy
Section titled “findFirstFuzzy”static int RVector::findFirstFuzzy(const QList< RVector > &vectors, const RVector &v, double tol=RS::PointTolerance)static
Returns: Index of the first vector in vectors approximately equal to v within tol, or -1 if not found.
getAverage
Section titled “getAverage”static RVector RVector::getAverage(const QList< RVector > &vectors)static
Returns: The average (centroid) of the given vectors, or an invalid vector if the list is empty.
getAverage
Section titled “getAverage”static RVector RVector::getAverage(const RVector &v1, const RVector &v2)static
Convenience function.
Returns: (v1 + v2) / 2.0
getCrossProduct
Section titled “getCrossProduct”static RVector RVector::getCrossProduct(const RVector &v1, const RVector &v2)static
Returns: Cross product of two vectors.
getDotProduct
Section titled “getDotProduct”static double RVector::getDotProduct(const RVector &v1, const RVector &v2)static
Scalarproduct (dot product).
getIntersection
Section titled “getIntersection”static QList< RVector > RVector::getIntersection(const QList< RVector > &vectorsA, const QList< RVector > &vectorsB, double tol=RS::PointTolerance)static
Returns: Elements of vectorsA that also appear in vectorsB (fuzzy intersection).
getMaximum
Section titled “getMaximum”static RVector RVector::getMaximum(const QList< RVector > &vectors)static
Returns: A vector with the maximum components from the given vectors. These might be mixed components from all vectors.
getMaximum
Section titled “getMaximum”static RVector RVector::getMaximum(const RVector &v1, const RVector &v2)static
Returns: A vector with the maximum values from the vectors v1 and v2
getMaximumX
Section titled “getMaximumX”static RVector RVector::getMaximumX(const QList< RVector > &vectors)static
Returns: That one vector from the given vectors with the largest X coordinate.
getMaximumY
Section titled “getMaximumY”static RVector RVector::getMaximumY(const QList< RVector > &vectors)static
Returns: That one vector from the given vectors with the largest Y coordinate.
getMinimum
Section titled “getMinimum”static RVector RVector::getMinimum(const QList< RVector > &vectors)static
Returns: A vector with the minimum components from the given vectors. These might be mixed components from all vectors.
getMinimum
Section titled “getMinimum”static RVector RVector::getMinimum(const RVector &v1, const RVector &v2)static
Returns: A vector with the minimum components from the vectors v1 and v2. These might be mixed components from both vectors.
getMinimumX
Section titled “getMinimumX”static RVector RVector::getMinimumX(const QList< RVector > &vectors)static
Returns: That one vector from the given vectors with the smallest X coordinate.
getMinimumY
Section titled “getMinimumY”static RVector RVector::getMinimumY(const QList< RVector > &vectors)static
Returns: That one vector from the given vectors with the smallest Y coordinate.
getSortedByAngle
Section titled “getSortedByAngle”static QList< RVector > RVector::getSortedByAngle(const QList< RVector > &list, const RVector ¢er, double angle)static
Returns: List of same vectors as given, ordered by shortest angle difference to given reference angle.
getSortedByDistance
Section titled “getSortedByDistance”static QList< RVector > RVector::getSortedByDistance(const QList< RVector > &list, const RVector &v)static
Returns: List of same vectors as given, ordered by shortes distance to given vector v.
getSortedLeftRightTopBottom
Section titled “getSortedLeftRightTopBottom”static QList< RVector > RVector::getSortedLeftRightTopBottom(const QList< RVector > &list)static
Returns: List of same vectors as given, ordered from left to right, top to bottom.
getUnique
Section titled “getUnique”static QList< RVector > RVector::getUnique(const QList< RVector > &vectors, double tol=RS::PointTolerance)static
Returns: A copy of vectors with duplicate entries (within tol) removed, preserving the order of first occurrence.
getXList
Section titled “getXList”static QList< double > RVector::getXList(const QList< RVector > &vectors)static
Returns: All X values of the given list of vectors as a new list.
getYList
Section titled “getYList”static QList< double > RVector::getYList(const QList< RVector > &vectors)static
Returns: All Y values of the given list of vectors as a new list.
getZList
Section titled “getZList”static QList< double > RVector::getZList(const QList< RVector > &vectors)static
Returns: All Z values of the given list of vectors as a new list.
greaterThanEqualXY
Section titled “greaterThanEqualXY”static bool RVector::greaterThanEqualXY(const RVector &v1, const RVector &v2)static inline
greaterThanX
Section titled “greaterThanX”static bool RVector::greaterThanX(const RVector &v1, const RVector &v2)static inline
greaterThanY
Section titled “greaterThanY”static bool RVector::greaterThanY(const RVector &v1, const RVector &v2)static inline
lessThanEqualXY
Section titled “lessThanEqualXY”static bool RVector::lessThanEqualXY(const RVector &v1, const RVector &v2)static inline
lessThanX
Section titled “lessThanX”static bool RVector::lessThanX(const RVector &v1, const RVector &v2)static inline
lessThanY
Section titled “lessThanY”static bool RVector::lessThanY(const RVector &v1, const RVector &v2)static inline
moveList
Section titled “moveList”static void RVector::moveList(QList< RVector > &list, const RVector &offset)static
Moves all vectors in the list by the given offset.
Non-Scriptable: This function is not available in script environments.
rotateList
Section titled “rotateList”static void RVector::rotateList(QList< RVector > &list, double rotation)static
Rotates all vectors in the list around the origin by the given angle (in rad).
Non-Scriptable: This function is not available in script environments.
rotateList
Section titled “rotateList”static void RVector::rotateList(QList< RVector > &list, double rotation, const RVector ¢er)static
Rotates all vectors in the list around center by the given angle (in rad).
Non-Scriptable: This function is not available in script environments.
scaleList
Section titled “scaleList”static void RVector::scaleList(QList< RVector > &list, const RVector &factors, const RVector ¢er=nullVector)static
Scales all vectors in the list by the given per-axis factors around center.
Non-Scriptable: This function is not available in script environments.
scaleList
Section titled “scaleList”static void RVector::scaleList(QList< RVector > &list, double factor, const RVector ¢er=nullVector)static
Scales all vectors in the list by the given uniform factor around center.
Non-Scriptable: This function is not available in script environments.
bool RVector::validGetter function for this property: isValid.
double RVector::xGetter function for this property: getX.
Setter function for this property: setX
double RVector::yGetter function for this property: getY.
Setter function for this property: setY
double RVector::zGetter function for this property: getZ.
Setter function for this property: setZ
invalid
Section titled “invalid”static const RVector RVector::invalid = RVector(0, 0, 0, false)static
invalid vector
nanVector
Section titled “nanVector”static const RVector RVector::nanVector = RVector(RNANDOUBLE, RNANDOUBLE, RNANDOUBLE, true)static
NaN vector.
nullVector
Section titled “nullVector”static const RVector RVector::nullVector = RVector(0, 0, 0, true)static
null vector
static const RVector RVector::zAxis = RVector(0, 0, 1, true)static
Z axis vector (default extrusion direction).