NodeOn/NodeOff

New Message Reply Date view Thread view Subject view Author view

Larry Ramey (ramey++at++ccpo.odu.edu)
Fri, 26 Feb 1999 11:05:24 -0500


pf->hello()

larry->ventFrusration()
larry->deepBeath()
for(count=0;count < 10; ++count)

OK, I feel better.

In my attempt to isolate the performer code in our app, so we can switch
to Faranheight quickly, I have developed a scene graph manager. It
should be able to turn a node on or off. Works great. Except for
pfLightSource. Here is the source code....

void sgManager::nodeOff(char* name){
        pfNode* thisNode =
(pfNode*)factory->scene->find(name,pfNode::getClassType());
        if(thisNode==NULL){
                cout<<" Node named "<<name<<" not found. sgManager::nodeOff\n";
                return;
        }
        thisNode->setTravMask( PFTRAV_DRAW, 0x0, PFTRAV_DESCEND, PF_SET );
}

The problem is whenever I try to turn a light source off, I get the node
not found message. I KNOW the name is right (printed it, watched it
cvd,ect).... The man page says pfLightSource isA pfNode.... what is
going on??

Here is them execution code:

sgManager::insertCoordDef("coord1",pos,scale,c);
sgManager::nodeOff("larry");

the light was created with:
{
masterChan = pfCAVEMasterChan();
scene = new pfScene;
scene->setName("scene");
navDCS = new pfDCS;
navDCS->setName("nav");
masterGeoState = new pfGeoState;
masterGeoState->setMode(PFSTATE_ENLIGHTING, PF_ON);
masterGeoState->setMode(PFSTATE_CULLFACE, PFCF_OFF);
scene->setGState(masterGeoState);
scene->addChild(navDCS);
pfLightSource* defaultLight= new pfLightSource;
defaultLight->setPos(6,0,11,0);
defaultLight->setAmbient(.3,.3,.3);
defaultLight->setName("larry");
scene->addChild(defaultLight);
masterChan->setScene(scene);
}

-- 
---------------------------------------------------------------
Larry E. Ramey  ramey++at++ccpo.odu.edu 
757-683-6276(office)   757-683-5335 (CAVE)
"Count the heads man." - Zaphod Bebblebrox
"Won't weigh you down, with good intentions" -Sarah McLachlan

New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Fri Feb 26 1999 - 08:05:43 PST

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