Re: POinter to coordinate list

New Message Reply Date view Thread view Subject view Author view

Brian Furtaw (brian++at++sgi.com)
Tue, 14 Jan 1997 10:32:46 -0500


You can use the getAttrLists method of pfGeoSet which gives you a pointer to
the desired data if you change the information the pointer is pointing to it
will cahnge in the scene. If you are using a multiprocess model for performer
(APP_CULL_DRAW) you will want to use pfCycleBuffer's for the data you are going
to update in the pfGeoSet.

Here is some sample code I put into my updateSim() routine to generate a
dynamic surface.

...
    static pfGeoSet *ocean;

    if(doOnce) {
       doOnce = False;
       pfGeode *temp = (pfGeode *)
               ViewState->scene->find("virtOcean", pfGeode::getClassType());
       ocean = temp->getGSet(0);

...
    }
...

#ifdef CYCLEBUFFERS
    pfCycleBuffer *coords;
#else
    pfVec3 *coords;
#endif
    pfVec3 *norms;
    ushort *n_ilist;
    ushort *vertexlist;
    ocean->getAttrLists(PFGS_COORD3, (void **)&coords, &vertexlist);
    ocean->getAttrLists(PFGS_NORMAL3, (void **)&norms, &n_ilist);

Brian

On Jan 14, 9:12am, Ming Wah wrote:
> Subject: POinter to coordinate list
>
> Hi all,
> Does anyone know how to query a GEoSet and put a pointer to the
> list of coordinates? Can these coordinates be changed during simulation
> (update of position)?
>
>
> THanks!!!!
>
> Jon
>
>
> =======================================================================
> List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com
>-- End of excerpt from Ming Wah

-- 
o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o

Brian Furtaw (brian++at++sgi.com) VisSim Technical Consultant 12200-G Plum Orchard Drive Office: (301)572-3293 Fax: (301)872-3293 Silver Spring, Maryland 20904 OpenGL/ImageVision/OpenInventor/Performer ======================================================================= List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/ Submissions: info-performer++at++sgi.com Admin. requests: info-performer-request++at++sgi.com


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:54:20 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.