Remove alternative fix attempt

This commit is contained in:
2025-02-27 12:07:56 -05:00
parent 1d348e1071
commit f3c161481b
2 changed files with 0 additions and 65 deletions

View File

@@ -47,31 +47,4 @@ namespace fgl::engine
template struct TransformComponent< CoordinateSpace::World >;
template struct TransformComponent< CoordinateSpace::Model >;
namespace v2
{
TransformComponent::TransformComponent() :
m_position( 0.0f, 0.0f, 0.0f ),
m_scale( 1.0, 1.0, 1.0 ),
m_rotation()
{}
Matrix TransformComponent::mat() const
{
glm::mat3 rotation_mat { m_rotation.mat() };
rotation_mat[ 0 ] = rotation_mat[ 0 ] * m_scale.x;
rotation_mat[ 1 ] = rotation_mat[ 1 ] * m_scale.y;
rotation_mat[ 2 ] = rotation_mat[ 2 ] * m_scale.z;
const glm::mat4 mat { { rotation_mat[ 0 ], 0.0f },
{ rotation_mat[ 1 ], 0.0f },
{ rotation_mat[ 2 ], 0.0f },
{ m_position.vec(), 1.0f } };
const Matrix matrix { mat };
return matrix;
}
} // namespace v2
} // namespace fgl::engine

View File

@@ -13,44 +13,6 @@
namespace fgl::engine
{
namespace v2
{
struct Coordinate : public glm::vec3
{
public:
glm::vec3 vec() const { return static_cast< glm::vec3 >( *this ); }
Coordinate() = delete;
Coordinate( const float x, const float y, const float z ) : glm::vec3( x, y, z ) {}
};
struct Matrix : public glm::mat4
{
public:
Matrix() = delete;
explicit Matrix( const float value ) : glm::mat4( value ) {}
explicit Matrix( const glm::mat4& matrix ) : glm::mat4( matrix ) {}
};
class TransformComponent
{
Coordinate m_position;
Scale m_scale;
QuatRotation m_rotation;
public:
TransformComponent();
Matrix mat() const;
};
} // namespace v2
template < MatrixType >
class Matrix;