
#include <pw/core/debug.hpp>
#include <pw/core/matrix_transform.hpp>
#include <pw/core/serialize.hpp>
#include <pw/core/vector.hpp>

auto main() -> int {

    pw::debug::d() << "pixwerx.matrix_transform.test\n";

    auto scale_123 =
        pw::matrix_transform::scale_matrix<float>({1.f, 2.f, 3.f, 1.f});
    pw::debug::d() << "matrix_transform::scale(1,2,3) -> \n"
                   << pw::serialize::to_string(scale_123);

    auto fm_default =
        pw::matrix_transform::frustum_matrix(pw::frustum<float>{});
    pw::debug::d() << "matrix_transform::frustum::default -> \n"
                   << pw::serialize::to_string(fm_default);

    auto fm_45deg_1dot3 = pw::matrix_transform::frustum_matrix(
        pw::frustum<float>::make_perspective_symmetric(45.f, 1.3f, 0.1f,
                                                       1000.f));
    pw::debug::d() << "matrix_transform::frustum::45deg -> \n"
                   << pw::serialize::to_string(fm_45deg_1dot3);

    auto fm_ortho = pw::matrix_transform::frustum_matrix(
        pw::frustum<float>::make_orthographic_symmetric(0.5f, 1.3f, 0.1f,
                                                        1000.f));
    pw::debug::d() << "matrix_transform::frustum::ortho -> \n"
                   << pw::serialize::to_string(fm_ortho);

    auto lookat_mat = pw::matrix_transform::look_at_matrix(
        pw::vector{0.f, 0, 5}, pw::vector{0.f, 0, 0}, pw::vector{0.f, 1, 0});

    pw::debug::d() << "matrix_transform::look_at -> \n"
                   << pw::serialize::to_string(lookat_mat);
}
