From: Denis Mohnhaupt (demohn++at++gmx.de)
Date: 09/06/2004 09:00:08
From: "Paolo Farinelli" <paolo++at++sgi.com>
> Let me know if you need further assistance.
Thanks for the answer Paolo and Alex, I just skipped the pick() call and use
it via update().
Now it compiles but I dont get any picking feedback, so I must do something
wrong.
I implemented it similar to sample4. All I want is, whenever I receive a
MFC-Message about an left doubleclick within my scene window,
I want to get the according geometry node (actually the dcs node). No
interaction, focus etc.
So here is what I do:
###at Init:
m_pPicker = new pfvMousePicker;
m_pPicker->setNodeDataSlot("PICKER");
m_pPicker->setChannel(channel_);
m_pPicker->setState(PFPICKER_FOCUS_EVENT, NULL, NULL);
###when I insert a new object into the scene:
pSOI = new SceneObjInteractor(); //my own interactor class, mostly the same
as in sample 4
pSOI->node = pDCS; //i dont know if this is redundant according to the next
line
pSOI->nodeSetup(pDCS, m_pPicker);
###then when i receive a left mousebutton dblclick message:
pfvInteractor* piatest;
m_pPicker->update(); //btw i also call m_pPicker->update() every frame
m_pPicker->getPickResults(&piatest);
int id = -1;
if(piatest)
{
id = (int) ((SceneObjInteractor*)pia)->GetId(); //memberfunction of my
interactor class
}
m_dlgLibrary.SelectSceneObjPerID(id);
and here, even when i am right before a huge object and doubleclick,
m_pPicker->getPickResults(&piatest); always delivers piatest == NULL;
furthermore i have breakpoints in each memberfunction of my interactor
class, except of the cunstructor, none is ever called
what did i miss?
thnx in advance
Denis
P.S. btw there is a typo in pfMousePicker.h in the #ifndef line
This archive was generated by hypermail 2b29 : Mon Sep 06 2004 - 09:01:25 PDT