|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
& n% Y; E0 V o( N! w2 C/ Y& D
1 S Y$ \3 n: u ~# y
6 @) I: O' _# ^$ L6 \
4 M( m$ ?5 {8 Y: r
这功能其实很好用,比如选择面,自动显示面的法线等等。 R7 Z+ L# X9 I3 I7 ~
+ k9 L6 f; b3 G6 `+ W( j
static void do_UGopen_api(void)6 s( h7 | g+ K+ e. s* [( ?
{0 s# S- i- V9 z1 [9 d
double pt1[3] = {0.0, 0.0, 0.0};
: l7 V' `3 |1 g2 x double pt2[3] = {2.0, 2.0, 2.0};# N8 t& H/ l1 ?# P( p u4 r' f5 l
double pt3[3] = {-2.0,-2.0,-2.0};! s5 k8 O( Z1 Z
double vect1[3] = {1.0, 1.0, 1.0};* g/ M0 w2 y. V5 m
UF_DISP_conehead_attrb_s attrb;+ a: g5 ~6 T. F6 n7 N' b- v# f
UF_DISP_conehead(UF_DISP_ALL_ACTIVE_VIEWS,
/ \9 k) j3 b; @0 d' k pt1, vect1, 1);
- o6 Z* w- z9 y /* Example to draw the vector with the base of its staff' v# E' \( a) b- L2 U
anchored at the origin so that the vector appears to point% f* m9 }8 T& k4 R" W% g
away from the origin( I! t. g# j% c4 K+ c9 R0 x
*/
# V& v# w3 }5 C4 S UF_DISP_conehead(UF_DISP_ALL_ACTIVE_VIEWS,
) ^" Y6 k3 s, N3 `7 A% D) k2 t pt2, vect1, 0);
- g2 o" Y- I2 W" D s: g% I UF_DISP_labeled_conehead(UF_DISP_ALL_ACTIVE_VIEWS,
7 R' P' p& ^' n) x5 {& P pt3, vect1, 0, "Normal");) L) W' @5 q; F' m
UF_DISP_get_conehead_attrb(&attrb);
& T3 `2 m# s& S# ?% Q /* Use color index three */6 w- d9 @/ _ r' N' w
attrb.color = 3;# f8 L5 W4 E; f5 T6 L% P% e) ~
/* Update the current attribute settings */
, m9 ]/ i) U4 c8 H$ f" ` UF_DISP_set_conehead_attrb(&attrb);: _4 J) E7 j, W6 P
printf("\nCurrent conhead display settings:\n");/ l: c( V6 |, O, q8 N
printf("\tLength of Staff: %g\n", attrb.staff_length);
' \' {7 z# m2 i printf("\tTotal Length: %g\n", attrb.total_length);" \' z( I; O8 _' O! G, Q
printf("\tRadius of Cone Base: %g\n", attrb.cone_radius);9 H0 g/ {" O1 U+ r+ C9 {8 C
printf("\TColor Index: %d\n", attrb.color);
; c4 u: j$ @0 r" t N printf("\tFont Index: %d\n", attrb.font);) J$ z, J _$ l( J9 Q
printf("\tDensity Index: %d\n", attrb.density);( ?4 M& |0 k, i" v# K
}2 ?4 A' K! }# b2 B% k
* M! j: [/ N/ r/ C. }0 L
|
|