|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
% s; q) H/ {: Z
: ~: I0 m! S) r, ?3 h. E; w$ a& u( A# p8 e8 a* a
$ G; z( h0 {8 c' P3 ~ r% y& l这功能其实很好用,比如选择面,自动显示面的法线等等。
7 G; i% ?0 s# H" T' D: ~
u! k. X6 z8 t% }, Astatic void do_UGopen_api(void)
{; [! r! g. W( ^& R{0 O- P/ `7 p7 G
double pt1[3] = {0.0, 0.0, 0.0};! s' J/ s/ Y6 j( G8 K4 i; ]
double pt2[3] = {2.0, 2.0, 2.0};
) v- Y% c7 c' D J/ B double pt3[3] = {-2.0,-2.0,-2.0};. ~8 @& e i* H
double vect1[3] = {1.0, 1.0, 1.0};8 b- |$ p. W) b7 E/ U
UF_DISP_conehead_attrb_s attrb;
Y# h4 s. s( j/ ]( P UF_DISP_conehead(UF_DISP_ALL_ACTIVE_VIEWS,5 n) Y) I. u& z# Z, i9 A2 Y! V% y
pt1, vect1, 1);
# K2 b( X }' p% u /* Example to draw the vector with the base of its staff
$ j. k* Y* w+ d anchored at the origin so that the vector appears to point7 J+ q3 _" B- @, u' N; }: J
away from the origin
, E% ]8 q0 O) Q! G */" V4 V, f2 @5 v* g+ N; b$ c7 D
UF_DISP_conehead(UF_DISP_ALL_ACTIVE_VIEWS,
) l8 Q6 e6 m C! F6 ? pt2, vect1, 0);+ ?4 E+ ~8 v+ R: v2 i' p
UF_DISP_labeled_conehead(UF_DISP_ALL_ACTIVE_VIEWS,
w& Z0 g8 _* L1 _ pt3, vect1, 0, "Normal");$ J) M5 B/ a! M6 Y; E
UF_DISP_get_conehead_attrb(&attrb);
0 M2 v- `* ?" G' k8 G& y% b /* Use color index three */5 f# i' u2 I: L, m
attrb.color = 3;; O, Z+ E2 X1 J/ q C( C# Z" P
/* Update the current attribute settings */
! b" \% C( i# e1 Y7 o+ Y! ~0 h UF_DISP_set_conehead_attrb(&attrb);4 a. }2 j# Q' W3 N+ ?9 X9 m }
printf("\nCurrent conhead display settings:\n");5 h! L" s$ m' ^
printf("\tLength of Staff: %g\n", attrb.staff_length);
: H6 T% S6 ?8 U/ } v printf("\tTotal Length: %g\n", attrb.total_length);
) [1 k6 N! m- ^ ~0 b; v printf("\tRadius of Cone Base: %g\n", attrb.cone_radius);
% q3 D( O: T$ @+ b0 X printf("\TColor Index: %d\n", attrb.color);9 I6 ?3 h2 |( ~& T% w! t
printf("\tFont Index: %d\n", attrb.font);4 c/ u& D4 A( s4 C6 @! n& T' d2 B
printf("\tDensity Index: %d\n", attrb.density);/ p/ s, I# |$ q4 n' H4 f
}6 B) t) o2 @6 b( d( g$ U$ o
0 U# m& |- A. c6 m) w' i |
|