LibreOffice Module basegfx (master) 1
|
#include <b3dhommatrix.hxx>
Public Types | |
typedef o3tl::cow_wrapper< Impl3DHomMatrix, o3tl::ThreadSafeRefCountingPolicy > | ImplType |
Public Member Functions | |
B3DHomMatrix () | |
B3DHomMatrix (const B3DHomMatrix &rMat) | |
B3DHomMatrix (B3DHomMatrix &&rMat) | |
~B3DHomMatrix () | |
double | get (sal_uInt16 nRow, sal_uInt16 nColumn) const |
void | set (sal_uInt16 nRow, sal_uInt16 nColumn, double fValue) |
bool | isLastLineDefault () const |
bool | isIdentity () const |
void | identity () |
Reset to the identity matrix. More... | |
void | invert () |
Invert the matrix (if possible) More... | |
double | determinant () const |
Calc the matrix determinant. More... | |
void | rotate (double fAngleX, double fAngleY, double fAngleZ) |
Rotation. More... | |
void | rotate (const B3DTuple &rRotation) |
void | translate (double fX, double fY, double fZ) |
Translation. More... | |
void | translate (const B3DTuple &rTranslation) |
void | scale (double fX, double fY, double fZ) |
Scaling. More... | |
void | scale (const B3DTuple &rScale) |
void | shearXY (double fSx, double fSy) |
void | shearXZ (double fSx, double fSz) |
void | frustum (double fLeft=-1.0, double fRight=1.0, double fBottom=-1.0, double fTop=1.0, double fNear=0.001, double fFar=1.0) |
void | ortho (double fLeft=-1.0, double fRight=1.0, double fBottom=-1.0, double fTop=1.0, double fNear=0.0, double fFar=1.0) |
void | orientation (const B3DPoint &rVRP=B3DPoint(0.0, 0.0, 1.0), B3DVector aVPN=B3DVector(0.0, 0.0, 1.0), B3DVector aVUV=B3DVector(0.0, 1.0, 0.0)) |
B3DHomMatrix & | operator+= (const B3DHomMatrix &rMat) |
B3DHomMatrix & | operator-= (const B3DHomMatrix &rMat) |
bool | operator== (const B3DHomMatrix &rMat) const |
bool | operator!= (const B3DHomMatrix &rMat) const |
B3DHomMatrix & | operator*= (double fValue) |
B3DHomMatrix & | operator/= (double fValue) |
B3DHomMatrix & | operator*= (const B3DHomMatrix &rMat) |
B3DHomMatrix & | operator= (const B3DHomMatrix &rMat) |
B3DHomMatrix & | operator= (B3DHomMatrix &&rMat) |
void | decompose (B3DTuple &rScale, B3DTuple &rTranslate, B3DTuple &rRotate, B3DTuple &rShear) const |
Private Attributes | |
ImplType | mpImpl |
Definition at line 33 of file b3dhommatrix.hxx.
typedef o3tl::cow_wrapper< Impl3DHomMatrix, o3tl::ThreadSafeRefCountingPolicy > basegfx::B3DHomMatrix::ImplType |
Definition at line 36 of file b3dhommatrix.hxx.
|
default |
|
default |
|
default |
|
default |
References get(), operator!=(), operator*=(), operator+=(), operator-=(), operator==(), rotate(), scale, and set().
void basegfx::B3DHomMatrix::decompose | ( | B3DTuple & | rScale, |
B3DTuple & | rTranslate, | ||
B3DTuple & | rRotate, | ||
B3DTuple & | rShear | ||
) | const |
Definition at line 383 of file b3dhommatrix.cxx.
References basegfx::B3DTuple::correctValues(), determinant(), basegfx::fTools::equalZero(), o3tl::cow_wrapper< typename T, class MTPolicy >::get(), basegfx::B3DVector::getLength(), basegfx::B3DVector::getPerpendicular(), basegfx::Tuple3D< TYPE >::getX(), basegfx::Tuple3D< TYPE >::getY(), basegfx::Tuple3D< TYPE >::getZ(), mpImpl, basegfx::B3DVector::normalize(), basegfx::B3DVector::scalar(), basegfx::Tuple3D< TYPE >::setX(), basegfx::Tuple3D< TYPE >::setY(), and basegfx::Tuple3D< TYPE >::setZ().
double basegfx::B3DHomMatrix::determinant | ( | ) | const |
Calc the matrix determinant.
Definition at line 81 of file b3dhommatrix.cxx.
References mpImpl.
Referenced by decompose().
void basegfx::B3DHomMatrix::frustum | ( | double | fLeft = -1.0 , |
double | fRight = 1.0 , |
||
double | fBottom = -1.0 , |
||
double | fTop = 1.0 , |
||
double | fNear = 0.001 , |
||
double | fFar = 1.0 |
||
) |
Definition at line 270 of file b3dhommatrix.cxx.
References basegfx::fTools::equal(), basegfx::fTools::more(), mpImpl, and basegfx::internal::ImplHomMatrixTemplate< RowSize >::set().
double basegfx::B3DHomMatrix::get | ( | sal_uInt16 | nRow, |
sal_uInt16 | nColumn | ||
) | const |
Definition at line 44 of file b3dhommatrix.cxx.
References o3tl::cow_wrapper< typename T, class MTPolicy >::get(), and mpImpl.
Referenced by basegfx::utils::B3DHomMatrixToUnoHomogenMatrix(), basegfx::BColorModifier_saturate::getModifiedColor(), and basegfx::BColorModifier_hueRotate::getModifiedColor().
void basegfx::B3DHomMatrix::identity | ( | ) |
void basegfx::B3DHomMatrix::invert | ( | ) |
Invert the matrix (if possible)
Definition at line 69 of file b3dhommatrix.cxx.
References basegfx::internal::ImplHomMatrixTemplate< RowSize >::get(), basegfx::internal::ImplHomMatrixTemplate< RowSize >::getEdgeLength(), basegfx::internal::ImplHomMatrixTemplate< RowSize >::ludcmp(), and mpImpl.
bool basegfx::B3DHomMatrix::isIdentity | ( | ) | const |
Definition at line 59 of file b3dhommatrix.cxx.
References mpImpl.
Referenced by basegfx::utils::createB2DPolygonFromB3DPolygon(), operator*=(), basegfx::B3DPolygon::transform(), basegfx::B3DRange::transform(), basegfx::B3DPolyPolygon::transform(), basegfx::B3DPolygon::transformNormals(), and basegfx::B3DPolyPolygon::transformNormals().
bool basegfx::B3DHomMatrix::isLastLineDefault | ( | ) | const |
Definition at line 54 of file b3dhommatrix.cxx.
References mpImpl.
bool basegfx::B3DHomMatrix::operator!= | ( | const B3DHomMatrix & | rMat | ) | const |
Definition at line 145 of file b3dhommatrix.cxx.
B3DHomMatrix & basegfx::B3DHomMatrix::operator*= | ( | const B3DHomMatrix & | rMat | ) |
Definition at line 118 of file b3dhommatrix.cxx.
References isIdentity(), and mpImpl.
B3DHomMatrix & basegfx::B3DHomMatrix::operator*= | ( | double | fValue | ) |
Definition at line 98 of file b3dhommatrix.cxx.
References basegfx::fTools::equal(), and mpImpl.
B3DHomMatrix & basegfx::B3DHomMatrix::operator+= | ( | const B3DHomMatrix & | rMat | ) |
Definition at line 86 of file b3dhommatrix.cxx.
References mpImpl.
B3DHomMatrix & basegfx::B3DHomMatrix::operator-= | ( | const B3DHomMatrix & | rMat | ) |
Definition at line 92 of file b3dhommatrix.cxx.
References mpImpl.
B3DHomMatrix & basegfx::B3DHomMatrix::operator/= | ( | double | fValue | ) |
Definition at line 108 of file b3dhommatrix.cxx.
References basegfx::fTools::equal(), and mpImpl.
|
default |
References decompose().
|
default |
bool basegfx::B3DHomMatrix::operator== | ( | const B3DHomMatrix & | rMat | ) | const |
Definition at line 137 of file b3dhommatrix.cxx.
References mpImpl, and o3tl::cow_wrapper< typename T, class MTPolicy >::same_object().
void basegfx::B3DHomMatrix::orientation | ( | const B3DPoint & | rVRP = B3DPoint(0.0,0.0,1.0) , |
B3DVector | aVPN = B3DVector(0.0,0.0,1.0) , |
||
B3DVector | aVUV = B3DVector(0.0,1.0,0.0) |
||
) |
Definition at line 347 of file b3dhommatrix.cxx.
References basegfx::B3DVector::getPerpendicular(), basegfx::Tuple3D< TYPE >::getX(), basegfx::Tuple3D< TYPE >::getY(), basegfx::Tuple3D< TYPE >::getZ(), mpImpl, basegfx::B3DVector::normalize(), and basegfx::internal::ImplHomMatrixTemplate< RowSize >::set().
void basegfx::B3DHomMatrix::ortho | ( | double | fLeft = -1.0 , |
double | fRight = 1.0 , |
||
double | fBottom = -1.0 , |
||
double | fTop = 1.0 , |
||
double | fNear = 0.0 , |
||
double | fFar = 1.0 |
||
) |
Definition at line 316 of file b3dhommatrix.cxx.
References basegfx::fTools::equal(), mpImpl, and basegfx::internal::ImplHomMatrixTemplate< RowSize >::set().
void basegfx::B3DHomMatrix::rotate | ( | const B3DTuple & | rRotation | ) |
Definition at line 198 of file b3dhommatrix.cxx.
References basegfx::Tuple3D< TYPE >::getX(), basegfx::Tuple3D< TYPE >::getY(), basegfx::Tuple3D< TYPE >::getZ(), and rotate().
void basegfx::B3DHomMatrix::rotate | ( | double | fAngleX, |
double | fAngleY, | ||
double | fAngleZ | ||
) |
Rotation.
Definition at line 150 of file b3dhommatrix.cxx.
References basegfx::fTools::equalZero(), mpImpl, and basegfx::internal::ImplHomMatrixTemplate< RowSize >::set().
Referenced by rotate().
void basegfx::B3DHomMatrix::scale | ( | const B3DTuple & | rScale | ) |
Definition at line 238 of file b3dhommatrix.cxx.
References basegfx::Tuple3D< TYPE >::getX(), basegfx::Tuple3D< TYPE >::getY(), basegfx::Tuple3D< TYPE >::getZ(), and scale().
void basegfx::B3DHomMatrix::scale | ( | double | fX, |
double | fY, | ||
double | fZ | ||
) |
Scaling.
Definition at line 222 of file b3dhommatrix.cxx.
References basegfx::fTools::equal(), mpImpl, and basegfx::internal::ImplHomMatrixTemplate< RowSize >::set().
Referenced by basegfx::utils::createCubeFillPolyPolygonFromB3DRange(), basegfx::utils::createCubePolyPolygonFromB3DRange(), basegfx::utils::createSphereFillPolyPolygonFromB3DRange(), basegfx::utils::createSpherePolyPolygonFromB3DRange(), and scale().
void basegfx::B3DHomMatrix::set | ( | sal_uInt16 | nRow, |
sal_uInt16 | nColumn, | ||
double | fValue | ||
) |
Definition at line 49 of file b3dhommatrix.cxx.
References mpImpl.
Referenced by basegfx::BColorModifier_hueRotate::BColorModifier_hueRotate(), basegfx::BColorModifier_saturate::BColorModifier_saturate(), basegfx::BColorModifier_saturate::getModifiedColor(), basegfx::BColorModifier_hueRotate::getModifiedColor(), basegfx::unotools::homMatrixFromAffineMatrix3D(), and basegfx::utils::UnoHomogenMatrixToB3DHomMatrix().
void basegfx::B3DHomMatrix::shearXY | ( | double | fSx, |
double | fSy | ||
) |
Definition at line 243 of file b3dhommatrix.cxx.
References basegfx::fTools::equalZero(), mpImpl, and basegfx::internal::ImplHomMatrixTemplate< RowSize >::set().
void basegfx::B3DHomMatrix::shearXZ | ( | double | fSx, |
double | fSz | ||
) |
Definition at line 257 of file b3dhommatrix.cxx.
References basegfx::fTools::equalZero(), mpImpl, and basegfx::internal::ImplHomMatrixTemplate< RowSize >::set().
void basegfx::B3DHomMatrix::translate | ( | const B3DTuple & | rTranslation | ) |
Definition at line 217 of file b3dhommatrix.cxx.
References basegfx::Tuple3D< TYPE >::getX(), basegfx::Tuple3D< TYPE >::getY(), basegfx::Tuple3D< TYPE >::getZ(), and translate().
void basegfx::B3DHomMatrix::translate | ( | double | fX, |
double | fY, | ||
double | fZ | ||
) |
Translation.
Definition at line 203 of file b3dhommatrix.cxx.
References basegfx::fTools::equalZero(), mpImpl, and basegfx::internal::ImplHomMatrixTemplate< RowSize >::set().
Referenced by basegfx::utils::createCubeFillPolyPolygonFromB3DRange(), basegfx::utils::createCubePolyPolygonFromB3DRange(), basegfx::utils::createSphereFillPolyPolygonFromB3DRange(), basegfx::utils::createSpherePolyPolygonFromB3DRange(), and translate().
|
private |
Definition at line 39 of file b3dhommatrix.hxx.
Referenced by decompose(), determinant(), frustum(), get(), identity(), invert(), isIdentity(), isLastLineDefault(), operator*=(), operator+=(), operator-=(), operator/=(), operator==(), orientation(), ortho(), rotate(), scale(), set(), shearXY(), shearXZ(), and translate().