#include <b3dvector.hxx>


Public Member Functions | |
| B3DVector () | |
| Create a 3D Vector. | |
| B3DVector (double fX, double fY, double fZ) | |
| Create a 3D Vector. | |
| B3DVector (const B3DVector &rVec) | |
| Create a copy of a 3D Vector. | |
| B3DVector (const ::basegfx::B3DTuple &rTuple) | |
| constructor with tuple to allow copy-constructing from B3DTuple-based classes | |
| ~B3DVector () | |
| B3DVector & | operator*= (const B3DVector &rPnt) |
| *=operator to allow usage from B3DVector, too | |
| B3DVector & | operator*= (double t) |
| *=operator to allow usage from B3DVector, too | |
| B3DVector & | operator= (const ::basegfx::B3DTuple &rVec) |
| assignment operator to allow assigning the results of B3DTuple calculations | |
| double | getLength (void) const |
| Calculate the length of this 3D Vector. | |
| double | getXYLength (void) const |
| Calculate the length in the XY-Plane for this 3D Vector. | |
| double | getXZLength (void) const |
| Calculate the length in the XZ-Plane for this 3D Vector. | |
| double | getYZLength (void) const |
| Calculate the length in the YZ-Plane for this 3D Vector. | |
| B3DVector & | setLength (double fLen) |
| Set the length of this 3D Vector. | |
| B3DVector & | normalize () |
| Normalize this 3D Vector. | |
| bool | isNormalized () const |
| Test if this 3D Vector is normalized. | |
| B3DVector | getPerpendicular (const B3DVector &rNormalizedVec) const |
| get a 3D Vector which is perpendicular to this and a given 3D Vector | |
| B3DVector | getProjectionOnPlane (const B3DVector &rNormalizedPlane) const |
| get the projection of this Vector on the given Plane | |
| double | scalar (const B3DVector &rVec) const |
| Calculate the Scalar product. | |
| B3DVector & | operator*= (const B3DHomMatrix &rMat) |
| Transform vector by given transformation matrix. | |
Static Public Member Functions | |
| static const B3DVector & | getEmptyVector () |
This class derives all operators and common handling for a 3D data class from B3DTuple. All necessary extensions which are special for 3D Vectors are added here.
Definition at line 48 of file b3dvector.hxx.
| basegfx::B3DVector::B3DVector | ( | ) | [inline] |
Create a 3D Vector.
The vector is initialized to (0.0, 0.0, 0.0)
Definition at line 55 of file b3dvector.hxx.
| basegfx::B3DVector::B3DVector | ( | double | fX, | |
| double | fY, | |||
| double | fZ | |||
| ) | [inline] |
Create a 3D Vector.
| fX | This parameter is used to initialize the X-coordinate of the 3D Vector. | |
| fY | This parameter is used to initialize the Y-coordinate of the 3D Vector. | |
| fZ | This parameter is used to initialize the Z-coordinate of the 3D Vector. |
Definition at line 73 of file b3dvector.hxx.
| basegfx::B3DVector::B3DVector | ( | const B3DVector & | rVec | ) | [inline] |
Create a copy of a 3D Vector.
| rVec | The 3D Vector which will be copied. |
Definition at line 82 of file b3dvector.hxx.
| basegfx::B3DVector::B3DVector | ( | const ::basegfx::B3DTuple & | rTuple | ) | [inline] |
constructor with tuple to allow copy-constructing from B3DTuple-based classes
Definition at line 89 of file b3dvector.hxx.
| basegfx::B3DVector::~B3DVector | ( | ) | [inline] |
Definition at line 93 of file b3dvector.hxx.
*=operator to allow usage from B3DVector, too
Definition at line 98 of file b3dvector.hxx.
References basegfx::B3DTuple::mfX, basegfx::B3DTuple::mfY, and basegfx::B3DTuple::mfZ.
| B3DVector& basegfx::B3DVector::operator*= | ( | double | t | ) | [inline] |
*=operator to allow usage from B3DVector, too
Reimplemented from basegfx::B3DTuple.
Definition at line 108 of file b3dvector.hxx.
References basegfx::B3DTuple::mfX, basegfx::B3DTuple::mfY, and basegfx::B3DTuple::mfZ.
| B3DVector& basegfx::B3DVector::operator= | ( | const ::basegfx::B3DTuple & | rVec | ) | [inline] |
assignment operator to allow assigning the results of B3DTuple calculations
Definition at line 119 of file b3dvector.hxx.
References basegfx::B3DTuple::mfX, basegfx::B3DTuple::mfY, and basegfx::B3DTuple::mfZ.
| double basegfx::B3DVector::getLength | ( | void | ) | const [inline] |
Calculate the length of this 3D Vector.
Definition at line 131 of file b3dvector.hxx.
References scalar().
| double basegfx::B3DVector::getXYLength | ( | void | ) | const [inline] |
Calculate the length in the XY-Plane for this 3D Vector.
Definition at line 143 of file b3dvector.hxx.
References basegfx::B3DTuple::mfX, and basegfx::B3DTuple::mfY.
Referenced by basegfx::tools::clipPolygonOnPlane(), and basegfx::tools::clipPolyPolygonOnPlane().
| double basegfx::B3DVector::getXZLength | ( | void | ) | const [inline] |
Calculate the length in the XZ-Plane for this 3D Vector.
Definition at line 155 of file b3dvector.hxx.
References basegfx::B3DTuple::mfX, and basegfx::B3DTuple::mfZ.
| double basegfx::B3DVector::getYZLength | ( | void | ) | const [inline] |
Calculate the length in the YZ-Plane for this 3D Vector.
Definition at line 167 of file b3dvector.hxx.
References basegfx::B3DTuple::mfY, and basegfx::B3DTuple::mfZ.
| B3DVector& basegfx::B3DVector::setLength | ( | double | fLen | ) | [inline] |
Set the length of this 3D Vector.
| fLen | The to be achieved length of the 3D Vector |
Definition at line 180 of file b3dvector.hxx.
References basegfx::fTools::equal(), basegfx::fTools::equalZero(), basegfx::B3DTuple::mfX, basegfx::B3DTuple::mfY, basegfx::B3DTuple::mfZ, and scalar().
| B3DVector & basegfx::B3DVector::normalize | ( | ) |
Normalize this 3D Vector.
The length of the 3D Vector is set to 1.0
Definition at line 37 of file b3dvector.cxx.
References basegfx::fTools::equal(), basegfx::fTools::equalZero(), basegfx::B3DTuple::mfX, basegfx::B3DTuple::mfY, basegfx::B3DTuple::mfZ, and scalar().
Referenced by getPerpendicular(), and basegfx::B3DHomMatrix::orientation().
| bool basegfx::B3DVector::isNormalized | ( | ) | const [inline] |
Test if this 3D Vector is normalized.
Definition at line 213 of file b3dvector.hxx.
References basegfx::fTools::equal(), and scalar().
get a 3D Vector which is perpendicular to this and a given 3D Vector
| rNormalizedVec | A normalized 3D Vector. |
Definition at line 61 of file b3dvector.cxx.
References basegfx::cross(), and normalize().
Referenced by basegfx::B3DHomMatrix::orientation().
get the projection of this Vector on the given Plane
| rNormalizedPlane | A normalized 3D Vector defining a Plane. |
Definition at line 69 of file b3dvector.cxx.
References basegfx::cross(), basegfx::B3DTuple::mfX, basegfx::B3DTuple::mfY, and basegfx::B3DTuple::mfZ.
| double basegfx::B3DVector::scalar | ( | const B3DVector & | rVec | ) | const [inline] |
Calculate the Scalar product.
This method calculates the Scalar product between this and the given 3D Vector.
| rVec | A second 3D Vector. |
Definition at line 258 of file b3dvector.hxx.
References basegfx::B3DTuple::mfX, basegfx::B3DTuple::mfY, and basegfx::B3DTuple::mfZ.
Referenced by basegfx::tools::getCutBetweenLineAndPlane(), getLength(), basegfx::tools::isInEpsilonRange(), isNormalized(), normalize(), and setLength().
| B3DVector& basegfx::B3DVector::operator*= | ( | const B3DHomMatrix & | rMat | ) |
Transform vector by given transformation matrix.
Since this is a vector, translational components of the matrix are disregarded.
| static const B3DVector& basegfx::B3DVector::getEmptyVector | ( | ) | [inline, static] |
Definition at line 270 of file b3dvector.hxx.
References basegfx::B3DTuple::getEmptyTuple().
Referenced by ImplB3DPolygon::insert(), and NormalsArray3D::setNormal().
1.5.6