|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
% s# G$ F# G( D; k8 j' n
/ c9 K. Z7 f+ i; D5 A
6 g/ a7 T7 H' N. ?3 Y/ N5 ]6 {
X& g6 |$ V0 F9 m3 r这功能其实很好用,比如选择面,自动显示面的法线等等。
! k' c4 |7 g! ~, j, r. m% I* G; ^( Z" a$ G: C* }. a, m& c
static void do_UGopen_api(void)# h# [5 d( h- d* H) u! b
{
2 X' A! J9 r8 C4 U! H: Y7 ` double pt1[3] = {0.0, 0.0, 0.0};! |+ g$ E+ U9 T8 p* ~
double pt2[3] = {2.0, 2.0, 2.0};
* P8 i M! o/ g- d- I* d double pt3[3] = {-2.0,-2.0,-2.0};
p- C/ l% L. \ double vect1[3] = {1.0, 1.0, 1.0};
* E1 d9 R# B! W9 L9 V# P UF_DISP_conehead_attrb_s attrb;) H K3 I9 j' _; }7 m0 m2 I2 ?0 E
UF_DISP_conehead(UF_DISP_ALL_ACTIVE_VIEWS,
, X0 q4 J& j4 \; D pt1, vect1, 1);* [7 A5 G8 b( B, X
/* Example to draw the vector with the base of its staff/ x9 q$ h+ p. x! n9 ]2 L
anchored at the origin so that the vector appears to point+ x( c q: y, |
away from the origin- ?8 C3 N2 w2 S# |' c. w
*/
# |. j! {% U6 _" q2 L; ? UF_DISP_conehead(UF_DISP_ALL_ACTIVE_VIEWS,+ C/ w! s K1 h+ R: n5 H/ L4 q
pt2, vect1, 0);( ~6 {1 y/ p5 A$ t+ H
UF_DISP_labeled_conehead(UF_DISP_ALL_ACTIVE_VIEWS,
; |- [( }- Y4 f5 m0 A pt3, vect1, 0, "Normal");& E5 b# {) I- }( J
UF_DISP_get_conehead_attrb(&attrb);5 g$ `3 L0 T% e+ H0 R
/* Use color index three */
1 \" t% \( \( ^, o0 s attrb.color = 3;, a! g, a. u! o8 Q
/* Update the current attribute settings */8 s" `) h& t8 o0 O+ W
UF_DISP_set_conehead_attrb(&attrb);
* w: d# w* o/ ] printf("\nCurrent conhead display settings:\n");
' x* [, j% }$ t! m+ E1 p5 Y' b printf("\tLength of Staff: %g\n", attrb.staff_length);4 i- {, Q; v/ c. _ G' M E3 k
printf("\tTotal Length: %g\n", attrb.total_length);
1 {3 b* G& }! \4 N printf("\tRadius of Cone Base: %g\n", attrb.cone_radius);- k2 O8 |" h% n
printf("\TColor Index: %d\n", attrb.color);( @! A: e1 @& _1 D/ N( [9 V8 V! J
printf("\tFont Index: %d\n", attrb.font);
$ W' [% ~$ X9 u ~3 o& N# N$ O printf("\tDensity Index: %d\n", attrb.density);
2 f5 ^* _ D1 E1 D5 [7 h}! u0 S. M8 j5 }" L& z
5 i$ a1 x0 N' h6 \$ j4 r |
|