23 if( MB_SUCCESS != ( A ) ) \
25 std::cerr << "Failure (error code " << ( A ) << ") at " __FILE__ ":" << __LINE__ << std::endl; \
30 const std::string
input_file = TestDir +
"unittest/test_geom.h5m";
47 double dir[3] = { -1.0, 0.0, 0.0 };
48 double origin[3] = { 0.0, 0.0, 0.0 };
49 double next_surf_dist;
52 double expected_next_surf_dist = 5.0;
60 double dir[3] = { 1.0, 0.0, 0.0 };
61 double origin[3] = { -10.0, 0.0, 0.0 };
62 double next_surf_dist;
65 std::cout << next_surf_dist << std::endl;
66 double expected_next_surf_dist = 15.0;
75 double dir[3] = { 1.0, 0.0, 0.0 };
76 double origin[3] = { -10.0, 0.0, 0.0 };
77 double next_surf_dist;
80 std::cout << next_surf_dist << std::endl;
81 double expected_next_surf_dist = 15.0;
90 double dir[3] = { 1.0, 0.0, 0.0 };
91 double origin[3] = { -10.0, 0.0, 0.0 };
92 double next_surf_dist;
94 GQT->
ray_fire( vol_h,
origin, dir, next_surf, next_surf_dist, &history, 0.0, -1 );
95 std::cout << next_surf_dist << std::endl;
96 double expected_next_surf_dist = 5.0;
105 double dir[3] = { 1.0, 0.0, 0.0 };
106 double origin[3] = { -10.0, 0.0, 0.0 };
108 double next_surf_dist;
119 GQT->
ray_fire( vol_h, xyz, dir, next_surf, next_surf_dist, &history, 0, 1 );
121 GQT->
ray_fire( vol_h, xyz, dir, next_surf, next_surf_dist, &history, 0, 1 );
133 double dir[3] = { 1.0, 0.0, 0.0 };
134 double origin[3] = { -10.0, 0.0, 0.0 };
136 double next_surf_dist;
142 std::cout << next_surf <<
" " << history.
size() << std::endl;
145 xyz[0] =
origin[0] + ( next_surf_dist * dir[0] );
146 xyz[1] =
origin[1] + ( next_surf_dist * dir[1] );
147 xyz[2] =
origin[2] + ( next_surf_dist * dir[2] );
151 GQT->
ray_fire( vol_h, xyz, dir, next_surf, next_surf_dist, &history, 0, 1 );
153 GQT->
ray_fire( vol_h, xyz, dir, next_surf, next_surf_dist, &history, 0, 1 );