home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / graphics / 8101 < prev    next >
Encoding:
Internet Message Format  |  1992-07-23  |  1.6 KB

  1. Path: sparky!uunet!dtix!darwin.sura.net!jvnc.net!nuscc!solomon.technet.sg!spec01
  2. From: spec01@solomon.technet.sg (Quak Wan Ling)
  3. Newsgroups: comp.graphics
  4. Subject: PHIGS Question
  5. Message-ID: <1992Jul24.033521.6861@nuscc.nus.sg>
  6. Date: 24 Jul 92 03:35:21 GMT
  7. Sender: usenet@nuscc.nus.sg
  8. Organization: National University of Singapore
  9. Lines: 40
  10.  
  11.  
  12.    hi .. I need to shade and unshade some objects quickly in a phigs
  13.    application. I thought of using the pset_int_ind(set interior index)
  14.    pset_int_rep(set interior representation) and pset_indiv_asf(set
  15.    individual aspect flag) functions to achieve the effect.
  16.    However, due to some unknow reasons(which might be my
  17.    misinterpretation or mebber the phigs library bug) I could not
  18.    achieve what I want.  Attach is a fragment of codes of what I did.
  19.  
  20.     Pint_bundl rep;
  21.     Ppoint3 *pt1;
  22.  
  23.     pt1 = (Ppoint3 *)malloc(4*sizeof(Ppoint3));
  24.     pt1[0].x = pt1[0].y = pt1[0].z = 0.0;
  25.     pt1[1].x = 0.3; pt1[1].y = 0.7; pt1[1].z = 0.5;
  26.     rep.style = PSOLID;
  27.     rep.index = 1;
  28.     rep.colr = 4;
  29.     pset_int_rep(1, 3, &rep);
  30.     pinq_pred_int_rep(1, 3, &err, &orep);
  31.     printf("color : %d style : %d\n",orep.colr, orep.style);
  32.     /* Note that the style, color are not set */
  33.      ...
  34.     popst(1);
  35.     pset_indiv_asf(PINTERIOR_COLOUR_INDEX, PBUNDLED);
  36.     pset_indiv_asf(PINTERIOR_STYLE, PBUNDLED);
  37.     pset_int_ind(3);
  38.     pfill_area(4, pt);
  39.     pclst();
  40.     ppost(1,1,0.);
  41.     prst(1,1);
  42.     prqlc(1,1,&stat,&view,&pt);
  43.     pclwk(1);
  44.     pclph();
  45.  
  46.    Can any kind soul point out to me what's wrong ? Or mail me a
  47.     fragment of codes that solve the same purpose.  
  48.     Thanks in advance...
  49.  
  50.  
  51.