GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  SOONESHOTSENSOR (3)

NAME

SoOneShotSensor — sensor for one-time only callbacks

CONTENTS

Inherits From
Synopsis
Description
Methods
See Also

INHERITS FROM

SoSensor > SoDelayQueueSensor > SoOneShotSensor

SYNOPSIS

#include <Inventor/sensors/SoOneShotSensor.h>

Methods from class SoOneShotSensor:

       
                    
                     SoOneShotSensor()    
   
                    
                     SoOneShotSensor(SoSensorCB *func, void *data)    
   
                    
                     ~SoOneShotSensor()

Methods from class SoDelayQueueSensor:

    void    
                    
void                 setPriority(uint32_t pri)    
uint32_t    
                    
uint32_t             getPriority()    
static uint32_t    
                    
static uint32_t      getDefaultPriority()    
virtual void    
                    
virtual void         schedule()    
virtual void    
                    
virtual void         unschedule()    
virtual SbBool    
                    
virtual SbBool       isScheduled()

Methods from class SoSensor:

    void    
                    
void                 setFunction(SoSensorCB *callbackFunction)    
SoSensorCB *    
                    
SoSensorCB *         getFunction() const    
void    
                    
void                 setData(void *callbackData)    
void *    
                    
void *               getData() const

DESCRIPTION

A one-shot sensor is triggered once after it is scheduled, when the delay queue is processed. Like all delay queue sensors, one-shot sensors with a non-zero priority are just added to the delay queue when scheduled; if they are scheduled again before the delay queue is processed nothing happens, and they are guaranteed to be called only once when the delay queue is processed. For example, a one-shot sensor whose callback function redraws the scene might be scheduled whenever the scene graph changes and whenever a window-system event reporting that the window changed size occurs. By using a one-shot, the scene will only be redrawn once even if a window-changed-size event occurs just after the scene graph is modified (or if several window-changed-size events occur in a row).

Calling schedule() in the callback function is a useful way of getting something to happen repeatedly as often as possible, while still handling events and timeouts.

A priority 0 one-shot sensor isn’t very useful, since scheduling it is exactly the same as directly calling its callback function.

METHODS

       
                    
                     SoOneShotSensor()    
   
                    
                     SoOneShotSensor(SoSensorCB *func, void *data)
Creation methods. The second method takes the callback function and data to be called when the sensor is triggered.

       
                    
                     ~SoOneShotSensor()
Destroys the sensor, freeing up any memory associated with it after unscheduling it.

SEE ALSO

SoIdleSensor, SoDelayQueueSensor

Search for    or go to Top of page |  Section 3 |  Main Index


SOONESHOTSENSOR(3IV) (-->)

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.