Re: [info-performer] geoset manipulate vertex

New Message Reply Date view Thread view Subject view Author view

From: c.mottram (ucftchr++at++ucl.ac.uk)
Date: 02/19/2003 02:34:50


oops yes you've got to do something like
this...
pfuTraverser trav;
pfuInitTraverser(&trav);
trav.preFunc = findgeode;
pfuTraverse(r,&trav);

where "findgeode" is of the form
int findgeode(pfuTraverser *trav)
{
        if (trav->node->isOfType(pfGeode::getClassType()))
        {
                pfGeode *model1 = (pfGeode *)trav->node;
                int variabile;
                ushort *icoords, *inorms;
                fVec3 *coords, *ncoords, *norms, *nnorms;
                variabile=model1->getNumGSets();
// there are 6 gset
                pfGeoSet *gset=model1->getGSet (1);
                gset->getAttrLists(PFGS_COORD3, (void**)&coords, &icoords);

        }
}
At 19:09 18/02/2003 +0100, you wrote:
>Hi,
>
>Quoting Francesco Chionna <francesco.chionna++at++cetma.brindisi.enea.it>:
>> > >I would like to manipulate the vertex inside a pfGeoSet but always a
>> > >error message compare on my screen.
>> > >This is the code :
>> > >
>> > > pfGeode *model1 =(pfGeode *) pfdLoadFile("cow.obj");
>
>The node returned by pfdLoadFile() isn't necessarily a pfGeode. It's more
likely
>to be a pfGroup with a pfGeode child. Try to check that and traverse the tree
>downwards until you meet a pfGeode.
>
>> > > int variabile;
>> > > ushort *icoords, *inorms;
>> > > pfVec3 *coords, *ncoords, *norms, *nnorms;
>> > > variabile=model1->getNumGSets();
>> > >// there are 6 gset
>> > > pfGeoSet *gset=model1->getGSet (1);
>> > > gset->getAttrLists(PFGS_COORD3, (void**)&coords, &icoords);
>
>-----------------------------------------------------------------------
> List Archives, Info, FAQ: http://www.sgi.com/software/performer/
> Open Development Project: http://oss.sgi.com/projects/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 2b29 : Wed Feb 19 2003 - 02:36:22 PST

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