|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
6 t; K/ g4 Z! \
; f" e1 B& k7 h" U& M# B) @0 B
# j& c6 ]/ l' M7 H* u% ^, S
' M7 C: z* t$ x& j这功能其实很好用,比如选择面,自动显示面的法线等等。 u0 B9 R# w* g& A$ V
2 t1 f6 P2 D- K6 e- _; Dstatic void do_UGopen_api(void)
/ q: n4 C3 H. S{
( m& k5 s4 t& ]% g5 o double pt1[3] = {0.0, 0.0, 0.0};2 B; C7 r! `, L' j3 B% f
double pt2[3] = {2.0, 2.0, 2.0};
7 f6 N0 Z, D+ h' K% j; w double pt3[3] = {-2.0,-2.0,-2.0};) h3 U, n5 q" u& Q' p" a
double vect1[3] = {1.0, 1.0, 1.0};
3 g0 v. C' {* A& ~+ n1 [1 B& L UF_DISP_conehead_attrb_s attrb;5 m& M. g, s, H9 s$ L
UF_DISP_conehead(UF_DISP_ALL_ACTIVE_VIEWS,5 Y1 H% `" I/ W3 p
pt1, vect1, 1);
$ c0 E: E T w1 { /* Example to draw the vector with the base of its staff2 v) f8 G* F9 r& g A
anchored at the origin so that the vector appears to point9 v2 k) m. b4 c; E
away from the origin8 b: N% C& r2 I- p# c' @, {
*/
0 `: C$ H5 p+ L9 u' n UF_DISP_conehead(UF_DISP_ALL_ACTIVE_VIEWS,
1 h9 p$ J$ m# `) L6 i pt2, vect1, 0);4 `4 Y. f1 Q/ c9 Z8 f5 n8 C- O
UF_DISP_labeled_conehead(UF_DISP_ALL_ACTIVE_VIEWS,- ^9 r+ S+ j/ w- I9 n8 |2 G+ Q
pt3, vect1, 0, "Normal");
, G" h0 O u0 r- i- Y: i' S- w UF_DISP_get_conehead_attrb(&attrb);
0 z9 n7 U* }0 v' R& v8 n /* Use color index three */2 n% f% w1 i4 a: u
attrb.color = 3;: E5 y4 m* Z+ v. a+ M' s
/* Update the current attribute settings */. y# L. z" L, K/ e3 }
UF_DISP_set_conehead_attrb(&attrb);
3 d8 B6 [+ r3 e( v; i" c* C printf("\nCurrent conhead display settings:\n");+ z y4 e! ]$ i/ k8 j
printf("\tLength of Staff: %g\n", attrb.staff_length);, f0 \0 L2 z8 i. d3 _2 y* F2 E
printf("\tTotal Length: %g\n", attrb.total_length);% X+ I' I I& e& Z; o$ C3 p
printf("\tRadius of Cone Base: %g\n", attrb.cone_radius);4 S! D9 m: ~( V, C7 f" i* ~4 v; B
printf("\TColor Index: %d\n", attrb.color);1 L( }0 Y e8 ?; R a
printf("\tFont Index: %d\n", attrb.font);
7 |: U, a! Q+ Y( V' ~ printf("\tDensity Index: %d\n", attrb.density);
$ U( z& y- U: D+ Z}
8 R; [5 F. g/ M, ]4 x) P3 V5 _* o c% D% I
|
|