about pfGetNodeName

New Message Reply Date view Thread view Subject view Author view

czg++at++iname.com
Sun, 07 Sep 1997 00:23:13 -0700


Hello pfFriends,
I build a scene database using Multigen. The groups and objects in the
database all have names. I use pfGetNodeName to get the names. But only
the names of the groups can be read. What's wrong?

Thanks

Cao Zhigang

===================================
E-Mail: flysiml++at++public.bta.net.cn
Tel: (8610)68428861-340
Fax: (8610)68424844
===================================

bellow are the code:

static int
PrintNodeName(pfuTraverser *trav)
{
    pfNode *node = trav->node;

    fprintf(outFP, "\nName: %s type: %s address: 0x%p\n",
            pfGetNodeName(node), pfGetTypeName((pfObject *)node), node);

    return PFTRAV_CONT;
}

void
InitScene(void)
{
    int loaded = 0;
    pfScene *scene = NULL;

    pfuTraverser trav;
     
    /* Read in any databases specified on cmd line */
    ViewState->scene = scene = pfNewScene();

    /* Read all files mentioned on command line */
    loaded = initSceneGraph(scene);

    /* Print out nodes Name */
    if (!(outFP = fopen("aaa.out", "w"))) {
        pfNotify(PFNFY_FATAL, PFNFY_RESOURCE,
                 "pfuTravPrintNodes: can't open aaa.out for write");
        exit(0);
    }

    trav.preFunc = PrintNodeName;
    trav.postFunc = NULL;
    trav.mode = PFUTRAV_SW_ALL | PFUTRAV_LOD_ALL | PFUTRAV_SEQ_ALL;
    trav.mstack = NULL;
    trav.data = NULL;
    trav.node = NULL;
    trav.depth = 0;
     
    pfuTraverse((pfNode *)scene, &trav);

}
=======================================================================
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:55:53 PDT

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