Remove DirectionVector class
This commit is contained in:
@@ -1,20 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
#include <J3ML/LinearAlgebra/Vector3.hpp>
|
|
||||||
|
|
||||||
namespace J3ML::LinearAlgebra {
|
|
||||||
class DirectionVectorRH;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Direction vector of a given Matrix3x3 RotationMatrix in a Right-handed coordinate space.
|
|
||||||
class J3ML::LinearAlgebra::DirectionVectorRH : public Vector3 {
|
|
||||||
private:
|
|
||||||
// This is purposefully not exposed because these types aren't usually convertable.
|
|
||||||
explicit DirectionVectorRH(const Vector3& rhs);
|
|
||||||
public:
|
|
||||||
static DirectionVectorRH Forward(const Matrix3x3& rhs);
|
|
||||||
static DirectionVectorRH Backward(const Matrix3x3& rhs);
|
|
||||||
static DirectionVectorRH Left(const Matrix3x3& rhs);
|
|
||||||
static DirectionVectorRH Right(const Matrix3x3& rhs);
|
|
||||||
static DirectionVectorRH Up(const Matrix3x3& rhs);
|
|
||||||
static DirectionVectorRH Down(const Matrix3x3& rhs);
|
|
||||||
};
|
|
@@ -1,38 +0,0 @@
|
|||||||
#include <J3ML/LinearAlgebra/DirectionVector.hpp>
|
|
||||||
#include <J3ML/LinearAlgebra/Matrix3x3.hpp>
|
|
||||||
|
|
||||||
DirectionVectorRH::DirectionVectorRH(const Vector3& rhs) {
|
|
||||||
x = rhs.x;
|
|
||||||
y = rhs.y;
|
|
||||||
z = rhs.z;
|
|
||||||
}
|
|
||||||
|
|
||||||
DirectionVectorRH DirectionVectorRH::Forward(const Matrix3x3& rhs) {
|
|
||||||
return DirectionVectorRH(rhs.Col(2));
|
|
||||||
}
|
|
||||||
|
|
||||||
DirectionVectorRH DirectionVectorRH::Backward(const Matrix3x3& rhs) {
|
|
||||||
return DirectionVectorRH(-rhs.Col(2));
|
|
||||||
}
|
|
||||||
|
|
||||||
DirectionVectorRH DirectionVectorRH::Left(const Matrix3x3& rhs) {
|
|
||||||
return DirectionVectorRH(-rhs.Col(0));
|
|
||||||
}
|
|
||||||
|
|
||||||
DirectionVectorRH DirectionVectorRH::Right(const Matrix3x3& rhs) {
|
|
||||||
return DirectionVectorRH(rhs.Col(0));
|
|
||||||
}
|
|
||||||
|
|
||||||
DirectionVectorRH DirectionVectorRH::Up(const Matrix3x3 &rhs) {
|
|
||||||
return DirectionVectorRH(rhs.Col(1));
|
|
||||||
}
|
|
||||||
|
|
||||||
DirectionVectorRH DirectionVectorRH::Down(const Matrix3x3& rhs) {
|
|
||||||
return DirectionVectorRH(-rhs.Col(1));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Reference in New Issue
Block a user