From: Lawrence E Bertoldi (lberto++at++adelphia.net)
Date: 02/20/2003 05:20:05
Here is a bit more in line!
See Ya ~;-}>
lberto++at++adelphia
Simagery Inc.
Goncalo Carvalho wrote:
> Try something in the likes of:
>
pfGeoSet * Some_Tree(pfNode *node)
{
pfGeoSet *gset;
pfGeoState *gstate;
// it is probably a good idea to check that your node pointer is not NULL
> if( node->isOfType( pfGeode::getClassType() ) )
> {
int cnt = ((pfGeode *)node)->getNumGSets();
for (int i=0;i<cnt;i++)
{
gset = ((pfGroup *)node)->getGSet(i);
// you'll want to check to insure that the node is the one you
want
//then get what ever it is you want, like
gstate = gset->getGState();
if (gset is the one I want)
return gset;
}
> }
> else
> if( node->isOfType( pfGroup::getClassType() ) )
> {
> // Recurse on children
>
> for(int i = 0; i < ( (pfGroup *)node )->getNumChildren(); i++)
> Some_Tree( ((pfGroup *)node)->getChild(i) );
> }
> }
>
> Francesco Chionna wrote:
> >
> > 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);
> > }
> > .....
>
> Goncalo
>
> --
> Goncalo Carvalho
> Digital Design Studio - Glasgow School of Art
> House for an Art Lover - Bellahouston Park
> 10 Dumbreck Road
> Glasgow G41 5BW
> United Kingdom
>
> Tel: +44 (0) 141 353 4616
> Fax: +44 (0) 141 353 4422
> Mobile: +44 (0) 7766 295867
> mailto:g.carvalho++at++gsa.ac.uk
>
> -----------------------------------------------------------------------
> 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
> -----------------------------------------------------------------------
This archive was generated by hypermail 2b29 : Thu Feb 20 2003 - 05:25:26 PST