51 mpImpl->set(nRow, nColumn, fValue);
56 return mpImpl->isLastLineDefault();
61 return mpImpl->isIdentity();
75 if(aWork.
ludcmp(pIndex.get(), nParity))
83 return mpImpl->doDeterminant();
100 const double fOne(1.0);
103 mpImpl->doMulMatrix(fValue);
110 const double fOne(1.0);
113 mpImpl->doMulMatrix(1.0 / fValue);
147 return !(*
this == rMat);
158 double fSin(sin(fAngleX));
159 double fCos(cos(fAngleX));
161 aRotMatX.
set(1, 1, fCos);
162 aRotMatX.
set(2, 2, fCos);
163 aRotMatX.
set(2, 1, fSin);
164 aRotMatX.
set(1, 2, -fSin);
166 mpImpl->doMulMatrix(aRotMatX);
172 double fSin(sin(fAngleY));
173 double fCos(cos(fAngleY));
175 aRotMatY.
set(0, 0, fCos);
176 aRotMatY.
set(2, 2, fCos);
177 aRotMatY.
set(0, 2, fSin);
178 aRotMatY.
set(2, 0, -fSin);
180 mpImpl->doMulMatrix(aRotMatY);
187 double fSin(sin(fAngleZ));
188 double fCos(cos(fAngleZ));
190 aRotMatZ.
set(0, 0, fCos);
191 aRotMatZ.
set(1, 1, fCos);
192 aRotMatZ.
set(1, 0, fSin);
193 aRotMatZ.
set(0, 1, -fSin);
195 mpImpl->doMulMatrix(aRotMatZ);
209 aTransMat.
set(0, 3, fX);
210 aTransMat.
set(1, 3, fY);
211 aTransMat.
set(2, 3, fZ);
213 mpImpl->doMulMatrix(aTransMat);
224 const double fOne(1.0);
230 aScaleMat.
set(0, 0, fX);
231 aScaleMat.
set(1, 1, fY);
232 aScaleMat.
set(2, 2, fZ);
234 mpImpl->doMulMatrix(aScaleMat);
250 aShearXYMat.
set(0, 2, fSx);
251 aShearXYMat.
set(1, 2, fSy);
253 mpImpl->doMulMatrix(aShearXYMat);
264 aShearXZMat.
set(0, 1, fSx);
265 aShearXZMat.
set(2, 1, fSz);
267 mpImpl->doMulMatrix(aShearXZMat);
272 const double fZero(0.0);
273 const double fOne(1.0);
304 aFrustumMat.
set(0, 0, 2.0 * fNear / (fRight - fLeft));
305 aFrustumMat.
set(1, 1, 2.0 * fNear / (fTop - fBottom));
306 aFrustumMat.
set(0, 2, (fRight + fLeft) / (fRight - fLeft));
307 aFrustumMat.
set(1, 2, (fTop + fBottom) / (fTop - fBottom));
308 aFrustumMat.
set(2, 2, -fOne * ((fFar + fNear) / (fFar - fNear)));
309 aFrustumMat.
set(3, 2, -fOne);
310 aFrustumMat.
set(2, 3, -fOne * ((2.0 * fFar * fNear) / (fFar - fNear)));
311 aFrustumMat.
set(3, 3, fZero);
313 mpImpl->doMulMatrix(aFrustumMat);
316 void B3DHomMatrix::ortho(
double fLeft,
double fRight,
double fBottom,
double fTop,
double fNear,
double fFar)
337 aOrthoMat.
set(0, 0, 2.0 / (fRight - fLeft));
338 aOrthoMat.
set(1, 1, 2.0 / (fTop - fBottom));
339 aOrthoMat.
set(2, 2, -1.0 * (2.0 / (fFar - fNear)));
340 aOrthoMat.
set(0, 3, -1.0 * ((fRight + fLeft) / (fRight - fLeft)));
341 aOrthoMat.
set(1, 3, -1.0 * ((fTop + fBottom) / (fTop - fBottom)));
342 aOrthoMat.
set(2, 3, -1.0 * ((fFar + fNear) / (fFar - fNear)));
344 mpImpl->doMulMatrix(aOrthoMat);
352 aOrientationMat.
set(0, 3, -rVRP.
getX());
353 aOrientationMat.
set(1, 3, -rVRP.
getY());
354 aOrientationMat.
set(2, 3, -rVRP.
getZ());
370 aOrientationMat.
set(0, 0, aRx.
getX());
371 aOrientationMat.
set(0, 1, aRx.
getY());
372 aOrientationMat.
set(0, 2, aRx.
getZ());
373 aOrientationMat.
set(1, 0, aRy.
getX());
374 aOrientationMat.
set(1, 1, aRy.
getY());
375 aOrientationMat.
set(1, 2, aRy.
getZ());
376 aOrientationMat.
set(2, 0, aVPN.
getX());
377 aOrientationMat.
set(2, 1, aVPN.
getY());
378 aOrientationMat.
set(2, 2, aVPN.
getZ());
380 mpImpl->doMulMatrix(aOrientationMat);
386 if(!
mpImpl->isLastLineDefault())
430 const double fShearX(rShear.
getX());
471 const double fShearY(rShear.
getY());
479 const double fShearZ(rShear.
getZ());
507 if( ::basegfx::fTools::equal( aCol0.
getZ(), 1.0 )
508 || aCol0.
getZ() > 1.0 )
513 else if( ::basegfx::fTools::equal( aCol0.
getZ(), -1.0 )
514 || aCol0.
getZ() < -1.0 )
521 fy = asin( -aCol0.
getZ() );
528 if( aCol0.
getZ() > 0.0 )
void identity()
Reset to the identity matrix.
B3DHomMatrix & operator=(const B3DHomMatrix &rMat)
double determinant() const
Calc the matrix determinant.
void set(sal_uInt16 nRow, sal_uInt16 nColumn, double fValue)
bool operator==(const B3DHomMatrix &rMat) const
void decompose(B3DTuple &rScale, B3DTuple &rTranslate, B3DTuple &rRotate, B3DTuple &rShear) const
B3DHomMatrix & operator-=(const B3DHomMatrix &rMat)
double get(sal_uInt16 nRow, sal_uInt16 nColumn) const
bool isLastLineDefault() const
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)
bool operator!=(const B3DHomMatrix &rMat) const
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)
B3DHomMatrix & operator*=(double fValue)
void shearXY(double fSx, double fSy)
void rotate(double fAngleX, double fAngleY, double fAngleZ)
Rotation.
B3DHomMatrix & operator/=(double fValue)
void translate(double fX, double fY, double fZ)
Translation.
void scale(double fX, double fY, double fZ)
Scaling.
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 shearXZ(double fSx, double fSz)
void invert()
Invert the matrix (if possible)
Base Point class with three double values.
Base class for all Points/Vectors with three double values.
void correctValues(const double fCompareValue=0.0)
Base Point class with three double values.
double getLength() const
Calculate the length of this 3D Vector.
B3DVector getPerpendicular(const B3DVector &rNormalizedVec) const
get a 3D Vector which is perpendicular to this and a given 3D Vector
B3DVector & normalize()
Normalize this 3D Vector.
double scalar(const B3DVector &rVec) const
Calculate the Scalar product.
void setX(TYPE fX)
Set X-Coordinate of 3D Tuple.
TYPE getX() const
Get X-Coordinate of 3D Tuple.
TYPE getZ() const
Get Z-Coordinate of 3D Tuple.
TYPE getY() const
Get Y-Coordinate of 3D Tuple.
void setY(TYPE fY)
Set Y-Coordinate of 3D Tuple.
void setZ(TYPE fZ)
Set Z-Coordinate of 3D Tuple.
double get(sal_uInt16 nRow, sal_uInt16 nColumn) const
static sal_uInt16 getEdgeLength()
void set(sal_uInt16 nRow, sal_uInt16 nColumn, const double &rValue)
bool ludcmp(sal_uInt16 nIndex[], sal_Int16 &nParity)
bool same_object(const cow_wrapper &rOther) const
::basegfx::internal::ImplHomMatrixTemplate< 4 > Impl3DHomMatrix_Base