23 if (rotation.
X != 0) {
27 if (rotation.
Y != 0 || rotation.
Z != 0) {
32 if (rotation.
Y != 0) {
36 if (rotation.
Z != 0) {
41 if (rotation.
Z != 0) {
172 return matrix.ConvertCoordinateToVector();
181 return x +
"\n" +
y +
"\n" +
z +
"\n";
Defines the RotationMatrix class for representing and manipulating 3D rotation matrices.
Implements a generic Kalman Filter for 1D data.
static T DegreesToRadians(T degrees)
Converts degrees to radians.
Represents a 3D rotation matrix and provides operations for rotation and matrix manipulation.
String ToString()
Converts the rotation matrix to a string representation.
RotationMatrix()
Default constructor. Initializes the matrix to the identity matrix.
Vector3D RotateZ(float theta)
Rotates the matrix around the Z-axis.
Vector3D YAxis
Y-axis vector of the rotation matrix.
bool IsEqual(RotationMatrix rM)
Checks if two rotation matrices are equal.
Vector3D InitialVector
Initial vector used for transformations.
RotationMatrix operator=(RotationMatrix rM)
Assignment operator for rotation matrices.
Vector3D Rotate(Vector3D rotation)
Rotates the matrix by a given rotation vector.
void ReadjustMatrix()
Recalculates and adjusts the rotation matrix axes to maintain orthogonality.
RotationMatrix Multiply(float d)
Multiplies the rotation matrix by a scalar.
float Determinant()
Computes the determinant of the rotation matrix.
Vector3D RotateY(float theta)
Rotates the matrix around the Y-axis.
Vector3D ConvertCoordinateToVector()
Converts the current coordinate system to a vector representation.
RotationMatrix Normalize()
Normalizes the rotation matrix to ensure orthogonality.
RotationMatrix Transpose()
Transposes the rotation matrix.
RotationMatrix Inverse()
Inverts the rotation matrix.
bool didRotate
Tracks whether the matrix has been rotated.
Vector3D XAxis
X-axis vector of the rotation matrix.
Vector3D ZAxis
Z-axis vector of the rotation matrix.
void RotateRelative(RotationMatrix rM)
Rotates this matrix relative to another rotation matrix.
static Vector3D RotateVector(Vector3D rotate, Vector3D coordinates)
Rotates a vector using the rotation matrix.
Vector3D RotateX(float theta)
Rotates the matrix around the X-axis.
Represents a 3D vector (X, Y, Z) and provides methods for vector arithmetic.
Vector3D CrossProduct(const Vector3D &vector) const
Computes the cross product of this vector with another Vector3D.
String ToString() const
Converts the vector to a string representation.
float Z
The Z-component of the 3D vector.
Vector3D UnitSphere() const
Normalizes this vector such that its magnitude is 1 (if non-zero).
Vector3D Multiply(const Vector3D &vector) const
Multiplies this vector by another Vector3D component-wise.
float X
The X-component of the 3D vector.
float Y
The Y-component of the 3D vector.
bool IsEqual(const Vector3D &vector) const
Checks if this vector is equal to another Vector3D component-wise.