Path Tracer
Classes | Functions
DoubleMatrix33.h File Reference

Defines the DoubleMatrix33 class and some functions around it. More...

#include "DoubleVec3D.h"
Include dependency graph for DoubleMatrix33.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  DoubleMatrix33
 A three-dimensional square matrix using doubles. More...
 

Functions

DoubleMatrix33 operator+ (const DoubleMatrix33 &matrix1, const DoubleMatrix33 &matrix2)
 Sum operator. More...
 
DoubleMatrix33 operator- (const DoubleMatrix33 &matrix)
 Unary minus operator. More...
 
DoubleMatrix33 operator- (const DoubleMatrix33 &matrix1, const DoubleMatrix33 &matrix2)
 Difference operator. More...
 
DoubleMatrix33 operator* (const DoubleMatrix33 &matrix1, const DoubleMatrix33 &matrix2)
 Matrix product operator. More...
 
DoubleVec3D operator* (const DoubleMatrix33 &matrix, const DoubleVec3D &vec)
 Matrix-vector product operator. More...
 
DoubleMatrix33 getRotationMatrixX (double roll)
 Rotation matrix around the x axis. More...
 
DoubleMatrix33 getRotationMatrixY (double pitch)
 Rotation matrix around the y axis. More...
 
DoubleMatrix33 getRotationMatrixZ (double yaw)
 Rotation matrix around the z axis. More...
 
DoubleMatrix33 getRotationMatrixXYZ (double roll, double pitch, double yaw)
 Rotation matrix around the z, y and then x axis. More...
 
DoubleMatrix33 getRotationMatrixXYZ (const DoubleVec3D &angles)
 Rotation matrix around the z, y and then x axis. More...
 
DoubleMatrix33 getScalingMatrixX (double x)
 Scaling matrix on the x axis. More...
 
DoubleMatrix33 getScalingMatrixY (double y)
 Scaling matrix on the y axis. More...
 
DoubleMatrix33 getScalingMatrixZ (double z)
 Scaling matrix on the z axis. More...
 
DoubleMatrix33 getScalingMatrixXYZ (double x, double y, double z)
 Scaling matrix on the x, y and z axis. More...
 
DoubleMatrix33 getScalingMatrixXYZ (const DoubleVec3D &values)
 Scaling matrix on the x, y and z axis. More...
 

Detailed Description

Defines the DoubleMatrix33 class and some functions around it.

Function Documentation

◆ getRotationMatrixX()

DoubleMatrix33 getRotationMatrixX ( double  roll)

Rotation matrix around the x axis.

Parameters
rollThe angle of the rotation.
Returns
The rotation matrix.

◆ getRotationMatrixXYZ() [1/2]

DoubleMatrix33 getRotationMatrixXYZ ( const DoubleVec3D angles)

Rotation matrix around the z, y and then x axis.

Parameters
anglesThe first coordinate of this vector is the rotation around the x axis, the second one is the rotation around the y axis and the last one is the rotation around the z axis.
Returns
The product of the rotation matrices (z, y and then x).

◆ getRotationMatrixXYZ() [2/2]

DoubleMatrix33 getRotationMatrixXYZ ( double  roll,
double  pitch,
double  yaw 
)

Rotation matrix around the z, y and then x axis.

Parameters
rollAngle of the rotation around the x axis.
pitchAngle of the rotation around the y axis.
yawAngle of the rotation around the z axis.
Returns
The product of the rotation matrices (z, y and then x).

◆ getRotationMatrixY()

DoubleMatrix33 getRotationMatrixY ( double  pitch)

Rotation matrix around the y axis.

Parameters
pitchThe angle of the rotation.
Returns
The rotation matrix.

◆ getRotationMatrixZ()

DoubleMatrix33 getRotationMatrixZ ( double  yaw)

Rotation matrix around the z axis.

Parameters
yawThe angle of the rotation.
Returns
The rotation matrix.

◆ getScalingMatrixX()

DoubleMatrix33 getScalingMatrixX ( double  x)

Scaling matrix on the x axis.

Parameters
xThe factor of the scaling.
Returns
The scaling matrix.

◆ getScalingMatrixXYZ() [1/2]

DoubleMatrix33 getScalingMatrixXYZ ( const DoubleVec3D values)

Scaling matrix on the x, y and z axis.

Parameters
valuesThe first coordinate of this vector is the scaling on the x axis, the second one is the scaling on the y axis and the last one is the scaling on the z axis.
Returns
The scaling matrix.

◆ getScalingMatrixXYZ() [2/2]

DoubleMatrix33 getScalingMatrixXYZ ( double  x,
double  y,
double  z 
)

Scaling matrix on the x, y and z axis.

Parameters
xThe factor of the scaling on the x axis.
yThe factor of the scaling on the y axis.
zThe factor of the scaling on the z axis.
Returns
The scaling matrix.

◆ getScalingMatrixY()

DoubleMatrix33 getScalingMatrixY ( double  y)

Scaling matrix on the y axis.

Parameters
yThe factor of the scaling.
Returns
The scaling matrix.

◆ getScalingMatrixZ()

DoubleMatrix33 getScalingMatrixZ ( double  z)

Scaling matrix on the z axis.

Parameters
zThe factor of the scaling.
Returns
The scaling matrix.

◆ operator*() [1/2]

DoubleVec3D operator* ( const DoubleMatrix33 matrix,
const DoubleVec3D vec 
)

Matrix-vector product operator.

Parameters
matrixThe matrix for the product.
vecThe vector for the product.
Returns
The product between matrix and vec.

◆ operator*() [2/2]

DoubleMatrix33 operator* ( const DoubleMatrix33 matrix1,
const DoubleMatrix33 matrix2 
)

Matrix product operator.

Uses the operator*=() method.

Parameters
matrix1The first matrix for the product.
matrix2The second matrix for the product.
Returns
The product between matrix1 and matrix2.
See also
DoubleMatrix33::operator*=(double val)

◆ operator+()

DoubleMatrix33 operator+ ( const DoubleMatrix33 matrix1,
const DoubleMatrix33 matrix2 
)

Sum operator.

Uses the DoubleMatrix33::operator+=(const DoubleMatrix33& matrix) method.

Parameters
matrix1The first matrix for the sum.
matrix2The second matrix for the sum.
Returns
The sum of the two matrices.
See also
DoubleMatrix33::operator+=(const DoubleMatrix33& matrix)

◆ operator-() [1/2]

DoubleMatrix33 operator- ( const DoubleMatrix33 matrix)

Unary minus operator.

Uses the DoubleMatrix33::operator*=(double val) method.

Parameters
matrixThe matrix that will be inversed.
Returns
The inverse of matrix.
See also
DoubleMatrix33::operator*=(double val), DoubleMatrix33::operator-=(const DoubleMatrix33& matrix)

◆ operator-() [2/2]

DoubleMatrix33 operator- ( const DoubleMatrix33 matrix1,
const DoubleMatrix33 matrix2 
)

Difference operator.

Uses the DoubleMatrix33::operator-=(const DoubleMatrix33& matrix) method.

Parameters
matrix1The first matrix for the difference.
matrix2The second matrix for the difference.
Returns
The difference between matrix1 and matrix2.
See also
DoubleMatrix33::operator-=(const DoubleMatrix33& matrix)