Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: OpenInventor: SoTimerSensor callback problem

  1. #1
    Junior Member Regular Contributor
    Join Date
    May 2003
    Posts
    104

    OpenInventor: SoTimerSensor callback problem

    hi!

    i'm trying to get to work the SoTimerSensor callback function in MFC dll, but it does't work well, i.e. when i set up all the stuff for the SoTimerObject, it then doesn't call that function I specified in the setFunction method.

    the code looks as follows:

    SoTimerSensor* timerSens = new SoTimerSensor;

    static void sensCallback(void *data, SoSensor *);

    void SomeClass::someMember()
    {
    UpdateData(TRUE);
    timerSens->setFunction(sensCallback);
    timerSens->unschedule();
    timerSens->setBaseTime(SbTime(0.0));
    timerSens->setInterval(SbTime(0.01));
    timerSens->schedule();
    double basetime = timerSens->getBaseTime().getValue();
    double interval = timerSens->getInterval().getValue();
    SoSensorCB *c_func = timerSens->getFunction();
    BOOL isSched = timerSens->isScheduled();
    }

    static void sensCallback(void *data, SoSensor *)
    {
    //some code to execute
    }


    What's the problem?

    Thanx!

  2. #2
    Junior Member Regular Contributor
    Join Date
    May 2003
    Posts
    104

    Re: OpenInventor: SoTimerSensor callback problem

    OK, i've done that thing with SetTimer. Works better -- rather than duzznt

    But the Q still remains.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •