|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
$ s3 z8 F/ p6 G, K, u6 {4 r
! K* Q' M9 T) ~1 s) i7 ]9 L f% r1 q# C' v
3 o4 P q& A1 i/ n4 K这功能其实很好用,比如选择面,自动显示面的法线等等。1 M0 r' y2 L6 ^" G) f& p
/ Q G: o3 @+ K% g( M
static void do_UGopen_api(void)2 h6 q) J: s. H
{
/ w% T& g* q% r/ X: V double pt1[3] = {0.0, 0.0, 0.0};
/ R; J: ?4 U1 c: E$ w. g% s double pt2[3] = {2.0, 2.0, 2.0};2 C; d( t. \0 k! i; M% `) f+ G
double pt3[3] = {-2.0,-2.0,-2.0};" ] z* t6 f8 y& b
double vect1[3] = {1.0, 1.0, 1.0};
% p( T' \; Y+ u& a/ a UF_DISP_conehead_attrb_s attrb;3 K; d; t4 T5 Z ` v
UF_DISP_conehead(UF_DISP_ALL_ACTIVE_VIEWS,
3 Z9 ]) v! o, W) [ pt1, vect1, 1);
* C- j# T/ D) v0 k9 F /* Example to draw the vector with the base of its staff) i( Y. n, C! f2 Y! o8 H
anchored at the origin so that the vector appears to point {* D7 O- \; m5 u0 `
away from the origin
& m! b. j2 W. t& T: i/ @" ?0 K */0 y. }0 a; ^$ R: a1 D- O
UF_DISP_conehead(UF_DISP_ALL_ACTIVE_VIEWS,9 n1 P1 L$ q. ~% B3 C s! q3 R
pt2, vect1, 0);
" |& k3 ^ o0 B4 I UF_DISP_labeled_conehead(UF_DISP_ALL_ACTIVE_VIEWS,! F/ R% u" F4 c0 i# d; T4 Z
pt3, vect1, 0, "Normal");- }" m e" N% f4 k7 |. V# V
UF_DISP_get_conehead_attrb(&attrb);4 T% j4 R) m" c! P. V5 X% s
/* Use color index three */4 y. ]3 l. g$ T( Y
attrb.color = 3;4 t; a; {; K5 g; m
/* Update the current attribute settings */! {* j$ i5 G/ l9 L* R
UF_DISP_set_conehead_attrb(&attrb);
# R) r' W# p1 a9 U printf("\nCurrent conhead display settings:\n");
e& I; r3 q: `* w" B, L printf("\tLength of Staff: %g\n", attrb.staff_length);
7 G/ v: i6 @ B: m7 b# L1 R printf("\tTotal Length: %g\n", attrb.total_length);5 p" m8 z, ]+ `+ I/ y/ s
printf("\tRadius of Cone Base: %g\n", attrb.cone_radius);
5 f. p- x! U$ |% e8 q printf("\TColor Index: %d\n", attrb.color);
$ {5 {% X7 u* k* `4 s4 s printf("\tFont Index: %d\n", attrb.font);' {6 E3 J5 Y, ]
printf("\tDensity Index: %d\n", attrb.density);
, w J$ P9 F0 R, x6 s! ^}
% i% E3 Y8 }7 p( Y* C
w3 [: O- \2 x8 M$ o |
|