|
RVector | axonometricProjection (RS::IsoProjectionType type) |
| Axonometric projection (isometric, dimetric, trimetric). More...
|
|
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. More...
|
|
RVector | flipVertical () |
| Mirrors this vector at the X-axis. More...
|
|
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) const |
| Linear interpolation between this and v by fraction 't'. More...
|
|
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 () |
|
double | getY () |
|
double | getZ () |
|
bool | gteXY (const RVector &v) const |
|
bool | isInside (const RBox &b) const |
|
bool | isInWindow (const RVector &firstCorner, const RVector &secondCorner) |
|
bool | isNaN () const |
|
RVector | isoProject (RS::IsoProjectionType type) |
| Changes this vector into its isometric projection. More...
|
|
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. More...
|
|
RVector | mirror (const RVector &axis1, const RVector &axis2) |
|
RVector | move (const RVector &offset) |
| Moves this vector by the given offset. More...
|
|
RVector | normalize () |
| Normalizes this vector and returns a reference to this vector. More...
|
|
RVector | obliqueProjection (RS::IsoProjectionType type) |
|
bool | operator!= (const RVector &v) const |
|
RVector | operator* (double s) const |
| binary * operator. More...
|
|
void | operator*= (double s) |
| *= operator More...
|
|
RVector | operator+ (const RVector &v) const |
| binary + operator. More...
|
|
void | operator+= (const RVector &v) |
| += operator. More...
|
|
RVector | operator- () const |
| unary - operator. More...
|
|
RVector | operator- (const RVector &v) const |
| binary - operator. More...
|
|
void | operator-= (const RVector &v) |
| -= operator. More...
|
|
RVector | operator/ (double s) const |
| binary / operator. More...
|
|
void | operator/= (double s) |
| /= operator More...
|
|
bool | operator== (const RVector &v) const |
| == operator More...
|
|
RVector | rotate (double rotation) |
| Rotates this vector around 0/0 by the given angle. More...
|
|
RVector | rotate (double rotation, const RVector ¢er) |
| Rotates this vector around the given center by the given angle. More...
|
|
RVector | rotate3D (const QQuaternion &quaternion) |
|
RVector | rotate3D (const RLine &axis, double rotation) |
|
| RVector () |
| Constructor for a valid null vector (0/0/0). More...
|
|
| RVector (const QList< double > &tuples) |
|
| RVector (double vx, double vy, double vz=0.0, bool valid_in=true) |
| Constructor for a point with given valid flag. More...
|
|
RVector | scale (const RVector &factors, const RVector ¢er=nullVector) |
| Scales this vector by the given factors with the given center. More...
|
|
RVector | scale (double factor, const RVector ¢er=nullVector) |
| Scales this vector by the given factor with the given center. More...
|
|
void | set (double vx, double vy, double vz=0.0) |
| Sets new values for the vector and makes the vector valid. More...
|
|
void | setAngle (double a) |
|
void | setMagnitude2D (double m) |
| Sets the vector magnitude without changing the direction. More...
|
|
void | setPolar (double radius, double angle) |
| Sets a new position for the vector in polar coordinates. More...
|
|
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. More...
|
|
RVector | transform (const RMatrix &m) |
| Generic 3d transformation. More...
|
|
RVector | transform2D (const QTransform &t) |
| Transforms this vector with the given transformation matrix. More...
|
|
RVector | transform2DM (const RMatrix &m) |
| Generic 2d transformation. More...
|
|
|
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. More...
|
|
static RVector | getCrossProduct (const RVector &v1, const RVector &v2) |
|
static double | getDotProduct (const RVector &v1, const RVector &v2) |
| Scalarproduct (dot product). More...
|
|
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 > | getUnion (const QList< RVector > &vectorsA, const QList< RVector > &vectorsB, double tol=RS::PointTolerance) |
|
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) |
|
static void | rotateList (QList< RVector > &list, double rotation) |
|
static void | rotateList (QList< RVector > &list, double rotation, const RVector ¢er) |
|
static void | scaleList (QList< RVector > &list, const RVector &factors, const RVector ¢er=nullVector) |
|
static void | scaleList (QList< RVector > &list, double factor, const RVector ¢er=nullVector) |
|
Represents a 3d vector (x/y/z).
- Scriptable:\nThis class is available in script environments.\n
- Copyable:\nObjects are cleaned up automatically by the garbage collector of the script engine.\n
invalid vector
Copyright (c) 2011-2018 by Andrew Mustun.
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.