info-inventor
[Top] [All Lists]

Setpickfiltercallback and events handling

To: info-inventor@xxxxxxxxxxx
Subject: Setpickfiltercallback and events handling
From: lydia coin <lydia_coin3d@xxxxxxxx>
Date: Sun, 10 Nov 2002 01:29:48 +0100 (CET)
Sender: info-inventor-bounce@xxxxxxxxxxx

Hi folks

I'm using VC++ under windows and coin3D

I have the following code

SoSeparator *rootPoly=new SoSeparator;   rootPoly->ref();

 PtData->Callback=new SoEventCallback();  

 PtData->Callback->addEventCallback(SoKeyboardEvent::getClassTypeId(),callbackChgKey,PtData);
 PtData->Callback->addEventCallback(SoMouseButtonEvent::getClassTypeId(),callbackChgButton,PtData);

 SoSelection *sel = new SoSelection;  


 sel->ref();
 sel->policy.setValue(SoSelection::TOGGLE);
 sel->setPickFilterCallback(pickFilterCB,(void*)PtData, false);

sel->addChild(PtData->rootPts);
 sel->addChild(color);
 sel->addChild(rootPolyLine);
 sel->addChild(PtData->Callback);

rootPoly->addChild(sel);

My problem is that when I pick up the window, the function callbackChgButton() is called twice ( onmce for button up and once for button down) then the function pickFilterCB() is called.

How to solve this problem so that the function pickFilterCB() is called before the second call of callbackChgButton()

I can't find the solution and any help will be appreciated

 



Yahoo! Mail -- Une adresse @yahoo.fr gratuite et en français !
<Prev in Thread] Current Thread [Next in Thread>
  • Setpickfiltercallback and events handling, lydia coin <=