Accessing a Geode

New Message Reply Date view Thread view Subject view Author view

Gary Quinn (G.Quinn++at++tees.ac.uk)
Wed, 08 Oct 1997 12:53:13 +0000


Many thanks to Jason and Scott who answered
my question about accessing GeoSets from a
pfNode.

If anyone is interested...

long changeDL(pfNode *node)
{
  long numGSets = 0;
  int i;
  pfGeoSet *gset;
  pfGeoState *gstate;
  pfGeode *gnode;
   
  if (pfIsOfType(node, pfGetGroupClassType()))
  {
    /* you could do additional queries here to find out what type of
       pfGroup this node actually is. */

    for (i=0; i<pfGetNumChildren((pfGroup *) node); i++)
    {
      numGSets += changeDL(pfGetChild((pfGroup *) node, i));
    }
  }
  else
  if (pfIsOfType(node, pfGetGeodeClassType()))
  {
    gnode = (pfGeode *)node;
    numGSets = pfGetNumGSets(gnode);
    for (i=0; i < numGSets; i++)
    {
      gset = pfGetGSet(gnode, i);
      pfGSetDrawMode(gset, PFGS_COMPILE_GL, PF_ON);
    }
  }
    
  return(numGSets);
}
=======================================================================
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:56:04 PDT

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