man SoHandleEventAction () - allows nodes in a graph to receive input events
NAME
SoHandleEventAction - allows nodes in a graph to receive input events
INHERITS FROM
SoAction > SoHandleEventAction
SYNOPSIS
#include <Inventor/actions/SoHandleEventAction.h>
Methods from class SoHandleEventAction:
c
}
c
}
SoHandleEventAction(const SbViewportRegion &viewportRegion)
c
}
c
}
setViewportRegion(const SbViewportRegion &newRegion)
c
}
c
}
getViewportRegion() const
c
}
c
}
setEvent(const SoEvent *ev)
c
}
c
}
getEvent() const
c
}
c
}
setHandled()
c
}
c
}
isHandled() const
c
}
c
}
setGrabber(SoNode *node)
c
}
c
}
releaseGrabber()
c
}
c
}
getGrabber() const
c
}
c
}
setPickRoot(SoNode *node)
c
}
c
}
getPickRoot() const
c
}
c
}
setPickRadius(float radiusInPixels)
c
}
c
}
getPickedPoint()
c
}
c
}
getPickedPointList()
Methods from class SoAction:
c
}
c
}
apply(SoNode *node)
c
}
c
}
apply(SoPath *path)
c
}
c
}
apply(const SoPathList &pathList, SbBool obeysRules = FALSE)
c
}
c
}
getClassTypeId()
c
}
c
}
getTypeId()
c
}
c
}
isOfType(SoType type)
c
}
c
}
invalidateState()
DESCRIPTION
This class is used to allow nodes in a scene graph to handle input events. It is usually invoked from a component derived from SoXtRenderArea when the component receives a window system event. Manipulator, dragger and selection nodes respond to and process events. Most other group nodes just pass the event to their children, while most other nodes simply ignore the action entirely. Once a node has indicated to the action that it has handled the event, traversal stops. A node that handles an event can also grab future events. Once it has done so, all events will be sent directly to that node, with no traversal taking place, until the node releases the grab.
METHODS
c
}
c
}
SoHandleEventAction(const SbViewportRegion &viewportRegion)
Constructor takes viewport region to use; this is needed to perform a pick operation when requested.
c
}
c
}
setViewportRegion(const SbViewportRegion &newRegion)
c
}
c
}
getViewportRegion() const
Sets/returns current viewport region to use for action.
c
}
c
}
setEvent(const SoEvent *ev)
c
}
c
}
getEvent() const
Sets/returns the event being handled.
c
}
c
}
setHandled()
c
}
c
}
isHandled() const
Sets/returns whether any node has yet handled the event.
c
}
c
}
setGrabber(SoNode *node)
Initiates grabbing of future events. All events will be sent to the given node until the grab is released.
c
}
c
}
releaseGrabber()
Releases the grab.
c
}
c
}
getGrabber() const
Returns the node that is currently grabbing events, or NULL if there is none.
c
}
c
}
setPickRoot(SoNode *node)
c
}
c
}
getPickRoot() const
Sets/returns the root node used for initiating a pick action for those nodes that want to know what is under the cursor.
c
}
c
}
setPickRadius(float radiusInPixels)
Set the radius (in pixels) around the viewport-space point through which the ray passes when doing ray picking. Ray picking is performed when getPickedPoint() is called. The pick radius set here is used when testing
the ray against lines and points.
c
}
c
}
getPickedPoint()
Returns the frontmost object hit (as an SoPickedPoint) by performing a pick based on the mouse location specified in the event for which the action is being applied. The first time this is called for a particular event,
a SoRayPickAction is applied to find this object; subsequent calls for the same event return the same information. The storage for the picked point remains valid as long as the action is not re-applied or deleted.
c
}
c
}
getPickedPointList()
Returns a list of objects intersected by a picking operation, sorted from nearest to farthest.
SEE ALSO
SoEvent, SoPickedPoint, SoRayPickAction