23 void init_shamrock_math_Ray(py::module &m, std::string name) {
24 py::class_<shammath::Ray<T>>(m, name.c_str())
25 .def(py::init([](f64_3 origin, f64_3 direction) {
26 return std::make_unique<shammath::Ray<T>>(origin, direction);
39 return ray.inv_direction;
43 template void init_shamrock_math_Ray<f64_3>(py::module &m, std::string name);
46 void init_shamrock_math_RingRay(py::module &m, std::string name) {
47 py::class_<shammath::RingRay<T>>(m, name.c_str())
48 .def(py::init([](f64_3 center,
f64 radius, f64_3 e_x, f64_3 e_y) {
49 return std::make_unique<shammath::RingRay<T>>(center, radius, e_x, e_y);
54 return ring_ray.center;
59 return ring_ray.radius;
71 template void init_shamrock_math_RingRay<f64_3>(py::module &m, std::string name);
double f64
Alias for double.
Pybind11 include and definitions.
Ray representation for intersection testing.
Ring ray representation for intersection testing.