|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
; H/ {( o6 w" g, O6 R& V9 l* G( C
# c0 w3 i5 b0 F( @/ h& K, I7 ]# M8 c& p
6 F+ ^8 v; L/ k5 w. J. q这功能其实很好用,比如选择面,自动显示面的法线等等。, H0 c4 c) y4 r7 W$ E8 ^" @
7 R" m. ^4 j5 C% `8 o7 Gstatic void do_UGopen_api(void)$ s% W- C" O5 w; @3 {1 p
{
* n% `( Y5 e" s: p* { double pt1[3] = {0.0, 0.0, 0.0};4 w2 c/ {3 _8 g+ `. @! [
double pt2[3] = {2.0, 2.0, 2.0};1 P8 A( B; W% W( F# j) Z5 Z7 f: ?( e
double pt3[3] = {-2.0,-2.0,-2.0};
+ J0 i) I* t& M* S T0 e double vect1[3] = {1.0, 1.0, 1.0};, g0 p1 i7 C1 R( f7 Y7 Q' L4 Y% m* v
UF_DISP_conehead_attrb_s attrb;) ^ W: c3 u* B3 b, q2 e$ P3 J
UF_DISP_conehead(UF_DISP_ALL_ACTIVE_VIEWS,8 X$ r: L* H' m
pt1, vect1, 1);; U2 u! c( c2 c
/* Example to draw the vector with the base of its staff
) k" U L$ B6 ?0 R1 F& i) ~/ M8 G anchored at the origin so that the vector appears to point
- k' a' u( ~, q6 f, z5 d7 T5 X away from the origin
/ _2 f' M( R3 o */ E9 v6 Z- c6 d: o* S8 y8 { T
UF_DISP_conehead(UF_DISP_ALL_ACTIVE_VIEWS,
+ F# w# c0 m+ Q% z8 P5 o8 q pt2, vect1, 0);
, Q4 ~ F0 M+ F5 k UF_DISP_labeled_conehead(UF_DISP_ALL_ACTIVE_VIEWS,# t& K( m8 G# q7 ]+ E
pt3, vect1, 0, "Normal");
% X' E/ v. @8 J/ ^- ?0 |1 B6 J UF_DISP_get_conehead_attrb(&attrb);
5 T0 z% a4 W- R/ A; d& q: j: j' H /* Use color index three */- I- j' K; E) w; ~. O [* ^* h' B
attrb.color = 3;: v" @6 M3 R5 y- W v& b/ e
/* Update the current attribute settings */
& C8 m; J& y$ J4 O UF_DISP_set_conehead_attrb(&attrb);" x5 B5 c6 P5 ~1 S/ p8 v0 X. Y
printf("\nCurrent conhead display settings:\n");( A9 @; ], n6 i! k( f8 p5 E
printf("\tLength of Staff: %g\n", attrb.staff_length);( ]2 \) [/ ?; Q6 g% P; z1 z; m
printf("\tTotal Length: %g\n", attrb.total_length);; l& O: C9 |1 l( x+ d
printf("\tRadius of Cone Base: %g\n", attrb.cone_radius);
; x; U# o+ x( s, S2 B printf("\TColor Index: %d\n", attrb.color);
8 c5 k+ ^! e; P) I. Q) Y/ ~ printf("\tFont Index: %d\n", attrb.font);" N2 c/ k# Z* y U7 u
printf("\tDensity Index: %d\n", attrb.density);% ~ {# j, T2 d
}
0 f1 t9 ?) c* d% y9 Z& q0 M7 \# I) G$ y6 u6 `: J8 T
|
|