.TH "SoPickAction" 3 "Thu May 29 2014" "Version 4.0.0a" "Coin" \" -*- nroff -*- .ad l .nh .SH NAME SoPickAction \- .PP The \fBSoPickAction\fP class is the base class for picking actions\&. .PP The basis for all interaction features that Coin provides for the application programmer is the pick actions\&. Draggers, manipulators, \fBSoSelection\fP nodes, etc all make use of the functionality provided by the pick actions for selecting and manipulating scene geometry in various ways\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBSoAction\fP\&. .PP Inherited by \fBSoRayPickAction\fP\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "virtual \fBSoType\fP \fBgetTypeId\fP (void) const " .br .ti -1c .RI "void \fBsetViewportRegion\fP (const \fBSbViewportRegion\fP &newregion)" .br .ti -1c .RI "const \fBSbViewportRegion\fP & \fBgetViewportRegion\fP (void)" .br .ti -1c .RI "void \fBenableCulling\fP (const SbBool flag)" .br .ti -1c .RI "SbBool \fBisCullingEnabled\fP (void) const " .br .in -1c .SS "Static Public Member Functions" .in +1c .ti -1c .RI "static \fBSoType\fP \fBgetClassTypeId\fP (void)" .br .ti -1c .RI "static void \fBaddMethod\fP (const \fBSoType\fP type, SoActionMethod method)" .br .ti -1c .RI "static void \fBenableElement\fP (const \fBSoType\fP type, const int stackindex)" .br .ti -1c .RI "static void \fBinitClass\fP (void)" .br .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "virtual const .br \fBSoEnabledElementsList\fP & \fBgetEnabledElements\fP (void) const " .br .ti -1c .RI "\fBSoPickAction\fP (const \fBSbViewportRegion\fP &viewportregion)" .br .ti -1c .RI "virtual \fB~SoPickAction\fP (void)" .br .ti -1c .RI "virtual void \fBbeginTraversal\fP (\fBSoNode\fP *node)" .br .in -1c .SS "Static Protected Member Functions" .in +1c .ti -1c .RI "static \fBSoEnabledElementsList\fP * \fBgetClassEnabledElements\fP (void)" .br .ti -1c .RI "static \fBSoActionMethodList\fP * \fBgetClassActionMethods\fP (void)" .br .in -1c .SS "Protected Attributes" .in +1c .ti -1c .RI "\fBSbViewportRegion\fP \fBvpRegion\fP" .br .in -1c .SS "Additional Inherited Members" .SH "Detailed Description" .PP The \fBSoPickAction\fP class is the base class for picking actions\&. .PP The basis for all interaction features that Coin provides for the application programmer is the pick actions\&. Draggers, manipulators, \fBSoSelection\fP nodes, etc all make use of the functionality provided by the pick actions for selecting and manipulating scene geometry in various ways\&. This class is not supposed to be used directly by the application programmer, as it is more a place-holder for the common interface of picking operations\&. It does not contain any actual code for doing scenegraph picks\&. .PP Coin provides a fully functional picking action for the application programmer to use through the \fBSoRayPickAction\fP class (which inherits the \fBSoPickAction\fP class)\&. .PP \fBSee also:\fP .RS 4 \fBSoSelection\fP .RE .PP .SH "Constructor & Destructor Documentation" .PP .SS "SoPickAction::SoPickAction (const \fBSbViewportRegion\fP &viewportregion)\fC [protected]\fP" Constructor\&. .SS "SoPickAction::~SoPickAction (void)\fC [protected]\fP, \fC [virtual]\fP" Destructor\&. .SH "Member Function Documentation" .PP .SS "\fBSoType\fP SoPickAction::getTypeId (void) const\fC [virtual]\fP" Returns the type identification of an action derived from a class inheriting \fBSoAction\fP\&. This is used for run-time type checking and 'downward' casting\&. .PP Usage example: .PP .PP .nf void bar(SoAction * action) { if (action->getTypeId() == SoGLRenderAction::getClassTypeId()) { // safe downward cast, know the type SoGLRenderAction * glrender = (SoGLRenderAction *)action; } return; // ignore if not renderaction } .fi .PP .PP For application programmers wanting to extend the library with new actions: this method needs to be overridden in \fIall\fP subclasses\&. This is typically done as part of setting up the full type system for extension classes, which is usually accomplished by using the pre-defined macros available through Inventor/nodes/SoSubAction\&.h: SO_ACTION_SOURCE, SO_ACTION_INIT_CLASS and SO_ACTION_CONSTRUCTOR\&. .PP For more information on writing Coin extensions, see the \fBSoAction\fP class documentation\&. .PP Returns the actual type id of an object derived from a class inheriting \fBSoAction\fP\&. Needs to be overridden in \fIall\fP subclasses\&. .PP Implements \fBSoAction\fP\&. .PP Reimplemented in \fBSoRayPickAction\fP\&. .SS "void SoPickAction::addMethod (const \fBSoType\fPtype, SoActionMethodmethod)\fC [static]\fP" \fIThis API member is considered internal to the library, as it is not likely to be of interest to the application programmer\&.\fP .SS "void SoPickAction::enableElement (const \fBSoType\fPtype, const intstackindex)\fC [static]\fP" \fIThis API member is considered internal to the library, as it is not likely to be of interest to the application programmer\&.\fP .SS "const \fBSoEnabledElementsList\fP & SoPickAction::getEnabledElements (void) const\fC [protected]\fP, \fC [virtual]\fP" Returns a list of the elements used by action instances of this class upon traversal operations\&. .PP Reimplemented from \fBSoAction\fP\&. .PP Reimplemented in \fBSoRayPickAction\fP\&. .SS "void SoPickAction::setViewportRegion (const \fBSbViewportRegion\fP &newregion)" Set a new viewport region to replace the one passed in with the constructor\&. .SS "const \fBSbViewportRegion\fP & SoPickAction::getViewportRegion (void)" Returns the viewport region used by the action\&. .SS "void SoPickAction::enableCulling (const SbBoolflag)" Don't calculate bounding boxes and try to do culling when picking\&. .PP This can provide a speed-up in cases where the default setting of \fCon\fP would be inefficient\&. .SS "SbBool SoPickAction::isCullingEnabled (void) const" Returns the current state of the culling flag\&. .SS "void SoPickAction::beginTraversal (\fBSoNode\fP *node)\fC [protected]\fP, \fC [virtual]\fP" This virtual method is called from \fBSoAction::apply()\fP, and is the entry point for the actual scenegraph traversal\&. .PP It can be overridden to initialize the action at traversal start, for specific initializations in the action subclasses inheriting \fBSoAction\fP\&. .PP Default method just calls \fBtraverse()\fP, which any overridden implementation of the method must do too (or call \fBSoAction::beginTraversal()\fP) to trigger the scenegraph traversal\&. .PP Reimplemented from \fBSoAction\fP\&. .PP Reimplemented in \fBSoRayPickAction\fP\&. .SH "Member Data Documentation" .PP .SS "\fBSbViewportRegion\fP SoPickAction::vpRegion\fC [protected]\fP" The viewport region used by pick actions\&. .SH "Author" .PP Generated automatically by Doxygen for Coin from the source code\&.