SmallChange  1.0.0
A collection of extensions to Coin3D
Loading...
Searching...
No Matches
PickCallback Class Reference

The PickCallback class is group node with callbacks when some child is picked. More...

#include <Inventor/nodes/PickCallback.h>

Inheritance diagram for PickCallback:
SoGroup

Public Member Functions

 PickCallback (void)
 
void addCallback (void(*callback)(void *, SoPath *), void *userdata)
 
SbBool currentIsMouseDown (void) const
 
const SoPickedPointgetCurrentPickedPoint (void) const
 
SbVec2s getEventPosition (void) const
 
const SbViewportRegion & getEventViewportRegion (void) const
 
SbBool isButton1 (void) const
 
SbBool isButton2 (void) const
 
void removeCallback (void(*callback)(void *, SoPath *), void *userdata)
 

Static Public Member Functions

static void initClass (void)
 
static void setSchemeEvalFunctions (int(*scriptcb)(const char *), void(*filecb)(const char *))
 

Public Attributes

SoSFBool delayTrigger
 
SoSFVec3f objectSpacePickedPoint
 
SoSFBool onButton1
 
SoSFBool onButton2
 
SoSFBool onButton3
 
SoSFBool onMousePress
 
SoSFBool onMouseRelease
 
SoSFBool pickable
 
SoSFString schemeFile
 
SoSFString schemeScript
 
SoSFTrigger trigger
 
SoSFVec3f worldSpacePickedPoint
 

Protected Member Functions

virtual ~PickCallback ()
 
virtual void handleEvent (SoHandleEventAction *action)
 

Detailed Description

The PickCallback class is group node with callbacks when some child is picked.

It provides an easy way of adding interactivity to your scene graph, since you can insert this group node in your inventor file, and just search for all PickCallback nodes when your program starts to add callbacks. You can also connect to the trigger field if you want some other node to trigger when something is picked.

Constructor & Destructor Documentation

◆ PickCallback()

PickCallback::PickCallback ( void )

Constructor.

◆ ~PickCallback()

PickCallback::~PickCallback ( )
protectedvirtual

Destructor.

Member Function Documentation

◆ addCallback()

void PickCallback::addCallback ( void(*)(void *, SoPath *) callback,
void * userdata )

Adds a callback that will be called when some node is picked.

See also
removeCallback()

◆ handleEvent()

void PickCallback::handleEvent ( SoHandleEventAction * action)
protectedvirtual

Coin method. Checks to see if some child is picked, and triggers callbacks when this happens.

◆ initClass()

void PickCallback::initClass ( void )
static

Required Coin method.

◆ removeCallback()

void PickCallback::removeCallback ( void(*)(void *, SoPath *) callback,
void * userdata )

Removes a callback.

See also
addCallback()

Member Data Documentation

◆ pickable

SoSFBool PickCallback::pickable

Can be set to FALSE to temporarily disable pick callbacks. Default value is TRUE.

◆ trigger

SoSFTrigger PickCallback::trigger

Will be triggered right after callbacks are called (if any).


The documentation for this class was generated from the following files: