From: Goncalo Carvalho (g.carvalho++at++gsa.ac.uk)
Date: 02/19/2003 07:44:26
Try something in the likes of:
void Some_Tree(pfNode *node)
{
int i;
if( node->isOfType( pfGeode::getClassType() ) )
{
// do something
}
else
if( node->isOfType( pfGroup::getClassType() ) )
{
// Recurse on children
for(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 KingdomTel: +44 (0) 141 353 4616 Fax: +44 (0) 141 353 4422 Mobile: +44 (0) 7766 295867 mailto:g.carvalho++at++gsa.ac.uk
This archive was generated by hypermail 2b29 : Wed Feb 19 2003 - 07:49:21 PST