.TH "SoSelection" 3 "Tue Jun 23 2026 23:48:38" "Version 4.0.10" "Coin" \" -*- nroff -*- .ad l .nh .SH NAME SoSelection \- The \fBSoSelection\fP class manages a list of selected nodes\&. .SH SYNOPSIS .br .PP .PP \fR#include \fP .PP Inherits \fBSoSeparator\fP\&. .PP Inherited by \fBSoExtSelection\fP\&. .SS "Public Types" .in +1c .ti -1c .RI "enum \fBPolicy\fP { \fBSINGLE\fP, \fBTOGGLE\fP, \fBSHIFT\fP, \fBDISABLE\fP }" .br .in -1c Public Types inherited from \fBSoSeparator\fP .in +1c .ti -1c .RI "enum \fBCacheEnabled\fP { \fBOFF\fP, \fBON\fP, \fBAUTO\fP }" .br .in -1c Public Types inherited from \fBSoNode\fP .in +1c .ti -1c .RI "enum \fBNodeType\fP { \fBINVENTOR\fP = 0x0000, \fBVRML1\fP = 0x0001, \fBVRML2\fP = 0x0002, \fBINVENTOR_1\fP = 0x0004, \fBINVENTOR_2_0\fP = 0x0008, \fBINVENTOR_2_1\fP = 0x0010, \fBINVENTOR_2_5\fP = 0x0020, \fBINVENTOR_2_6\fP = 0x0040, \fBCOIN_1_0\fP = 0x0080, \fBCOIN_2_0\fP = 0x0100, \fBEXTENSION\fP = 0x0200, \fBCOIN_2_2\fP = 0x0400, \fBCOIN_2_3\fP = 0x0800, \fBCOIN_2_4\fP = 0x1000, \fBINVENTOR_5_0\fP = 0x2000, \fBCOIN_2_5\fP = 0x4000, \fBCOIN_3_0\fP = 0x8000, \fBINVENTOR_6_0\fP = 0x10000, \fBCOIN_4_0\fP = 0x20000 }" .br .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "virtual \fBSoType\fP \fBgetTypeId\fP (void) const" .br .ti -1c .RI "\fBSoSelection\fP (void)" .br .ti -1c .RI "\fBSoSelection\fP (const int nChildren)" .br .ti -1c .RI "void \fBselect\fP (const \fBSoPath\fP *path)" .br .ti -1c .RI "void \fBselect\fP (\fBSoNode\fP *node)" .br .ti -1c .RI "void \fBdeselect\fP (const \fBSoPath\fP *path)" .br .ti -1c .RI "void \fBdeselect\fP (const int which)" .br .ti -1c .RI "void \fBdeselect\fP (\fBSoNode\fP *node)" .br .ti -1c .RI "void \fBtoggle\fP (const \fBSoPath\fP *path)" .br .ti -1c .RI "void \fBtoggle\fP (\fBSoNode\fP *node)" .br .ti -1c .RI "SbBool \fBisSelected\fP (const \fBSoPath\fP *path) const" .br .ti -1c .RI "SbBool \fBisSelected\fP (\fBSoNode\fP *node) const" .br .ti -1c .RI "void \fBdeselectAll\fP (void)" .br .ti -1c .RI "int \fBgetNumSelected\fP (void) const" .br .ti -1c .RI "const \fBSoPathList\fP * \fBgetList\fP (void) const" .br .ti -1c .RI "\fBSoPath\fP * \fBgetPath\fP (const int index) const" .br .ti -1c .RI "\fBSoPath\fP * \fBoperator[]\fP (const int i) const" .br .ti -1c .RI "void \fBaddSelectionCallback\fP (SoSelectionPathCB *f, void *userData=NULL)" .br .ti -1c .RI "void \fBremoveSelectionCallback\fP (SoSelectionPathCB *f, void *userData=NULL)" .br .ti -1c .RI "void \fBaddDeselectionCallback\fP (SoSelectionPathCB *f, void *userData=NULL)" .br .ti -1c .RI "void \fBremoveDeselectionCallback\fP (SoSelectionPathCB *f, void *userData=NULL)" .br .ti -1c .RI "void \fBaddStartCallback\fP (SoSelectionClassCB *f, void *userData=NULL)" .br .ti -1c .RI "void \fBremoveStartCallback\fP (SoSelectionClassCB *f, void *userData=NULL)" .br .ti -1c .RI "void \fBaddFinishCallback\fP (SoSelectionClassCB *f, void *userData=NULL)" .br .ti -1c .RI "void \fBremoveFinishCallback\fP (SoSelectionClassCB *f, void *userData=NULL)" .br .ti -1c .RI "void \fBsetPickFilterCallback\fP (SoSelectionPickCB *f, void *userData=NULL, const SbBool callOnlyIfSelectable=TRUE)" .br .ti -1c .RI "void \fBsetPickMatching\fP (const SbBool \fBpickMatching\fP)" .br .ti -1c .RI "SbBool \fBisPickMatching\fP (void) const" .br .ti -1c .RI "SbBool \fBgetPickMatching\fP (void) const" .br .ti -1c .RI "void \fBaddChangeCallback\fP (SoSelectionClassCB *f, void *userData=NULL)" .br .ti -1c .RI "void \fBremoveChangeCallback\fP (SoSelectionClassCB *f, void *userData=NULL)" .br .in -1c Public Member Functions inherited from \fBSoSeparator\fP .in +1c .ti -1c .RI "\fBSoSeparator\fP (void)" .br .ti -1c .RI "\fBSoSeparator\fP (const int nchildren)" .br .ti -1c .RI "virtual void \fBdoAction\fP (\fBSoAction\fP *action)" .br .ti -1c .RI "virtual void \fBGLRender\fP (\fBSoGLRenderAction\fP *action)" .br .ti -1c .RI "virtual void \fBGLRenderBelowPath\fP (\fBSoGLRenderAction\fP *action)" .br .ti -1c .RI "virtual void \fBGLRenderInPath\fP (\fBSoGLRenderAction\fP *action)" .br .ti -1c .RI "virtual void \fBGLRenderOffPath\fP (\fBSoGLRenderAction\fP *action)" .br .ti -1c .RI "virtual void \fBcallback\fP (\fBSoCallbackAction\fP *action)" .br .ti -1c .RI "virtual void \fBgetBoundingBox\fP (\fBSoGetBoundingBoxAction\fP *action)" .br .ti -1c .RI "virtual void \fBgetMatrix\fP (\fBSoGetMatrixAction\fP *action)" .br .ti -1c .RI "virtual void \fBrayPick\fP (\fBSoRayPickAction\fP *action)" .br .ti -1c .RI "virtual void \fBsearch\fP (\fBSoSearchAction\fP *action)" .br .ti -1c .RI "virtual void \fBgetPrimitiveCount\fP (\fBSoGetPrimitiveCountAction\fP *action)" .br .ti -1c .RI "virtual void \fBaudioRender\fP (\fBSoAudioRenderAction\fP *action)" .br .ti -1c .RI "virtual void \fBnotify\fP (\fBSoNotList\fP *nl)" .br .ti -1c .RI "virtual SbBool \fBaffectsState\fP (void) const" .br .in -1c Public Member Functions inherited from \fBSoGroup\fP .in +1c .ti -1c .RI "\fBSoGroup\fP (void)" .br .ti -1c .RI "\fBSoGroup\fP (int nchildren)" .br .ti -1c .RI "virtual void \fBaddChild\fP (\fBSoNode\fP *node)" .br .ti -1c .RI "virtual void \fBinsertChild\fP (\fBSoNode\fP *child, int newchildindex)" .br .ti -1c .RI "virtual \fBSoNode\fP * \fBgetChild\fP (int index) const" .br .ti -1c .RI "virtual int \fBfindChild\fP (const \fBSoNode\fP *node) const" .br .ti -1c .RI "virtual int \fBgetNumChildren\fP (void) const" .br .ti -1c .RI "virtual void \fBremoveChild\fP (int childindex)" .br .ti -1c .RI "virtual void \fBremoveChild\fP (\fBSoNode\fP *child)" .br .ti -1c .RI "virtual void \fBremoveAllChildren\fP (void)" .br .ti -1c .RI "virtual void \fBreplaceChild\fP (int index, \fBSoNode\fP *newchild)" .br .ti -1c .RI "virtual void \fBreplaceChild\fP (\fBSoNode\fP *oldchild, \fBSoNode\fP *newchild)" .br .ti -1c .RI "virtual void \fBpick\fP (\fBSoPickAction\fP *action)" .br .ti -1c .RI "virtual void \fBwrite\fP (\fBSoWriteAction\fP *action)" .br .ti -1c .RI "virtual \fBSoChildList\fP * \fBgetChildren\fP (void) const" .br .ti -1c .RI "virtual void \fBaddWriteReference\fP (\fBSoOutput\fP *out, SbBool isfromfield=FALSE)" .br .in -1c Public Member Functions inherited from \fBSoNode\fP .in +1c .ti -1c .RI "void \fBsetOverride\fP (const SbBool state)" .br .ti -1c .RI "SbBool \fBisOverride\fP (void) const" .br .ti -1c .RI "void \fBsetNodeType\fP (const \fBNodeType\fP type)" .br .ti -1c .RI "\fBNodeType\fP \fBgetNodeType\fP (void) const" .br .ti -1c .RI "virtual \fBSoNode\fP * \fBcopy\fP (SbBool copyconnections=FALSE) const" .br .ti -1c .RI "virtual void \fBgrabEventsSetup\fP (void)" .br .ti -1c .RI "virtual void \fBgrabEventsCleanup\fP (void)" .br .ti -1c .RI "virtual void \fBstartNotify\fP (void)" .br .ti -1c .RI "SbUniqueId \fBgetNodeId\fP (void) const" .br .ti -1c .RI "virtual void \fBwriteInstance\fP (\fBSoOutput\fP *out)" .br .ti -1c .RI "virtual \fBSoNode\fP * \fBaddToCopyDict\fP (void) const" .br .ti -1c .RI "virtual \fBSoFieldContainer\fP * \fBcopyThroughConnection\fP (void) const" .br .in -1c Public Member Functions inherited from \fBSoFieldContainer\fP .in +1c .ti -1c .RI "void \fBsetToDefaults\fP (void)" .br .ti -1c .RI "SbBool \fBhasDefaultValues\fP (void) const" .br .ti -1c .RI "SbBool \fBfieldsAreEqual\fP (const \fBSoFieldContainer\fP *container) const" .br .ti -1c .RI "void \fBcopyFieldValues\fP (const \fBSoFieldContainer\fP *container, SbBool copyconnections=FALSE)" .br .ti -1c .RI "SbBool \fBset\fP (const char *const fielddata)" .br .ti -1c .RI "void \fBget\fP (\fBSbString\fP &fielddata)" .br .ti -1c .RI "virtual int \fBgetFields\fP (\fBSoFieldList\fP &l) const" .br .ti -1c .RI "virtual int \fBgetAllFields\fP (\fBSoFieldList\fP &l) const" .br .ti -1c .RI "virtual \fBSoField\fP * \fBgetField\fP (const \fBSbName\fP &name) const" .br .ti -1c .RI "virtual \fBSoField\fP * \fBgetEventIn\fP (const \fBSbName\fP &name) const" .br .ti -1c .RI "virtual \fBSoField\fP * \fBgetEventOut\fP (const \fBSbName\fP &name) const" .br .ti -1c .RI "SbBool \fBgetFieldName\fP (const \fBSoField\fP *const field, \fBSbName\fP &name) const" .br .ti -1c .RI "SbBool \fBenableNotify\fP (const SbBool flag)" .br .ti -1c .RI "SbBool \fBisNotifyEnabled\fP (void) const" .br .ti -1c .RI "SbBool \fBset\fP (const char *fielddata, \fBSoInput\fP *input)" .br .ti -1c .RI "void \fBget\fP (\fBSbString\fP &fielddata, \fBSoOutput\fP *out)" .br .ti -1c .RI "virtual SbBool \fBvalidateNewFieldValue\fP (\fBSoField\fP *field, void *newval)" .br .ti -1c .RI "SbBool \fBgetIsBuiltIn\fP (void) const" .br .ti -1c .RI "virtual void \fBgetFieldsMemorySize\fP (size_t &managed, size_t &unmanaged) const" .br .ti -1c .RI "void \fBsetUserData\fP (void *userdata) const" .br .ti -1c .RI "void * \fBgetUserData\fP (void) const" .br .in -1c Public Member Functions inherited from \fBSoBase\fP .in +1c .ti -1c .RI "void \fBref\fP (void) const" .br .ti -1c .RI "void \fBunref\fP (void) const" .br .ti -1c .RI "void \fBunrefNoDelete\fP (void) const" .br .ti -1c .RI "int32_t \fBgetRefCount\fP (void) const" .br .ti -1c .RI "void \fBtouch\fP (void)" .br .ti -1c .RI "SbBool \fBisOfType\fP (\fBSoType\fP type) const" .br .RI "Returns \fRTRUE\fP if the type of this object is either of the same type or inherited from \fItype\fP\&. " .ti -1c .RI "virtual \fBSbName\fP \fBgetName\fP (void) const" .br .ti -1c .RI "virtual void \fBsetName\fP (const \fBSbName\fP &newname)" .br .ti -1c .RI "void \fBaddAuditor\fP (void *const auditor, const \fBSoNotRec::Type\fP type)" .br .ti -1c .RI "void \fBremoveAuditor\fP (void *const auditor, const \fBSoNotRec::Type\fP type)" .br .ti -1c .RI "const \fBSoAuditorList\fP & \fBgetAuditors\fP (void) const" .br .ti -1c .RI "SbBool \fBshouldWrite\fP (void)" .br .ti -1c .RI "void \fBassertAlive\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 \fBinitClass\fP (void)" .br .RI "Sets up initialization for data common to all instances of this class, like submitting necessary information to the Coin type system\&. " .in -1c Static Public Member Functions inherited from \fBSoSeparator\fP .in +1c .ti -1c .RI "static \fBSoType\fP \fBgetClassTypeId\fP (void)" .br .ti -1c .RI "static void \fBinitClass\fP (void)" .br .RI "Sets up initialization for data common to all instances of this class, like submitting necessary information to the Coin type system\&. " .ti -1c .RI "static void \fBsetNumRenderCaches\fP (const int howmany)" .br .ti -1c .RI "static int \fBgetNumRenderCaches\fP (void)" .br .in -1c Static Public Member Functions inherited from \fBSoGroup\fP .in +1c .ti -1c .RI "static \fBSoType\fP \fBgetClassTypeId\fP (void)" .br .ti -1c .RI "static void \fBinitClass\fP (void)" .br .RI "Sets up initialization for data common to all instances of this class, like submitting necessary information to the Coin type system\&. " .in -1c Static Public Member Functions inherited from \fBSoNode\fP .in +1c .ti -1c .RI "static uint32_t \fBgetCompatibilityTypes\fP (const \fBSoType\fP &nodetype)" .br .ti -1c .RI "static \fBSoType\fP \fBgetClassTypeId\fP (void)" .br .ti -1c .RI "static \fBSoNode\fP * \fBgetByName\fP (const \fBSbName\fP &name)" .br .ti -1c .RI "static int \fBgetByName\fP (const \fBSbName\fP &name, \fBSoNodeList\fP &l)" .br .ti -1c .RI "static void \fBinitClass\fP (void)" .br .RI "Sets up initialization for data common to all instances of this class, like submitting necessary information to the Coin type system\&. " .ti -1c .RI "static void \fBinitClasses\fP (void)" .br .ti -1c .RI "static SbUniqueId \fBgetNextNodeId\fP (void)" .br .ti -1c .RI "static int \fBgetActionMethodIndex\fP (const \fBSoType\fP type)" .br .ti -1c .RI "static void \fBgetBoundingBoxS\fP (\fBSoAction\fP *action, \fBSoNode\fP *node)" .br .ti -1c .RI "static void \fBGLRenderS\fP (\fBSoAction\fP *action, \fBSoNode\fP *node)" .br .ti -1c .RI "static void \fBcallbackS\fP (\fBSoAction\fP *action, \fBSoNode\fP *node)" .br .ti -1c .RI "static void \fBgetMatrixS\fP (\fBSoAction\fP *action, \fBSoNode\fP *node)" .br .ti -1c .RI "static void \fBhandleEventS\fP (\fBSoAction\fP *action, \fBSoNode\fP *node)" .br .ti -1c .RI "static void \fBpickS\fP (\fBSoAction\fP *action, \fBSoNode\fP *node)" .br .ti -1c .RI "static void \fBrayPickS\fP (\fBSoAction\fP *action, \fBSoNode\fP *node)" .br .ti -1c .RI "static void \fBsearchS\fP (\fBSoAction\fP *action, \fBSoNode\fP *node)" .br .ti -1c .RI "static void \fBwriteS\fP (\fBSoAction\fP *action, \fBSoNode\fP *node)" .br .ti -1c .RI "static void \fBaudioRenderS\fP (\fBSoAction\fP *action, \fBSoNode\fP *node)" .br .ti -1c .RI "static void \fBgetPrimitiveCountS\fP (\fBSoAction\fP *action, \fBSoNode\fP *node)" .br .in -1c Static Public Member Functions inherited from \fBSoFieldContainer\fP .in +1c .ti -1c .RI "static void \fBinitClass\fP (void)" .br .RI "Sets up initialization for data common to all instances of this class, like submitting necessary information to the Coin type system\&. " .ti -1c .RI "static \fBSoType\fP \fBgetClassTypeId\fP (void)" .br .RI "This static method returns the \fBSoType\fP object associated with objects of this class\&. " .ti -1c .RI "static void \fBcleanupClass\fP (void)" .br .ti -1c .RI "static void \fBinitCopyDict\fP (void)" .br .ti -1c .RI "static void \fBaddCopy\fP (const \fBSoFieldContainer\fP *orig, const \fBSoFieldContainer\fP *copy)" .br .ti -1c .RI "static \fBSoFieldContainer\fP * \fBcheckCopy\fP (const \fBSoFieldContainer\fP *orig)" .br .ti -1c .RI "static \fBSoFieldContainer\fP * \fBfindCopy\fP (const \fBSoFieldContainer\fP *orig, const SbBool copyconnections)" .br .ti -1c .RI "static void \fBcopyDone\fP (void)" .br .in -1c Static Public Member Functions inherited from \fBSoBase\fP .in +1c .ti -1c .RI "static void \fBinitClass\fP (void)" .br .RI "Sets up initialization for data common to all instances of this class, like submitting necessary information to the Coin type system\&. " .ti -1c .RI "static \fBSoType\fP \fBgetClassTypeId\fP (void)" .br .RI "This static method returns the \fBSoType\fP object associated with objects of this class\&. " .ti -1c .RI "static void \fBaddName\fP (\fBSoBase\fP *const base, const char *const name)" .br .ti -1c .RI "static void \fBremoveName\fP (\fBSoBase\fP *const base, const char *const name)" .br .ti -1c .RI "static void \fBincrementCurrentWriteCounter\fP (void)" .br .ti -1c .RI "static void \fBdecrementCurrentWriteCounter\fP (void)" .br .ti -1c .RI "static \fBSoBase\fP * \fBgetNamedBase\fP (const \fBSbName\fP &name, \fBSoType\fP type)" .br .ti -1c .RI "static int \fBgetNamedBases\fP (const \fBSbName\fP &name, \fBSoBaseList\fP &baselist, \fBSoType\fP type)" .br .ti -1c .RI "static SbBool \fBread\fP (\fBSoInput\fP *input, \fBSoBase\fP *&base, \fBSoType\fP expectedtype)" .br .ti -1c .RI "static void \fBsetInstancePrefix\fP (const \fBSbString\fP &c)" .br .ti -1c .RI "static void \fBsetTraceRefs\fP (SbBool trace)" .br .ti -1c .RI "static SbBool \fBgetTraceRefs\fP (void)" .br .ti -1c .RI "static SbBool \fBconnectRoute\fP (\fBSoInput\fP *input, const \fBSbName\fP &fromnodename, const \fBSbName\fP &fromfieldname, const \fBSbName\fP &tonodename, const \fBSbName\fP &tofieldname)" .br .ti -1c .RI "static SbBool \fBreadRoute\fP (\fBSoInput\fP *input)" .br .in -1c .SS "Public Attributes" .in +1c .ti -1c .RI "\fBSoSFEnum\fP \fBpolicy\fP" .br .in -1c Public Attributes inherited from \fBSoSeparator\fP .in +1c .ti -1c .RI "\fBSoSFEnum\fP \fBrenderCaching\fP" .br .ti -1c .RI "\fBSoSFEnum\fP \fBboundingBoxCaching\fP" .br .ti -1c .RI "\fBSoSFEnum\fP \fBrenderCulling\fP" .br .ti -1c .RI "\fBSoSFEnum\fP \fBpickCulling\fP" .br .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "virtual const \fBSoFieldData\fP * \fBgetFieldData\fP (void) const" .br .ti -1c .RI "virtual \fB~SoSelection\fP ()" .br .ti -1c .RI "void \fBinvokeSelectionPolicy\fP (\fBSoPath\fP *path, SbBool shiftDown)" .br .ti -1c .RI "void \fBperformSingleSelection\fP (\fBSoPath\fP *path)" .br .ti -1c .RI "void \fBperformToggleSelection\fP (\fBSoPath\fP *path)" .br .ti -1c .RI "\fBSoPath\fP * \fBcopyFromThis\fP (const \fBSoPath\fP *path) const" .br .ti -1c .RI "void \fBaddPath\fP (\fBSoPath\fP *path)" .br .ti -1c .RI "void \fBremovePath\fP (const int which)" .br .ti -1c .RI "int \fBfindPath\fP (const \fBSoPath\fP *path) const" .br .ti -1c .RI "virtual void \fBhandleEvent\fP (\fBSoHandleEventAction\fP *action)" .br .in -1c Protected Member Functions inherited from \fBSoSeparator\fP .in +1c .ti -1c .RI "virtual \fB~SoSeparator\fP ()" .br .ti -1c .RI "virtual SbBool \fBcullTest\fP (\fBSoState\fP *state)" .br .ti -1c .RI "virtual SbBool \fBcullTest\fP (\fBSoGLRenderAction\fP *action, int &cullresults)" .br .ti -1c .RI "virtual SbBool \fBreadInstance\fP (\fBSoInput\fP *in, unsigned short flags)" .br .in -1c Protected Member Functions inherited from \fBSoGroup\fP .in +1c .ti -1c .RI "virtual \fB~SoGroup\fP ()" .br .ti -1c .RI "virtual SbBool \fBreadChildren\fP (\fBSoInput\fP *in)" .br .ti -1c .RI "virtual void \fBcopyContents\fP (const \fBSoFieldContainer\fP *from, SbBool copyconnections)" .br .ti -1c .RI "virtual \fBSoNotRec\fP \fBcreateNotRec\fP (void)" .br .ti -1c .RI "void \fBsetOperation\fP (const \fBSoNotRec::OperationType\fP opType=SoNotRec::UNSPECIFIED, const \fBSoNode\fP *cc=NULL, const \fBSoNode\fP *pc=NULL, const int ci=\-1)" .br .in -1c Protected Member Functions inherited from \fBSoNode\fP .in +1c .ti -1c .RI "\fBSoNode\fP (void)" .br .ti -1c .RI "virtual \fB~SoNode\fP ()" .br .in -1c Protected Member Functions inherited from \fBSoFieldContainer\fP .in +1c .ti -1c .RI "\fBSoFieldContainer\fP (void)" .br .ti -1c .RI "virtual \fB~SoFieldContainer\fP ()" .br .in -1c Protected Member Functions inherited from \fBSoBase\fP .in +1c .ti -1c .RI "\fBSoBase\fP (void)" .br .ti -1c .RI "virtual \fB~SoBase\fP ()" .br .ti -1c .RI "virtual void \fBdestroy\fP (void)" .br .ti -1c .RI "SbBool \fBhasMultipleWriteRefs\fP (void) const" .br .ti -1c .RI "SbBool \fBwriteHeader\fP (\fBSoOutput\fP *out, SbBool isgroup, SbBool isengine) const" .br .ti -1c .RI "void \fBwriteFooter\fP (\fBSoOutput\fP *out) const" .br .ti -1c .RI "virtual const char * \fBgetFileFormatName\fP (void) const" .br .in -1c .SS "Static Protected Member Functions" .in +1c .ti -1c .RI "static const \fBSoFieldData\fP ** \fBgetFieldDataPtr\fP (void)" .br .in -1c Static Protected Member Functions inherited from \fBSoSeparator\fP .in +1c .ti -1c .RI "static const \fBSoFieldData\fP ** \fBgetFieldDataPtr\fP (void)" .br .in -1c Static Protected Member Functions inherited from \fBSoGroup\fP .in +1c .ti -1c .RI "static const \fBSoFieldData\fP ** \fBgetFieldDataPtr\fP (void)" .br .in -1c Static Protected Member Functions inherited from \fBSoNode\fP .in +1c .ti -1c .RI "static const \fBSoFieldData\fP ** \fBgetFieldDataPtr\fP (void)" .br .ti -1c .RI "static void \fBsetNextActionMethodIndex\fP (int index)" .br .ti -1c .RI "static int \fBgetNextActionMethodIndex\fP (void)" .br .ti -1c .RI "static void \fBincNextActionMethodIndex\fP (void)" .br .ti -1c .RI "static void \fBsetCompatibilityTypes\fP (const \fBSoType\fP &nodetype, const uint32_t bitmask)" .br .in -1c Static Protected Member Functions inherited from \fBSoBase\fP .in +1c .ti -1c .RI "static uint32_t \fBgetCurrentWriteCounter\fP (void)" .br .ti -1c .RI "static void \fBstaticDataLock\fP (void)" .br .ti -1c .RI "static void \fBstaticDataUnlock\fP (void)" .br .in -1c .SS "Protected Attributes" .in +1c .ti -1c .RI "\fBSoPathList\fP \fBselectionList\fP" .br .ti -1c .RI "\fBSoCallbackList\fP * \fBselCBList\fP" .br .ti -1c .RI "\fBSoCallbackList\fP * \fBdeselCBList\fP" .br .ti -1c .RI "\fBSoCallbackList\fP * \fBstartCBList\fP" .br .ti -1c .RI "\fBSoCallbackList\fP * \fBfinishCBList\fP" .br .ti -1c .RI "SoSelectionPickCB * \fBpickCBFunc\fP" .br .ti -1c .RI "void * \fBpickCBData\fP" .br .ti -1c .RI "SbBool \fBcallPickCBOnlyIfSelectable\fP" .br .ti -1c .RI "\fBSoCallbackList\fP * \fBchangeCBList\fP" .br .ti -1c .RI "\fBSoPath\fP * \fBmouseDownPickPath\fP" .br .ti -1c .RI "SbBool \fBpickMatching\fP" .br .in -1c Protected Attributes inherited from \fBSoGroup\fP .in +1c .ti -1c .RI "\fBSoChildList\fP * \fBchildren\fP" .br .in -1c Protected Attributes inherited from \fBSoNode\fP .in +1c .ti -1c .RI "SbUniqueId \fBuniqueId\fP" .br .in -1c Protected Attributes inherited from \fBSoFieldContainer\fP .in +1c .ti -1c .RI "SbBool \fBisBuiltIn\fP" .br .in -1c .SS "Additional Inherited Members" Protected Types inherited from \fBSoBase\fP .in +1c .ti -1c .RI "enum \fBBaseFlags\fP { \fBIS_ENGINE\fP = 0x01, \fBIS_GROUP\fP = 0x02 }" .br .in -1c Static Protected Attributes inherited from \fBSoNode\fP .in +1c .ti -1c .RI "static SbUniqueId \fBnextUniqueId\fP = 1" .br .ti -1c .RI "static int \fBnextActionMethodIndex\fP = 0" .br .in -1c .SH "Detailed Description" .PP The \fBSoSelection\fP class manages a list of selected nodes\&. Inserting an \fBSoSelection\fP node in your scene graph enables you to let the user "pick" with the left mouse button to select/deselect objects below the \fBSoSelection\fP node\&. .PP Using an \fBSoBoxHighlightRenderAction\fP or an \fBSoLineHighlightRenderAction\fP to render scene graphs containing \fBSoSelection\fP nodes provides a convenient way of providing visual feedback about the selections to the application user\&. .PP Beware that one common faulty assumption which is made about the node is that the scene will automatically be re-rendered whenever the user is picking objects\&. This is not the case, the application programmer must himself schedule a redraw\&. A straightforward way to accomplish this is to \fBSoNode::touch()\fP the \fBSoSelection\fP node in the selection / deselection callback\&. .PP A "skeleton" for basic use of \fBSoSelection\fP nodes is given below: .PP .PP .nf extern SoSeparator * make_scenegraph( void ); static SoSelection * selection = NULL; // Callback function triggered for selection / deselection\&. void made_selection( void * userdata, SoPath * path ) { (void)fprintf( stdout, "%sselected %s\\n", userdata == (void *)1L ? "" : "de", path\->getTail()\->getTypeId()\&.getName()\&.getString() ); selection\->touch(); // to redraw } // ************************************************************************* // Print a quick instructions notice on stdout\&. void show_instructions( void ) { (void)fprintf( stdout, "\\nThis example program demonstrates the use of the SoSelection node type\&.\\n" ); (void)fprintf( stdout, "\\nQuick instructions:\\n\\n" ); (void)fprintf( stdout, " * pick with left mouse button\\n" ); (void)fprintf( stdout, " * hold SHIFT to select multiple objects\\n" ); (void)fprintf( stdout, " * hit ESC to toggle back and forth to view mode\\n" ); (void)fprintf( stdout, "\\n" ); } // ************************************************************************* int main( int argc, char ** argv ) { QWidget * window = SoQt::init( argv[0] ); show_instructions(); selection = new SoSelection; selection\->policy = SoSelection::SHIFT; selection\->ref(); selection\->addChild( make_scenegraph() ); selection\->addSelectionCallback( made_selection, (void *)1L ); selection\->addDeselectionCallback( made_selection, (void *)0L ); SoQtExaminerViewer * examinerviewer = new SoQtExaminerViewer( window ); examinerviewer\->setSceneGraph( selection ); examinerviewer\->setGLRenderAction( new SoBoxHighlightRenderAction ); examinerviewer\->setViewing( FALSE ); examinerviewer\->show(); SoQt::show( window ); SoQt::mainLoop(); delete examinerviewer; selection\->unref(); return 0; } .fi .PP .PP This node is not initialized in \fBSoDB::init()\fP, since it is part of the interaction kit "add-on"\&. Before using this node, you should therefore call \fBSoInteraction::init()\fP\&. If you're using one of the standard GUI-toolkits (SoXt / SoQt / SoWin) \fBSoInteraction::init()\fP will be called for you from the So[Xt|Qt|Win]::init() method and you don't have to worry about it\&. .PP With regard to using multiple \fBSoSelection\fP nodes at the same time in the same scene graph: this is possible, but it is not straightforward\&. The standard viewers provided by SoQt, SoWin, et al\&., will only snoop on one \fBSoSelection\fP node (part of the legacy API from SGI's InventorXt), so selection changes on the others don't trigger redraws\&. You don't necessarily see what's happening in other words\&. You'll have to hook up manually and trigger redraws yourself\&. .PP Also be aware that when having multiple \fBSoSelection\fP nodes in the scene graph active at the same time, the \fBSoHandleEventAction\fP traversals that you intend for selection-change on one \fBSoSelection\fP node will also affect all the other \fBSoSelection\fP nodes in the scene -- usually deselecting everything below them since you will be clicking outside the selectable objects\&. You'll therefore also have to manually override that behaviour, if you want selection change on one \fBSoSelection\fP node to not affect the others\&. .PP \fBFILE FORMAT/DEFAULTS:\fP .PP .nf Selection { renderCaching AUTO boundingBoxCaching AUTO renderCulling AUTO pickCulling AUTO policy SHIFT } .fi .PP .SH "Member Enumeration Documentation" .PP .SS "enum \fBSoSelection::Policy\fP" Enum for different pick policies\&. .PP \fBEnumerator\fP .in +1c .TP \f(BISINGLE \fP Only one object can be selected at any time\&. When the user picks a new object, the previous selection will be unselected\&. If the user picks on nothing, the current selection will be unselected\&. .PP Note that if a new selection matches one already present in the selection list, neither a deselect nor a select notification callback will be made about that selection path\&. .TP \f(BITOGGLE \fP Picking an object toggles its selection state\&. .TP \f(BISHIFT \fP Same as SINGLE, but when shift key is pressed the selection policy will be changed to TOGGLE\&. .TP \f(BIDISABLE \fP Disables selection handling\&. .SH "Constructor & Destructor Documentation" .PP .SS "SoSelection::SoSelection (void )" Default constructor\&. .SS "SoSelection::SoSelection (const int nChildren)" Constructor\&. .PP The argument should be the approximate number of children which is expected to be inserted below this node\&. The number need not be exact, as it is only used as a hint for better memory resource allocation\&. .SS "SoSelection::~SoSelection ()\fR [protected]\fP, \fR [virtual]\fP" Destructor\&. .SH "Member Function Documentation" .PP .SS "\fBSoType\fP SoSelection::getClassTypeId (void )\fR [static]\fP" This static method returns the \fBSoType\fP object associated with objects of this class\&. .SS "\fBSoType\fP SoSelection::getTypeId (void ) const\fR [virtual]\fP" Returns the type identification of an object derived from a class inheriting \fBSoBase\fP\&. This is used for runtime type checking and "downward" casting\&. .PP Reimplemented from \fBSoSeparator\fP\&. .PP Reimplemented in \fBSoExtSelection\fP\&. .SS "const \fBSoFieldData\fP ** SoSelection::getFieldDataPtr (void )\fR [static]\fP, \fR [protected]\fP" \fIThis API member is considered internal to the library, as it is not likely to be of interest to the application programmer\&.\fP .br .br Returns the \fBSoFieldData\fP class which holds information about fields in this node\&. .SS "const \fBSoFieldData\fP * SoSelection::getFieldData (void ) const\fR [protected]\fP, \fR [virtual]\fP" Returns a pointer to the class-wide field data storage object for this instance\&. If no fields are present, returns \fRNULL\fP\&. .PP Reimplemented from \fBSoSeparator\fP\&. .PP Reimplemented in \fBSoExtSelection\fP\&. .SS "void SoSelection::select (const \fBSoPath\fP * path)" Adds \fIpath\fP to the list of selected objects\&. .SS "void SoSelection::select (\fBSoNode\fP * node)" Adds \fInode\fP to the list of selected objects\&. The scene graph below the selection node will be searched, and the path to \fInode\fP will be added if found\&. .SS "void SoSelection::deselect (const \fBSoPath\fP * path)" Remove \fIpath\fP from the list of selected objects\&. .SS "void SoSelection::deselect (const int which)" Remove objects \fIwhich\fP from the list of selected objects\&. .SS "void SoSelection::deselect (\fBSoNode\fP * node)" Remove \fInode\fP from the list of selected objects\&. The scene graph below the selection node will be searched, and the path to \fInode\fP will be removed if found\&. .SS "void SoSelection::toggle (const \fBSoPath\fP * path)" If \fIpath\fP is not already selected, add \fIpath\fP to the list of selected objects\&. Otherwise remove \fIpath\fP from the list of selected objects\&. .SS "void SoSelection::toggle (\fBSoNode\fP * node)" If \fInode\fP is not already selected, add \fIpath\fP to the list of selected objects\&. Otherwise remove \fInode\fP from the list of selected objects\&. .SS "SbBool SoSelection::isSelected (const \fBSoPath\fP * path) const" Return \fITRUE\fP if \fIpath\fP is in the list of selected objects\&. .SS "SbBool SoSelection::isSelected (\fBSoNode\fP * node) const" Return \fITRUE\fP if the path to \fInode\fP is in the list of selected objects\&. .SS "void SoSelection::deselectAll (void )" Clears the selection list\&. .SS "int SoSelection::getNumSelected (void ) const" Returns the number of selected objects\&. .SS "const \fBSoPathList\fP * SoSelection::getList (void ) const" Returns the list of selected objects\&. .SS "\fBSoPath\fP * SoSelection::getPath (const int index) const" Returns the \fIindex'th\fP selected objects\&. .SS "\fBSoPath\fP * SoSelection::operator[] (const int i) const" Operator for accessing selected objects\&. .SS "void SoSelection::addSelectionCallback (SoSelectionPathCB * f, void * userData = \fRNULL\fP)" Adds a callback which will be called every time an object is selected\&. .PP \fBSee also\fP .RS 4 \fBremoveSelectionCallback()\fP .RE .PP .SS "void SoSelection::removeSelectionCallback (SoSelectionPathCB * f, void * userData = \fRNULL\fP)" Removes one of the selection callbacks\&. .PP \fBSee also\fP .RS 4 \fBaddSelectionCallback()\fP .RE .PP .SS "void SoSelection::addDeselectionCallback (SoSelectionPathCB * f, void * userData = \fRNULL\fP)" Adds a callback which will be called every time an object is deselected\&. .PP \fBSee also\fP .RS 4 \fBremoveDeselectionCallback()\fP .RE .PP .SS "void SoSelection::removeDeselectionCallback (SoSelectionPathCB * f, void * userData = \fRNULL\fP)" Removes one of the deselection callbacks\&. .PP \fBSee also\fP .RS 4 addDeselctionCallback() .RE .PP .SS "void SoSelection::addStartCallback (SoSelectionClassCB * f, void * userData = \fRNULL\fP)" Adds a callback which will be invoked when the user starts an interactive change to the list of selected objects\&. .PP This callback is useful for storing the old selection list for undo/redo functionality\&. .PP \fBSee also\fP .RS 4 \fBaddFinishCallback()\fP .RE .PP .SS "void SoSelection::removeStartCallback (SoSelectionClassCB * f, void * userData = \fRNULL\fP)" Removes \fIf\fP from the list of start callbacks\&. .PP \fBSee also\fP .RS 4 \fBaddStartCallback()\fP .RE .PP .SS "void SoSelection::addFinishCallback (SoSelectionClassCB * f, void * userData = \fRNULL\fP)" Adds a callback which will be invoked when the user has finished an interactive change to the list of selected objects\&. .PP \fBSee also\fP .RS 4 \fBaddStartCallback()\fP .RE .PP .SS "void SoSelection::removeFinishCallback (SoSelectionClassCB * f, void * userData = \fRNULL\fP)" Removes \fIf\fP from the list of finish callbacks\&. .PP \fBSee also\fP .RS 4 \fBaddFinishCallback()\fP .RE .PP .SS "void SoSelection::setPickFilterCallback (SoSelectionPickCB * f, void * userData = \fRNULL\fP, const SbBool callOnlyIfSelectable = \fRTRUE\fP)" Sets the pick filter callback\&. This callback will be called when a path is about to be added to or removed from the list of selected objects\&. The callback function should return a replacement path that should be used instead of the picked path\&. The returned path will be ref'ed, copied, and then unref'ed again by the \fBSoSelection\fP node\&. .PP If no callback is set (the default), the picked path will be used for selecting/deselecting\&. .PP Possible return values from the callback: .PP .PD 0 .IP "\(bu" 2 NULL: simulate that nothing was picked\&. This will clear the selection for the SINGLE policy\&. The handle event action will be halted\&. .IP "\(bu" 2 A path: the path will be selected/deselected\&. The handle event action will be halted\&. .IP "\(bu" 2 A path containing only the selection node: as NULL, but action will not be halted\&. .IP "\(bu" 2 An empty path or a path not containing the selection node: the pick will be ignored\&. .PP .PP if \fIcallOnlyIfSelectable\fP is \fRTRUE\fP, the callback will only be called if the selection node is in the picked path\&. .SS "void SoSelection::setPickMatching (const SbBool pickmatchflag)" When \fIpickmatchflag\fP is \fRTRUE\fP (the default), the mouse button release pick must match the mouse button press pick before object is selected/deselected\&. .PP This flag should normally not be of interest to application programmers\&. .SS "SbBool SoSelection::isPickMatching (void ) const" Returns \fITRUE\fP if pick matching is enabled\&. .PP \fBSee also\fP .RS 4 \fBsetPickMatching()\fP .RE .PP .SS "SbBool SoSelection::getPickMatching (void ) const" Returns \fITRUE\fP if pick matching is enabled\&. .PP \fBSee also\fP .RS 4 \fBsetPickMatching()\fP .RE .PP .SS "void SoSelection::addChangeCallback (SoSelectionClassCB * f, void * userData = \fRNULL\fP)" \fIThis API member is considered internal to the library, as it is not likely to be of interest to the application programmer\&.\fP .br .br \&. Used by render area to receive notification when the selection list changes\&. .SS "void SoSelection::removeChangeCallback (SoSelectionClassCB * f, void * userData = \fRNULL\fP)" \fIThis API member is considered internal to the library, as it is not likely to be of interest to the application programmer\&.\fP .br .br Used by render area to receive notification when the selection list changes\&. .SS "void SoSelection::invokeSelectionPolicy (\fBSoPath\fP * path, SbBool shiftdown)\fR [protected]\fP" \fIThis API member is considered internal to the library, as it is not likely to be of interest to the application programmer\&.\fP .br .br .SS "void SoSelection::performSingleSelection (\fBSoPath\fP * path)\fR [protected]\fP" \fIThis API member is considered internal to the library, as it is not likely to be of interest to the application programmer\&.\fP .br .br .SS "void SoSelection::performToggleSelection (\fBSoPath\fP * path)\fR [protected]\fP" \fIThis API member is considered internal to the library, as it is not likely to be of interest to the application programmer\&.\fP .br .br .SS "\fBSoPath\fP * SoSelection::copyFromThis (const \fBSoPath\fP * path) const\fR [protected]\fP" \fIThis API member is considered internal to the library, as it is not likely to be of interest to the application programmer\&.\fP .br .br .SS "void SoSelection::addPath (\fBSoPath\fP * path)\fR [protected]\fP" \fIThis API member is considered internal to the library, as it is not likely to be of interest to the application programmer\&.\fP .br .br .SS "void SoSelection::removePath (const int which)\fR [protected]\fP" \fIThis API member is considered internal to the library, as it is not likely to be of interest to the application programmer\&.\fP .br .br .SS "int SoSelection::findPath (const \fBSoPath\fP * path) const\fR [protected]\fP" \fIThis API member is considered internal to the library, as it is not likely to be of interest to the application programmer\&.\fP .br .br .SS "void SoSelection::handleEvent (\fBSoHandleEventAction\fP * action)\fR [protected]\fP, \fR [virtual]\fP" Action method for \fBSoHandleEventAction\fP\&. .PP Inspects the event data from \fIaction\fP, and processes it if it is something which this node should react to\&. .PP Nodes influencing relevant state variables for how event handling is done also override this method\&. .PP Reimplemented from \fBSoSeparator\fP\&. .PP Reimplemented in \fBSoExtSelection\fP\&. .SH "Member Data Documentation" .PP .SS "\fBSoSFEnum\fP SoSelection::policy" Field for selection policy\&. Default value is SHIFT\&. .SS "\fBSoPathList\fP SoSelection::selectionList\fR [protected]\fP" \fIThis API member is considered internal to the library, as it is not likely to be of interest to the application programmer\&.\fP .br .br .SS "\fBSoCallbackList\fP* SoSelection::selCBList\fR [protected]\fP" \fIThis API member is considered internal to the library, as it is not likely to be of interest to the application programmer\&.\fP .br .br .SS "\fBSoCallbackList\fP* SoSelection::deselCBList\fR [protected]\fP" \fIThis API member is considered internal to the library, as it is not likely to be of interest to the application programmer\&.\fP .br .br .SS "\fBSoCallbackList\fP* SoSelection::startCBList\fR [protected]\fP" \fIThis API member is considered internal to the library, as it is not likely to be of interest to the application programmer\&.\fP .br .br .SS "\fBSoCallbackList\fP* SoSelection::finishCBList\fR [protected]\fP" \fIThis API member is considered internal to the library, as it is not likely to be of interest to the application programmer\&.\fP .br .br .SS "SoSelectionPickCB* SoSelection::pickCBFunc\fR [protected]\fP" \fIThis API member is considered internal to the library, as it is not likely to be of interest to the application programmer\&.\fP .br .br .SS "void* SoSelection::pickCBData\fR [protected]\fP" \fIThis API member is considered internal to the library, as it is not likely to be of interest to the application programmer\&.\fP .br .br .SS "SbBool SoSelection::callPickCBOnlyIfSelectable\fR [protected]\fP" \fIThis API member is considered internal to the library, as it is not likely to be of interest to the application programmer\&.\fP .br .br .SS "\fBSoCallbackList\fP* SoSelection::changeCBList\fR [protected]\fP" \fIThis API member is considered internal to the library, as it is not likely to be of interest to the application programmer\&.\fP .br .br .SS "\fBSoPath\fP* SoSelection::mouseDownPickPath\fR [protected]\fP" \fIThis API member is considered internal to the library, as it is not likely to be of interest to the application programmer\&.\fP .br .br .SS "SbBool SoSelection::pickMatching\fR [protected]\fP" \fIThis API member is considered internal to the library, as it is not likely to be of interest to the application programmer\&.\fP .br .br .SH "Author" .PP Generated automatically by Doxygen for Coin from the source code\&.