This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
Files
YimMenu/src/lua/bindings/vector.hpp

16 lines
337 B
C++
Raw Normal View History

#pragma once
#include "lua/sol.hpp"
namespace lua::vector
{
static void bind(sol::state& state)
{
//clang-format off
state.new_usertype<Vector3>("vec3",
sol::constructors<Vector3(float, float, float)>(),
"x", &Vector3::x, "y", &Vector3::y, "z", &Vector3::z,
"__tostring", &Vector3::to_string
);
//clang-format on
}
}