eVision C++ API 26.10.0-beta.2.dev
Loading...
Searching...
No Matches
eVision::Easy3D::E3DTransformMatrix Class Reference

Represents a 3D transformation [4x4] matrix. More...

#include <eVision/Easy3D/E3DTransformMatrix.h>

Collaboration diagram for eVision::Easy3D::E3DTransformMatrix:

Public Member Functions

 E3DTransformMatrix ()
 Creates an E3DTransformMatrix object.
 E3DTransformMatrix (const eVision::Easy3D::E3DTransformMatrix &other)
 Creates an E3DTransformMatrix object.
 E3DTransformMatrix (double m00, double m10, double m20, double m30, double m01, double m11, double m21, double m31, double m02, double m12, double m22, double m32, double m03, double m13, double m23, double m33)
 Creates an E3DTransformMatrix object.
virtual ~E3DTransformMatrix () throw ()
eVision::Easy3D::E3DTransformMatrix & operator= (const eVision::Easy3D::E3DTransformMatrix &other)
 Assignment operator.
bool operator== (const eVision::Easy3D::E3DTransformMatrix &other) const
 Checks if two E3DTransformMatrix objects are strictly equals (binary level).
bool operator!= (const eVision::Easy3D::E3DTransformMatrix &other) const
 Checks if two E3DTransformMatrix objects are strictly different (binary level).
eVision::Easy3D::E3DTransformMatrix operator* (const eVision::Easy3D::E3DTransformMatrix &matrix) const
 E3DTransformMatrix product.
eVision::Easy3D::E3DPoint operator* (eVision::Easy3D::E3DPoint P) const
 E3DTransformMatrix product.
eVision::Easy3D::E3DTransformMatrix operator+ (const eVision::Easy3D::E3DTransformMatrix &matrix) const
 E3DTransformMatrix sum. Sums the current and the given matrix, returns the result.
eVision::Easy3D::E3DTransformMatrix operator- (const eVision::Easy3D::E3DTransformMatrix &matrix) const
 E3DTransformMatrix difference. Subtract the current and the given matrix, returns the result.
void SetValue (unsigned int column, unsigned int row, float value)
 Sets a value in the E3DTransformMatrix object.
float GetValue (unsigned int column, unsigned int row) const
 Gets a value from the E3DTransformMatrix object.
void GetOrthoBasis (eVision::Easy3D::E3DPoint &e1, eVision::Easy3D::E3DPoint &e2, eVision::Easy3D::E3DPoint &e3, eVision::Easy3D::E3DPoint &t) const
 Gets the orthogonal basis represented by this transformation or throws an exception if it is not a rigid transformation.
eVision::Easy3D::E3DPoint GetEulerAngles () const
 Gets the Euler angles for the rotation represented by this transformation. The returned value is a 3D point with Euler angles around X, Y and Z axis. The E3DTransformMatrix must be rigid (translation and rotation only).
eVision::Easy3D::EAzimuthElevationAngles GetAzimuthElevationAngles () const
 Gets the azimuth and elevation angles for the Z axis of the coordinate system represented by the transformation matrix.
void GetAzimuthElevationAngles (float &azimuth, float &elevation) const
 Gets the azimuth and elevation angles for the Z axis of the coordinate system represented by the transformation matrix.
bool IsRigid () const
 Checks that the transformation is a rigid transformation (keep the distances and angles).
void Load (const std::string &path)
 Loads the E3DTransformMatrix object. The given ESerializer must have been created for reading.
void Load (eVision::ESerializer *serializer)
 Loads the E3DTransformMatrix object. The given ESerializer must have been created for reading.
void Save (const std::string &path)
 Saves the E3DTransformMatrix object. The given ESerializer must have been created for writing.
void Save (eVision::ESerializer *serializer)
 Saves the E3DTransformMatrix object. The given ESerializer must have been created for writing.
eVision::Easy3D::E3DTransformMatrix Transpose () const
 Returns the transposed E3DTransformMatrix. If the matrix is orthogonal (rotation only transformation), the transposed matrix is the inverse transformation.
eVision::Easy3D::E3DTransformMatrix Inverse () const
 Returns the inverted E3DTransformMatrix. An exception will be thrown if the determinant of the matrix is 0.
 E3DTransformMatrix (CppWrapperInternal::InternalConstructor)

Static Public Member Functions

static eVision::Easy3D::E3DTransformMatrix CreateIdentityMatrix ()
 Creates an identity (neutral) E3DTransformMatrix.
static eVision::Easy3D::E3DTransformMatrix CreateRotationXMatrix (float angle)
 Creates a rotation E3DTransformMatrix around the X axis matrix.
static eVision::Easy3D::E3DTransformMatrix CreateRotationYMatrix (float angle)
 Creates a rotation E3DTransformMatrix around the Y axis matrix.
static eVision::Easy3D::E3DTransformMatrix CreateRotationZMatrix (float angle)
 Creates a rotation E3DTransformMatrix around the Z axis matrix.
static eVision::Easy3D::E3DTransformMatrix CreateRotationMatrix (const eVision::Easy3D::E3DPoint &axis, float angle)
 Creates a rotation E3DTransformMatrix around the given axis for the given angle.
static eVision::Easy3D::E3DTransformMatrix CreateTranslationMatrix (float dX, float dY, float dZ)
 Creates a translation E3DTransformMatrix.
static eVision::Easy3D::E3DTransformMatrix CreateIsotropicScalingMatrix (float scale)
 Creates an isotropic scaling E3DTransformMatrix.
static eVision::Easy3D::E3DTransformMatrix CreateAnisotropicScalingMatrix (float scaleX, float scaleY, float scaleZ)
 Creates an anisotropic scaling E3DTransformMatrix.
static eVision::Easy3D::E3DTransformMatrix CreatePerspectiveProjectionMatrix (float distance, float width, float height)
 Creates a perspective projection E3DTransformMatrix.
static eVision::Easy3D::E3DTransformMatrix CreateOrthographicProjectionMatrix (float width, float height)
 Creates an orthographic projection E3DTransformMatrix.
static eVision::Easy3D::E3DTransformMatrix CreateOrthoBasis (const eVision::Easy3D::E3DPoint &e1, const eVision::Easy3D::E3DPoint &e2, const eVision::Easy3D::E3DPoint &e3, const eVision::Easy3D::E3DPoint &t)
 Creates a orthonormal E3DTransformMatrix basis (corresponds to a rigid transformation).

Public Attributes

CppWrapperInternal::WrappedClass wrappedClass_

Detailed Description

Represents a 3D transformation [4x4] matrix.

License(s): Easy3D

Constructor & Destructor Documentation

◆ E3DTransformMatrix() [1/4]

eVision::Easy3D::E3DTransformMatrix::E3DTransformMatrix ( )

Creates an E3DTransformMatrix object.

The matrix is initialized with the given values.

By default, the matrix is initialized as an identity (neutral) matrix.

The value indices are m(column, row).

◆ E3DTransformMatrix() [2/4]

eVision::Easy3D::E3DTransformMatrix::E3DTransformMatrix ( const eVision::Easy3D::E3DTransformMatrix & other)

Creates an E3DTransformMatrix object.

Parameters
otherAnother E3DTransformMatrix used for the initialization.

The matrix is initialized with the given values.

By default, the matrix is initialized as an identity (neutral) matrix.

The value indices are m(column, row).

◆ E3DTransformMatrix() [3/4]

eVision::Easy3D::E3DTransformMatrix::E3DTransformMatrix ( double m00,
double m10,
double m20,
double m30,
double m01,
double m11,
double m21,
double m31,
double m02,
double m12,
double m22,
double m32,
double m03,
double m13,
double m23,
double m33 )

Creates an E3DTransformMatrix object.

Parameters
m00Matrix value line 0 column 0.
m10Matrix value line 0 column 1.
m20Matrix value line 0 column 2.
m30Matrix value line 0 column 3.
m01Matrix value line 1 column 0.
m11Matrix value line 1 column 1.
m21Matrix value line 1 column 2.
m31Matrix value line 1 column 3.
m02Matrix value line 2 column 0.
m12Matrix value line 2 column 1.
m22Matrix value line 2 column 2.
m32Matrix value line 2 column 3.
m03Matrix value line 3 column 0.
m13Matrix value line 3 column 1.
m23Matrix value line 3 column 2.
m33Matrix value line 3 column 3.

The matrix is initialized with the given values.

By default, the matrix is initialized as an identity (neutral) matrix.

The value indices are m(column, row).

◆ ~E3DTransformMatrix()

eVision::Easy3D::E3DTransformMatrix::~E3DTransformMatrix ( )
throw ( )
virtual

◆ E3DTransformMatrix() [4/4]

eVision::Easy3D::E3DTransformMatrix::E3DTransformMatrix ( CppWrapperInternal::InternalConstructor )

Member Function Documentation

◆ CreateAnisotropicScalingMatrix()

eVision::Easy3D::E3DTransformMatrix eVision::Easy3D::E3DTransformMatrix::CreateAnisotropicScalingMatrix ( float scaleX,
float scaleY,
float scaleZ )
static

Creates an anisotropic scaling E3DTransformMatrix.

Parameters
scaleXScaling factor along the X axis.
scaleYScaling factor along the Y axis.
scaleZScaling factor along the Z axis.

◆ CreateIdentityMatrix()

eVision::Easy3D::E3DTransformMatrix eVision::Easy3D::E3DTransformMatrix::CreateIdentityMatrix ( )
static

Creates an identity (neutral) E3DTransformMatrix.

◆ CreateIsotropicScalingMatrix()

eVision::Easy3D::E3DTransformMatrix eVision::Easy3D::E3DTransformMatrix::CreateIsotropicScalingMatrix ( float scale)
static

Creates an isotropic scaling E3DTransformMatrix.

Parameters
scaleScaling factor.

◆ CreateOrthoBasis()

eVision::Easy3D::E3DTransformMatrix eVision::Easy3D::E3DTransformMatrix::CreateOrthoBasis ( const eVision::Easy3D::E3DPoint & e1,
const eVision::Easy3D::E3DPoint & e2,
const eVision::Easy3D::E3DPoint & e3,
const eVision::Easy3D::E3DPoint & t )
static

Creates a orthonormal E3DTransformMatrix basis (corresponds to a rigid transformation).

The vector e1, e2, e3 should form a right-handed orthogonal basis.

Parameters
e1Vector 1.
e2Vector 2.
e3Vector 3.
tTranslation.

◆ CreateOrthographicProjectionMatrix()

eVision::Easy3D::E3DTransformMatrix eVision::Easy3D::E3DTransformMatrix::CreateOrthographicProjectionMatrix ( float width,
float height )
static

Creates an orthographic projection E3DTransformMatrix.

Parameters
widthWidth of the viewport.
heightHeight of the viewport.

◆ CreatePerspectiveProjectionMatrix()

eVision::Easy3D::E3DTransformMatrix eVision::Easy3D::E3DTransformMatrix::CreatePerspectiveProjectionMatrix ( float distance,
float width,
float height )
static

Creates a perspective projection E3DTransformMatrix.

Parameters
distanceDistance of the viewport to the origin.
widthWidth of the viewport.
heightHeight of the viewport.

◆ CreateRotationMatrix()

eVision::Easy3D::E3DTransformMatrix eVision::Easy3D::E3DTransformMatrix::CreateRotationMatrix ( const eVision::Easy3D::E3DPoint & axis,
float angle )
static

Creates a rotation E3DTransformMatrix around the given axis for the given angle.

Parameters
axisRotation axis.
angleRotation angle.

◆ CreateRotationXMatrix()

eVision::Easy3D::E3DTransformMatrix eVision::Easy3D::E3DTransformMatrix::CreateRotationXMatrix ( float angle)
static

Creates a rotation E3DTransformMatrix around the X axis matrix.

Parameters
angleRotation angle.

◆ CreateRotationYMatrix()

eVision::Easy3D::E3DTransformMatrix eVision::Easy3D::E3DTransformMatrix::CreateRotationYMatrix ( float angle)
static

Creates a rotation E3DTransformMatrix around the Y axis matrix.

Parameters
angleRotation angle.

◆ CreateRotationZMatrix()

eVision::Easy3D::E3DTransformMatrix eVision::Easy3D::E3DTransformMatrix::CreateRotationZMatrix ( float angle)
static

Creates a rotation E3DTransformMatrix around the Z axis matrix.

Parameters
angleRotation angle.

◆ CreateTranslationMatrix()

eVision::Easy3D::E3DTransformMatrix eVision::Easy3D::E3DTransformMatrix::CreateTranslationMatrix ( float dX,
float dY,
float dZ )
static

Creates a translation E3DTransformMatrix.

Parameters
dXTranslation along the X axis.
dYTranslation along the Y axis.
dZTranslation along the Z axis.

◆ GetAzimuthElevationAngles() [1/2]

eVision::Easy3D::EAzimuthElevationAngles eVision::Easy3D::E3DTransformMatrix::GetAzimuthElevationAngles ( ) const

Gets the azimuth and elevation angles for the Z axis of the coordinate system represented by the transformation matrix.

Azimuth angle is oriented trigonometrically around the z axis. The x axis corresponds to an azimuth of 0 degrees. Elevation angle represents the height of the normal w.r.t. the z = 0 plane.

The E3DTransformMatrix must be rigid (translation and rotation only).

◆ GetAzimuthElevationAngles() [2/2]

void eVision::Easy3D::E3DTransformMatrix::GetAzimuthElevationAngles ( float & azimuth,
float & elevation ) const

Gets the azimuth and elevation angles for the Z axis of the coordinate system represented by the transformation matrix.

Azimuth angle is oriented trigonometrically around the z axis. The x axis corresponds to an azimuth of 0 degrees.

Elevation angle represents the height of the normal w.r.t. the z = 0 plane.

The E3DTransformMatrix must be rigid (translation and rotation only).

Parameters
azimuthThe returned azimuth angle.
elevationThe returned elevation angle.

Deprecated
Deprecated in version 24.6. Scheduled to be removed in version 27.6.

◆ GetEulerAngles()

eVision::Easy3D::E3DPoint eVision::Easy3D::E3DTransformMatrix::GetEulerAngles ( ) const

Gets the Euler angles for the rotation represented by this transformation. The returned value is a 3D point with Euler angles around X, Y and Z axis. The E3DTransformMatrix must be rigid (translation and rotation only).

◆ GetOrthoBasis()

void eVision::Easy3D::E3DTransformMatrix::GetOrthoBasis ( eVision::Easy3D::E3DPoint & e1,
eVision::Easy3D::E3DPoint & e2,
eVision::Easy3D::E3DPoint & e3,
eVision::Easy3D::E3DPoint & t ) const

Gets the orthogonal basis represented by this transformation or throws an exception if it is not a rigid transformation.

Parameters
e1Vector 1.
e2Vector 2.
e3Vector 3.
tTranslation.

◆ GetValue()

float eVision::Easy3D::E3DTransformMatrix::GetValue ( unsigned int column,
unsigned int row ) const

Gets a value from the E3DTransformMatrix object.

Parameters
columnColumn of the value to get, from 0 to 3.
rowRow of the value to get, from 0 to 3.

◆ Inverse()

eVision::Easy3D::E3DTransformMatrix eVision::Easy3D::E3DTransformMatrix::Inverse ( ) const

Returns the inverted E3DTransformMatrix. An exception will be thrown if the determinant of the matrix is 0.

◆ IsRigid()

bool eVision::Easy3D::E3DTransformMatrix::IsRigid ( ) const

Checks that the transformation is a rigid transformation (keep the distances and angles).

◆ Load() [1/2]

void eVision::Easy3D::E3DTransformMatrix::Load ( const std::string & path)

Loads the E3DTransformMatrix object. The given ESerializer must have been created for reading.

Parameters
pathThe file path.

◆ Load() [2/2]

void eVision::Easy3D::E3DTransformMatrix::Load ( eVision::ESerializer * serializer)

Loads the E3DTransformMatrix object. The given ESerializer must have been created for reading.

Parameters
serializerThe serializer.

◆ operator!=()

bool eVision::Easy3D::E3DTransformMatrix::operator!= ( const eVision::Easy3D::E3DTransformMatrix & other) const

Checks if two E3DTransformMatrix objects are strictly different (binary level).

Parameters
otherThe other matrix.

◆ operator*() [1/2]

eVision::Easy3D::E3DTransformMatrix eVision::Easy3D::E3DTransformMatrix::operator* ( const eVision::Easy3D::E3DTransformMatrix & matrix) const

E3DTransformMatrix product.

Combines the transformations of the two matrices when argument is an E3DTransformMatrix.

Multiplies the current E3DTransformMatrix with the given E3DPoint

Parameters
matrixMatrix to combine with the current matrix.

In python, use EAffineTransformer::AddTransform and EAffineTransformer::ApplyTransform or EAffineTransformer::ApplyMatrix instead.

◆ operator*() [2/2]

eVision::Easy3D::E3DPoint eVision::Easy3D::E3DTransformMatrix::operator* ( eVision::Easy3D::E3DPoint P) const

E3DTransformMatrix product.

Combines the transformations of the two matrices when argument is an E3DTransformMatrix.

Multiplies the current E3DTransformMatrix with the given E3DPoint

Parameters
PPoint to transform with the current matrix.

In python, use EAffineTransformer::AddTransform and EAffineTransformer::ApplyTransform or EAffineTransformer::ApplyMatrix instead.

◆ operator+()

eVision::Easy3D::E3DTransformMatrix eVision::Easy3D::E3DTransformMatrix::operator+ ( const eVision::Easy3D::E3DTransformMatrix & matrix) const

E3DTransformMatrix sum. Sums the current and the given matrix, returns the result.

Parameters
matrixMatrix to add with the current matrix.

◆ operator-()

eVision::Easy3D::E3DTransformMatrix eVision::Easy3D::E3DTransformMatrix::operator- ( const eVision::Easy3D::E3DTransformMatrix & matrix) const

E3DTransformMatrix difference. Subtract the current and the given matrix, returns the result.

Parameters
matrixMatrix to subtract from the current matrix.

◆ operator=()

eVision::Easy3D::E3DTransformMatrix & eVision::Easy3D::E3DTransformMatrix::operator= ( const eVision::Easy3D::E3DTransformMatrix & other)

Assignment operator.

Parameters
otherAn other E3DTransformMatrix.

◆ operator==()

bool eVision::Easy3D::E3DTransformMatrix::operator== ( const eVision::Easy3D::E3DTransformMatrix & other) const

Checks if two E3DTransformMatrix objects are strictly equals (binary level).

Parameters
otherThe other matrix.

◆ Save() [1/2]

void eVision::Easy3D::E3DTransformMatrix::Save ( const std::string & path)

Saves the E3DTransformMatrix object. The given ESerializer must have been created for writing.

Parameters
pathThe file path.

◆ Save() [2/2]

void eVision::Easy3D::E3DTransformMatrix::Save ( eVision::ESerializer * serializer)

Saves the E3DTransformMatrix object. The given ESerializer must have been created for writing.

Parameters
serializerThe ESerializer object that is written to.

◆ SetValue()

void eVision::Easy3D::E3DTransformMatrix::SetValue ( unsigned int column,
unsigned int row,
float value )

Sets a value in the E3DTransformMatrix object.

Parameters
columnColumn of the value to set, from 0 to 3.
rowRow of the value to set, from 0 to 3.
valueValue to set.

◆ Transpose()

eVision::Easy3D::E3DTransformMatrix eVision::Easy3D::E3DTransformMatrix::Transpose ( ) const

Returns the transposed E3DTransformMatrix. If the matrix is orthogonal (rotation only transformation), the transposed matrix is the inverse transformation.

Member Data Documentation

◆ wrappedClass_

CppWrapperInternal::WrappedClass eVision::Easy3D::E3DTransformMatrix::wrappedClass_