函数:UF_MODL_trace_a_ray()
函数说明:打射线,找交点。
用法:
1 #include "Text.h"
2
3 #include <stdio.h>
4 #include <uf.h>
5 #include <uf_part.h>
6 #include <uf_defs.h>
7 #include <uf_modl.h>
8 void ufusr(char *param, int *retcode, int param_len)
9 {
10 UF_initialize();
11 tag_t tagBody[2] = { 45071,138371};
12 double douPoint[3] = { 0.0,0.0,0.0 };
13 double douRaydir[3] = { 0.0,1.0,0.5 };
14 double transform[16] = { 1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0 };
15 int hits_found;
16 UF_MODL_ray_hit_point_info_p_t hit_list;
17 UF_MODL_trace_a_ray(2, tagBody, douPoint, douRaydir, transform, 0, &hits_found, &hit_l