|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
* t' C* D7 {4 x, X5 {2 b6 W9 t1 }. |
, S, l) A- P: x' T) c* E
) D: e$ ?; ]9 P+ v2 A/ R这功能其实很好用,比如选择面,自动显示面的法线等等。, E2 K+ ^8 j( `- a; y q, ~
$ ^/ G" Y' q! U" Q: A1 t3 f5 Rstatic void do_UGopen_api(void)8 ^; C i1 p8 W+ m! \
{6 j* `) }0 `* Z# g$ n- |8 Q+ b ~
double pt1[3] = {0.0, 0.0, 0.0};
! x. |0 |9 P+ i( s8 `/ @% ` D double pt2[3] = {2.0, 2.0, 2.0};
1 }+ I T, J# ` C. ]0 w double pt3[3] = {-2.0,-2.0,-2.0};: Y. ^ S/ z/ e' H; H+ t' I; n
double vect1[3] = {1.0, 1.0, 1.0};
# I- S6 R# }+ c4 `4 Y7 K8 y UF_DISP_conehead_attrb_s attrb;
0 |2 u. ?4 p/ e" t3 q0 T' P" v UF_DISP_conehead(UF_DISP_ALL_ACTIVE_VIEWS, r" E$ g* I) h" ?
pt1, vect1, 1);3 r2 w8 W6 h! p. E
/* Example to draw the vector with the base of its staff/ P" X" o) `* E! U4 U
anchored at the origin so that the vector appears to point
! q. S$ z- E" M: g# o8 f away from the origin
8 ^7 K( h% F6 m: _ b( ?8 j1 x */
9 t w5 H' L- T! K; I7 [ UF_DISP_conehead(UF_DISP_ALL_ACTIVE_VIEWS,9 |! [9 `1 k: _1 i; X
pt2, vect1, 0);
( C7 \6 u- M6 L- k: E UF_DISP_labeled_conehead(UF_DISP_ALL_ACTIVE_VIEWS,9 @0 l8 e' p. @ A9 Y/ J
pt3, vect1, 0, "Normal");
+ z! ~3 B( b, ~ UF_DISP_get_conehead_attrb(&attrb);
7 d$ ]) V/ y, w, H" Z7 Z9 S, q /* Use color index three */, @9 c: s" d- g
attrb.color = 3;" a7 p9 ]! D1 F% E7 E( N7 A" A4 W
/* Update the current attribute settings */
/ @) M. m1 T, X6 ~2 o* i UF_DISP_set_conehead_attrb(&attrb);
3 c/ x( g1 A+ z: _ printf("\nCurrent conhead display settings:\n");) k' u$ a: H( v3 N
printf("\tLength of Staff: %g\n", attrb.staff_length);
8 E; p# \# y& ?' l0 q: F: F printf("\tTotal Length: %g\n", attrb.total_length);- i' g% h1 {' B2 I, E/ y
printf("\tRadius of Cone Base: %g\n", attrb.cone_radius);0 P9 F3 l a- B6 E/ k$ p- |* h. X
printf("\TColor Index: %d\n", attrb.color);
( l6 m& S7 U6 P: p) s3 h printf("\tFont Index: %d\n", attrb.font);
* f+ W( F2 V8 g' d& ]. Y# Y printf("\tDensity Index: %d\n", attrb.density);2 U9 I* s, h6 S& y6 w, _. y
}# v" @. L- G* E) B! [2 s
& l* o8 [1 \$ U |
|