|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
( s) Z6 p% ~! P1 g) a! B
; P! r+ F% x# G) |5 p1 ~ s. G
5 [8 H# M4 \9 {0 |
这功能其实很好用,比如选择面,自动显示面的法线等等。
* m) ?2 B9 z3 L( z* ^- G2 i$ @) ]4 M9 {: b5 u% L' P
static void do_UGopen_api(void)
6 @% y' H; v ~7 Z! C{
" K: g! F3 C* k, P double pt1[3] = {0.0, 0.0, 0.0};
. c: Z T2 M4 a9 [8 j- H# y' K double pt2[3] = {2.0, 2.0, 2.0};
! [; C% j9 ?2 q* Z9 O% ? double pt3[3] = {-2.0,-2.0,-2.0};
- v6 w* a+ _8 T/ u2 p% R) T1 G double vect1[3] = {1.0, 1.0, 1.0};! N0 B! g9 O' D; I$ f
UF_DISP_conehead_attrb_s attrb;+ ~- U) R* S; Y
UF_DISP_conehead(UF_DISP_ALL_ACTIVE_VIEWS,. K* i* H! |* ]! u% ?) m# J
pt1, vect1, 1);
+ o, ~* J7 A- p3 | /* Example to draw the vector with the base of its staff' b7 t3 q1 s; f" X" V$ X* h8 w
anchored at the origin so that the vector appears to point
/ C: P. e* L0 h) H away from the origin, P: E5 g) H& y
*/
8 J* B, n% I5 `3 Y# u6 f/ F+ a; _' g' e UF_DISP_conehead(UF_DISP_ALL_ACTIVE_VIEWS,4 @6 z# } L% l: F- _0 s2 Q
pt2, vect1, 0);! i. K6 C+ q" V7 S+ W& J) C1 K
UF_DISP_labeled_conehead(UF_DISP_ALL_ACTIVE_VIEWS,7 b% b& g. ]7 B. [
pt3, vect1, 0, "Normal");2 [# J% `- {; W6 |' l
UF_DISP_get_conehead_attrb(&attrb);; N& j- A* x- h7 Z0 g O
/* Use color index three */4 @0 P8 p6 ]# W0 A' m: s* J* c
attrb.color = 3;
. v0 J! E0 \1 a* S /* Update the current attribute settings */7 R0 _; E4 X) v9 S% ]) b Y
UF_DISP_set_conehead_attrb(&attrb);
, W( W9 W; c% ~9 o printf("\nCurrent conhead display settings:\n");4 I* F% \, T; C; c% w& p
printf("\tLength of Staff: %g\n", attrb.staff_length); M6 j; T2 Y* x% B$ c
printf("\tTotal Length: %g\n", attrb.total_length);
/ `1 j4 p9 i: B1 {' c- t printf("\tRadius of Cone Base: %g\n", attrb.cone_radius);
# l9 m: K: _9 O" q# S4 X printf("\TColor Index: %d\n", attrb.color);
. r/ I4 C7 C* A% E3 d$ D printf("\tFont Index: %d\n", attrb.font);* G) M2 g6 I" l4 ]0 W2 A
printf("\tDensity Index: %d\n", attrb.density);
8 k. w0 b b( W( w( C}' m0 _# ~' a4 x3 V
$ C' z' d) a" L, y' X |
|