|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
. D9 l8 L* |' d& \
! n3 H1 X7 \# _2 a" x0 B- i$ E' \4 M3 H) @ F
* i. d& U0 f6 `( M% l- P
这功能其实很好用,比如选择面,自动显示面的法线等等。; C5 f, B: N- s0 U8 A
! v w' I/ g* i) o; u/ E
static void do_UGopen_api(void)
# w, u8 w- c# W{
' c9 X! J' k0 W double pt1[3] = {0.0, 0.0, 0.0};- F2 _# L6 z# T- g
double pt2[3] = {2.0, 2.0, 2.0};
" P! S! B- c! s) C6 ^8 z9 c- K double pt3[3] = {-2.0,-2.0,-2.0};. k5 b( _2 X. B) S; ^7 P
double vect1[3] = {1.0, 1.0, 1.0};
( P4 E: A2 ]. ~% H( F: ?4 ?+ ^ UF_DISP_conehead_attrb_s attrb;4 Z. f7 P9 |" S. L- z' F
UF_DISP_conehead(UF_DISP_ALL_ACTIVE_VIEWS, }' t4 s5 d4 a7 |( W: N- P
pt1, vect1, 1);" l8 B1 q1 f9 Y4 u- A1 ^
/* Example to draw the vector with the base of its staff
/ ^$ u y6 ], f7 n" @- @3 v anchored at the origin so that the vector appears to point
7 i6 V; j/ r9 g8 g& ~. h6 g away from the origin6 G* S, b" I0 J( ^5 |% \, T( F2 i
*/3 z$ V/ r& a6 V! N; r
UF_DISP_conehead(UF_DISP_ALL_ACTIVE_VIEWS,
]- E5 E0 X- u0 a% y- w/ P8 n( g4 u pt2, vect1, 0);# g \* |! p) y
UF_DISP_labeled_conehead(UF_DISP_ALL_ACTIVE_VIEWS,
( g r- W. k7 P: Z+ R7 Q, u9 L: w pt3, vect1, 0, "Normal");
7 J" U( Y' O# O2 u9 t UF_DISP_get_conehead_attrb(&attrb);, X' G: z# Y+ N5 T0 ^1 e
/* Use color index three */
" D* t" q G+ @( T attrb.color = 3;- G' [. J9 e8 V3 ~
/* Update the current attribute settings */- u/ l5 T' \% E2 ^% l) N: [1 n$ ]
UF_DISP_set_conehead_attrb(&attrb);/ U; a9 ~* `, K" M/ @
printf("\nCurrent conhead display settings:\n");3 r1 y6 _* D0 F8 V/ G
printf("\tLength of Staff: %g\n", attrb.staff_length);
% Q- |' s n& x O* O printf("\tTotal Length: %g\n", attrb.total_length);" g! i1 |7 ~( l3 v0 w
printf("\tRadius of Cone Base: %g\n", attrb.cone_radius);
7 N7 ?% ?" d9 W0 r$ ? x printf("\TColor Index: %d\n", attrb.color);' v" l+ Y# n# D
printf("\tFont Index: %d\n", attrb.font);
; Z' T, u, ?+ v9 t4 D }* H printf("\tDensity Index: %d\n", attrb.density);. A- [& O9 p+ w8 w7 i3 }7 z( @
}
; ~2 p. d9 m/ {) ^+ s3 h( L* y: t8 z) {& `! S
|
|