CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
GeMatrix3d.h
Go to the documentation of this file.
1
2// Copyright (C) 2002-2022, Open Design Alliance (the "Alliance").
3// All rights reserved.
4//
5// This software and its documentation and related materials are owned by
6// the Alliance. The software may only be incorporated into application
7// programs owned by members of the Alliance, subject to a signed
8// Membership Agreement and Supplemental Software License Agreement with the
9// Alliance. The structure and organization of this software are the valuable
10// trade secrets of the Alliance and its suppliers. The software is also
11// protected by copyright law and international treaty provisions. Application
12// programs incorporating this software must include the following statement
13// with their copyright notices:
14//
15// This application incorporates Open Design Alliance software pursuant to a license
16// agreement with Open Design Alliance.
17// Open Design Alliance Copyright (C) 2002-2022 by Open Design Alliance.
18// All rights reserved.
19//
20// By use of this software, its documentation or related materials, you
21// acknowledge and accept the above terms.
23
24
25#ifndef OD_GE_MATRIX_3D_H
26#define OD_GE_MATRIX_3D_H
28#include "Ge/GeGbl.h"
29#include "Ge/GeMatrix2d.h"
30#include "Ge/GePoint3d.h"
31
32class OdGeLine3d;
33class OdGeVector3d;
34class OdGePlane;
35class OdGeTol;
36class OdGeScale3d;
37
38#include "TD_PackPush.h"
39
79{
80public:
81
90
91 //OdGeMatrix3d(const OdGeMatrix3d& src);
92 //OdGeMatrix3d& operator =(const OdGeMatrix3d& src);
93
97 GE_STATIC_EXPORT static const OdGeMatrix3d kIdentity; // Multiplicative identity matrix.
98
99 // Reset matrix.
100 //
101
109
119 const OdGeTol& tol = OdGeContext::gTol);
120
121 // Multiplication.
122 //
123
133 const OdGeMatrix3d& matrix) const;
134
144 OdGeMatrix3d& operator *=(
145 const OdGeMatrix3d& matrix);
146
156 const OdGeMatrix3d& leftSide);
157
167 const OdGeMatrix3d& rightSide);
168
179 const OdGeMatrix3d& matrix1,
180 const OdGeMatrix3d& matrix2);
181
182 // Multiplicative inverse.
183 //
184
195
216 const OdGeTol& tol) const;
217
230 OdGeMatrix3d& inverseMatrix,
231 double tol) const;
232
244 const OdGeTol& tol = OdGeContext::gTol) const;
245
252
259
268 const OdGeMatrix3d& matrix) const;
269
278 const OdGeMatrix3d& matrix) const;
279
291 const OdGeMatrix3d& matrix,
292 const OdGeTol& tol = OdGeContext::gTol) const;
293
305 const OdGeTol& tol = OdGeContext::gTol) const;
306
317 const OdGeTol& tol = OdGeContext::gTol) const;
318
332 const OdGeTol& tol = OdGeContext::gTol) const;
333
339 double det() const;
340
349 const OdGeVector3d& vect);
350
364 const OdGePoint3d& origin,
365 const OdGeVector3d& xAxis,
366 const OdGeVector3d& yAxis,
367 const OdGeVector3d& zAxis);
368
379 OdGePoint3d& origin,
380 OdGeVector3d& xAxis,
381 OdGeVector3d& yAxis,
382 OdGeVector3d& zAxis) const;
383
391
399
407
415
425 const OdGeVector3d& vect);
426
438 double angle,
439 const OdGeVector3d& axis,
440 const OdGePoint3d& center = OdGePoint3d::kOrigin);
441
452 double scale,
453 const OdGePoint3d& center = OdGePoint3d::kOrigin);
454
465 const OdGeScale3d& scale,
466 const OdGePoint3d& center = OdGePoint3d::kOrigin);
467
477 const OdGePlane& mirrorPlane);
478
488 const OdGePoint3d& mirrorPoint);
489
499 const OdGeLine3d& mirrorLine);
500
512 const OdGePlane& projectionPlane,
513 const OdGeVector3d& projectDir);
514
533 const OdGePoint3d& fromOrigin,
534 const OdGeVector3d& fromXAxis,
535 const OdGeVector3d& fromYAxis,
536 const OdGeVector3d& fromZAxis,
537 const OdGePoint3d& toOrigin,
538 const OdGeVector3d& toXAxis,
539 const OdGeVector3d& toYAxis,
540 const OdGeVector3d& toZAxis);
541
542
555 const OdGeVector3d& normal);
556
566 const OdGePlane& plane);
567
580 const OdGeVector3d& normal);
581
591 const OdGePlane& plane);
592
601 const OdGeVector3d& vect);
602
609
621 double angle,
622 const OdGeVector3d& axis,
623 const OdGePoint3d& center = OdGePoint3d::kOrigin);
624
635 double scale,
636 const OdGePoint3d& center = OdGePoint3d::kOrigin);
637
648 const OdGeScale3d& scale,
649 const OdGePoint3d& center = OdGePoint3d::kOrigin);
650
659 const OdGePlane& mirrorPlane);
660
669 const OdGePoint3d& mirrorPoint);
670
679 const OdGeLine3d& mirrorLine);
680
691 const OdGePlane& projectionPlane,
692 const OdGeVector3d& projectDir);
693
711 const OdGePoint3d& fromOrigin,
712 const OdGeVector3d& fromXAxis,
713 const OdGeVector3d& fromYAxis,
714 const OdGeVector3d& fromZAxis,
715 const OdGePoint3d& toOrigin,
716 const OdGeVector3d& toXAxis,
717 const OdGeVector3d& toYAxis,
718 const OdGeVector3d& toZAxis);
719
731 const OdGeVector3d& normal);
732
741 const OdGePlane& plane);
742
754 const OdGeVector3d& normal);
755
764 const OdGePlane& plane);
765
775 double scale() const;
776
782 double norm() const;
783
799 OdGeVector3d& normal,
800 double& elevation) const;
801
802 // For convenient access to the data.
803 //
804
812 const double* operator [](
813 int row) const;
814
822 double* operator [](
823 int row);
824
833 double operator ()(
834 int row,
835 int column) const;
836
845 double& operator ()(
846 int row,
847 int column);
848
852 double entry[4][4];
853 //DOM-IGNORE-END
854};
855
856// these operations really decrease rendering performance in non-inline case
857
865inline const double* OdGeMatrix3d::operator [](int row) const
866{
867 return entry[row];
868}
869
877inline double* OdGeMatrix3d::operator [](int row)
878{
879 return entry[row];
880}
881
890inline double OdGeMatrix3d::operator ()(int row, int column) const
891{
892 return entry[row][column];
893}
894
903inline double& OdGeMatrix3d::operator ()(int row, int column)
904{
905 return entry[row][column];
906}
907
908#include "TD_PackPop.h"
909
910#endif // OD_GE_MATRIX_3D_H
AECBASE_API OdGePoint3d operator*(const AECECS &matrix, const OdGePoint3d &point)
tol
Definition: DimVarDefs.h:2287
scale
Definition: DimVarDefs.h:1684
#define GE_TOOLKIT_EXPORT
Definition: GeExport.h:49
#define GE_STATIC_EXPORT
Definition: GeExport.h:52
bool operator!=(T left, const OdGiVariant::EnumType right)
Definition: GiVariant.h:403
bool operator==(T left, const OdGiVariant::EnumType right)
Definition: GiVariant.h:397
double norm() const
OdGeMatrix3d & setToRotation(double angle, const OdGeVector3d &axis, const OdGePoint3d &center=OdGePoint3d::kOrigin)
OdGeMatrix2d convertToLocal(OdGeVector3d &normal, double &elevation) const
static OdGeMatrix3d mirroring(const OdGePoint3d &mirrorPoint)
OdGeMatrix3d & setToMirroring(const OdGePlane &mirrorPlane)
OdGeMatrix3d & setToIdentity()
OdGeMatrix3d & setToWorldToPlane(const OdGeVector3d &normal)
OdGeMatrix3d inverse(const OdGeTol &tol) const
void getCoordSystem(OdGePoint3d &origin, OdGeVector3d &xAxis, OdGeVector3d &yAxis, OdGeVector3d &zAxis) const
double scale() const
static OdGeMatrix3d scaling(const OdGeScale3d &scale, const OdGePoint3d &center=OdGePoint3d::kOrigin)
bool isPerspective(const OdGeTol &tol=OdGeContext::gTol) const
OdGeMatrix3d & setToScaling(double scale, const OdGePoint3d &center=OdGePoint3d::kOrigin)
OdGePoint3d getCsOrigin() const
const double * operator[](int row) const
Definition: GeMatrix3d.h:865
bool isUniScaledOrtho(const OdGeTol &tol=OdGeContext::gTol) const
OdGeMatrix3d & setToTranslation(const OdGeVector3d &vect)
static OdGeMatrix3d mirroring(const OdGePlane &mirrorPlane)
double operator()(int row, int column) const
Definition: GeMatrix3d.h:890
static OdGeMatrix3d alignCoordSys(const OdGePoint3d &fromOrigin, const OdGeVector3d &fromXAxis, const OdGeVector3d &fromYAxis, const OdGeVector3d &fromZAxis, const OdGePoint3d &toOrigin, const OdGeVector3d &toXAxis, const OdGeVector3d &toYAxis, const OdGeVector3d &toZAxis)
OdGeMatrix3d & setToProjection(const OdGePlane &projectionPlane, const OdGeVector3d &projectDir)
bool isEqualTo(const OdGeMatrix3d &matrix, const OdGeTol &tol=OdGeContext::gTol) const
double det() const
OdGeMatrix3d & setToMirroring(const OdGeLine3d &mirrorLine)
OdGeMatrix3d & setToScaling(const OdGeScale3d &scale, const OdGePoint3d &center=OdGePoint3d::kOrigin)
OdGeMatrix3d transpose() const
OdGeMatrix3d & postMultBy(const OdGeMatrix3d &rightSide)
static OdGeMatrix3d planeToWorld(const OdGeVector3d &normal)
static GE_STATIC_EXPORT const OdGeMatrix3d kIdentity
Definition: GeMatrix3d.h:97
OdGeMatrix3d & setCoordSystem(const OdGePoint3d &origin, const OdGeVector3d &xAxis, const OdGeVector3d &yAxis, const OdGeVector3d &zAxis)
OdGeVector3d getCsYAxis() const
OdGeMatrix3d & setToProduct(const OdGeMatrix3d &matrix1, const OdGeMatrix3d &matrix2)
OdGeMatrix3d & setToMirroring(const OdGePoint3d &mirrorPoint)
OdGeMatrix3d & setToPlaneToWorld(const OdGeVector3d &normal)
static OdGeMatrix3d scaling(double scale, const OdGePoint3d &center=OdGePoint3d::kOrigin)
OdGeVector3d getCsZAxis() const
OdGeMatrix3d & invert()
static OdGeMatrix3d translation(const OdGeVector3d &vect)
static OdGeMatrix3d worldToPlane(const OdGePlane &plane)
bool isSingular(const OdGeTol &tol=OdGeContext::gTol) const
static OdGeMatrix3d worldToPlane(const OdGeVector3d &normal)
void validateZero(const OdGeTol &tol=OdGeContext::gTol)
OdGeMatrix3d inverse() const
OdGeMatrix3d & setTranslation(const OdGeVector3d &vect)
OdGeMatrix3d & transposeIt()
OdGeVector3d translation() const
double entry[4][4]
Definition: GeMatrix3d.h:852
static OdGeMatrix3d rotation(double angle, const OdGeVector3d &axis, const OdGePoint3d &center=OdGePoint3d::kOrigin)
static OdGeMatrix3d mirroring(const OdGeLine3d &mirrorLine)
bool isScaledOrtho(const OdGeTol &tol=OdGeContext::gTol) const
OdGeMatrix3d & setToPlaneToWorld(const OdGePlane &plane)
static OdGeMatrix3d projection(const OdGePlane &projectionPlane, const OdGeVector3d &projectDir)
OdGeMatrix3d & setToWorldToPlane(const OdGePlane &plane)
static OdGeMatrix3d planeToWorld(const OdGePlane &plane)
bool inverse(OdGeMatrix3d &inverseMatrix, double tol) const
OdGeMatrix3d & setToAlignCoordSys(const OdGePoint3d &fromOrigin, const OdGeVector3d &fromXAxis, const OdGeVector3d &fromYAxis, const OdGeVector3d &fromZAxis, const OdGePoint3d &toOrigin, const OdGeVector3d &toXAxis, const OdGeVector3d &toYAxis, const OdGeVector3d &toZAxis)
OdGeMatrix3d & preMultBy(const OdGeMatrix3d &leftSide)
OdGeVector3d getCsXAxis() const
static GE_STATIC_EXPORT const OdGePoint3d kOrigin
Definition: GePoint3d.h:106
Definition: GeTol.h:49
static GE_STATIC_EXPORT OdGeTol gTol
Definition: GeGbl.h:65