Andrew Shein (ashein++at++orac.boston.sgi.com)
Wed, 7 Aug 1996 22:16:38 -0400
befor things get going ...
picker = new pfiPick();
picker->addChan( channel );
picker->setupChans();
and in the main while loop
if( mouse.flags & PFUDEV_MOUSE_LEFT_DOWN )
{
int hit_count;
hit_count = picker->doPick( mouse.xpos, mouse.ypos );
if( hit_count )
{
pfNode *node;
pfNode *parent;
node = picker->getNode();
if( node != NULL )
{
cout << "node = " << node << "\n" << flush;
cout << node->getName() << "\n" << flush;
do
{
parent = (pfNode *)node->getParent(0);
if( parent != NULL )
{
if( parent->isOfType( parent, pfDCS::getClassType() ) )
{
cout << "parent = " << parent << " name= " <<
parent->getName() << "\n" << flush;
picked_dcs = (pfDCS *)parent;
break;
}
node = parent;
}
} while( parent != NULL );
}
} // end num_hits != 0
} // end if PDEV_MOUSE_LEFT_DOWN
--
Andrew Shein SE Stout email: ashein++at++boston.sgi.com
Silicon Graphics Inc. phone: (508) 562 - 4800
1 Cabot Road fax: (508) 562 - 4755
Hudson, MA 01749 vmail: 59688
=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
Submissions: info-performer++at++sgi.com
Admin. requests: info-performer-request++at++sgi.com
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:53:19 PDT