SoCallback(3IV)

SoCallback (SoCB) - provides custom behavior during actions

As shipped in IRIX 6.5.30. Added in IRIX 6.5.22.

NAME
     SoCallback (SoCB) - provides custom behavior during actions

INHERITS FROM
     SoBase > SoFieldContainer > SoNode > SoCallback

SYNOPSIS
     #include <Inventor_c/nodes/SoCallback.h>

     typedef void        SoCallbackCB(void *userData, SoAction *action)
     typedef SoCallback  SoCB

          Functions from class SoCallback:

     SoCallback *        SoCBCreate()
     void                SoCBSetCB(SoCB *this, SoCallbackCB *func, void
                              *userData = NULL)
     SoType              SoCBGetClassTypeId()

          Functions from class SoNode:

     void                SoCBSetOverride(SoCB *this, SbBool state)
     SbBool              SoCBIsOverride(const SoCB *this)
     SoNode *            SoCBCopy(const SoCB *this, SbBool copyConnections =
                              FALSE)
     SbBool              SoCBAffectsState(const SoCB *this)
     SoNode *            SoCBGetByName(const char *name)
     int                 SoCBGetByNameList(const char *name, SoNodeList *list)

          Functions from class SoFieldContainer:

     void                SoCBSetToDflts(SoCB *this)
     SbBool              SoCBHasDfltVals(const SoCB *this)
     SbBool              SoCBFldsAreEq(const SoCB *this, const
                              SoFieldContainer *fc)
     void                SoCBCopyFieldVals(SoCB *this, const SoFieldContainer
                              *fc, SbBool copyConnections = FALSE)
     SbBool              SoCBSet(SoCB *this, const char *fieldDataString)
     void                SoCBGet(SoCB *this, SbString *fieldDataString)
     int                 SoCBGetFields(const SoCB *this, SoFieldList
                              *resultList)
     SoField *           SoCBGetField(const SoCB *this, const char *fieldName)
     SbBool              SoCBGetFieldName(const SoCB *this, const SoField
                              *field, SbName *fieldName)
     SbBool              SoCBIsNotifyEnabled(const SoCB *this)
     SbBool              SoCBEnableNotify(SoCB *this, SbBool flag)

          Functions from class SoBase:

     void                SoCBRef(SoCB *this)
     void                SoCBUnref(const SoCB *this)
     void                SoCBUnrefNoDelete(const SoCB *this)
     void                SoCBTouch(SoCB *this)
     SoType              SoCBGetTypeId(const SoCB *this)
     SbBool              SoCBIsOfType(const SoCB *this, SoType type)
     void                SoCBSetName(SoCB *this, const char *name)
     SbName              SoCBGetName(const SoCB *this)


DESCRIPTION
     This node provides a general mechanism for inserting callback functions
     into a scene graph. The callback function registered with the node is
     called each time the node is traversed while performing any scene graph
     action. The callback function is passed a pointer to the action being
     performed and a user data pointer registered with the callback function.
     You can use this node to make nonstandard OpenGL calls while rendering.
     If you do, be careful not to interfere with Inventor's use of OpenGL.

     If you use a callback node for GL rendering, you should be careful to
     follow render caching rules. If your callback node can make different
     rendering calls each time it is traversed, it cannot be cached. In such a
     case, the node should invalidate any open caches, as in the following
     example:



          void
          myCallbackFunc(void *d, SoAction *action) {
              if (action->isOfType(SoGLRenderAction::getClassTypeId())) {
                              // Make my custom GL calls
                              ((MyClass *) d)->myRender();

                              // Invalidate the state so that a cache is not made
                              SoCacheElement::invalidate(action->getState());
              }
          }


FUNCTIONS
     SoCallback *        SoCBCreate()
          Creates a callback node with default settings.

     void                SoCBSetCB(SoCB *this, SoCallbackCB *func, void
                              *userData = NULL)
          Sets pointer to callback function and user data. By default, the
          function pointer in the node is NULL and does nothing.

     SoType              SoCBGetClassTypeId()
          Returns type identifier for this class.

ACTION BEHAVIOR
     SoGLRenderAction, SoBoundingBoxAction, SoPickAction
          Calls the specified callback function for all actions.


FILE FORMAT/DEFAULTS
     Callback {
     }

SEE ALSO
     SoAction, SoCallbackAction, SoEventCallback