Re: [info-performer] geoset manipulate vertex

New Message Reply Date view Thread view Subject view Author view

From: Francesco Chionna (francesco.chionna++at++cetma.brindisi.enea.it)
Date: 02/19/2003 07:09:58


Hi Mottran,
i tried your code but with the same result..:(
int findgeode(pfuTraverser *trav)
{
        if (trav->node->isOfType(pfGeode::getClassType()))
        {
                pfGeode *model1 = (pfGeode *)trav->node;
                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);

        }
return(0);
}
.....
I insert in my main:

    pfuTraverser trav;
    pfuInitTraverser(&trav);
    trav.preFunc = findgeode;
    pfScene *scene = new pfScene;
    scene->addChild(model1);
    pfuTraverse(scene,&trav);
this is the last line of code that execute after:
Unhandled exception in file.exe(LIBPF.DLL) Access Violation (always this
error appear when i want to access in a node)
......
I use Performer 3 under Windows 2000 Professional.
Once load my cow.obj i would like to morph some coords.how can access to
geoset's coords in order to mopph?
any sample?idea?
Thanks a lot .
----- Original Message -----
From: "c.mottram" <ucftchr++at++ucl.ac.uk>
To: "Francesco Chionna" <francesco.chionna++at++cetma.brindisi.enea.it>
Cc: <info-performer++at++sgi.com>
Sent: Wednesday, February 19, 2003 11:34 AM
Subject: Re: [info-performer] geoset manipulate vertex

> 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 - 07:16:51 PST

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