// // Created by dtouch on 23-5-14. // #include "rod.h" #include "iostream" #include "cudaEigenTest.cuh" #include "bvh.h" #include "rod_generate.cuh" float *test() { // a case with 3*3*3 points (2*2*2 resolution) Eigen::Matrix rod_points; rod_points.resize(27, 3); rod_points << 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 1, 0, 1, 1, 0, 2, 1, 0, 0, 2, 0, 1, 2, 0, 2, 2, 0, 0, 0, 1, 1, 0, 1, 2, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 1, 0, 2, 1, 1, 2, 1, 2, 2, 1, 0, 0, 2, 1, 0, 2, 2, 0, 2, 0, 1, 2, 1, 1, 2, 2, 1, 2, 0, 2, 2, 1, 2, 2, 2, 2, 2; Eigen::Matrix rod_beams; rod_beams << 0, 1, 1, 2, 3, 4, 4, 5, 6, 7, 7, 8, 9, 10, 10, 11, 12, 13, 13, 14, 15, 16, 16, 17, 18, 19, 19, 20, 21, 22, 22, 23, 24, 25, 25, 26, 0, 3, 3, 6, 1, 4, 4, 7, 2, 5, 5, 8, 9, 12, 12, 15, 10, 13, 13, 16, 11, 14, 14, 17, 18, 21, 21, 24, 19, 22, 22, 25, 20, 23, 23, 26, 0, 9, 9, 18, 1, 10, 10, 19, 2, 11, 11, 20, 3, 12, 12, 21, 4, 13, 13, 22, 5, 14, 14, 23, 6, 15, 15, 24, 7, 16, 16, 25, 8, 17, 17, 26; RodCrystal rod(rod_points, rod_beams); // RodBVH bvh(rod); // bvh.build(); return h_rod_generate(rod, Eigen::Vector3i(10, 10, 10), Eigen::Vector3f(-100, -100, -100), Eigen::Vector3f(100, 100, 100), 0.2f); } int main() { test(); return 0; }