Re: about distinguish nodes

New Message Reply Date view Thread view Subject view Author view

Clive Harding (clive++at++reading.sgi.com)
Tue, 26 Aug 1997 19:06:53 +0100


You can recover most of the information from the multigen nodes
(in OpenFlight) using the register node mechanism which is
REALLY well documented. You can see which bits you can get out
of your Groups, Lods, Objects etc by looking at the pfflt header
file. The following code fragment should help. Sorry if this is
spam since I've only seen a reply to a mail. Seems that the
performer-info stuff just disappears from my inbox ;)

#include <pfdb/pfflt.h>

static void *regFuncPtr = registerFunc;

void
registerFunc ( pfNode *node, int mgOp, int *cbs, COMMENTcb *cbcom, void
*userData)
{
char text[80];
short id;

    if(cbcom)
    {
        if(cbcom->text[0])
        {
            // You can look at the comment field of a
            // Group, Object etc. etc. etc.
        }
    }
    switch(mgOp)
    {
        case CB_GROUP: someval = ((GROUPcb *)cbs)->special2;
                       break;
        case CB_LOD: someval = ((LODcb *)cbs)->special2;
                       break;
        case CB_OBJECT:someval = ((OBJcb *)cbs)->special2;
                       break;
        case CB_DOF: getDofInfo((DOFcb *)cbs);
                       break;
        case ........ Ad Nauseam.
    }
         
    if(someval)
    {
        someFunction(node); // Actually do stuff to the pfNode.
    }
         
}

// Then somewhere after pfConfig()
     
    // Initialise the loader callback
    pfdConverterAttr(".flt", PFFLT_REGISTER_NODE, &regFuncPtr);

Cheers,
Clive.

-- 
________________________________________________________________
Clive Harding, Software Support Group, Silicon Graphics UK Ltd.       
Forum 1, Station Road, Theale, Reading, UK, RG7 4RA. 
Tel: 01189 307736 Fax: 01189 307553 Email: clive++at++reading.sgi.com

"Si non confectus, non reficiat." ======================================================================= 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:47 PDT

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