.TH "SoCallbackAction" 3 "Tue Dec 26 2023 17:59:22" "Version 4.0.2" "Coin" \" -*- nroff -*- .ad l .nh .SH NAME SoCallbackAction \- The \fBSoCallbackAction\fP class invokes callbacks at specific nodes\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBSoAction\fP\&. .PP Inherited by \fBSoVectorizeAction\fP\&. .SS "Public Types" .in +1c .ti -1c .RI "enum \fBResponse\fP { \fBCONTINUE\fP, \fBABORT\fP, \fBPRUNE\fP }" .br .ti -1c .RI "\fBtypedef\fP \fBResponse\fP \fBSoCallbackActionCB\fP(\fBvoid\fP *userdata, \fBSoCallbackAction\fP *action, \fBconst\fP \fBSoNode\fP *node)" .br .in -1c Public Types inherited from \fBSoAction\fP .in +1c .ti -1c .RI "enum \fBAppliedCode\fP { \fBNODE\fP = 0, \fBPATH\fP = 1, \fBPATH_LIST\fP = 2 }" .br .ti -1c .RI "enum \fBPathCode\fP { \fBNO_PATH\fP = 0, \fBIN_PATH\fP = 1, \fBBELOW_PATH\fP = 2, \fBOFF_PATH\fP = 3 }" .br .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBvirtual\fP \fBSoType\fP \fBgetTypeId\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBSoCallbackAction\fP (\fBvoid\fP)" .br .ti -1c .RI "\fBSoCallbackAction\fP (\fBconst\fP \fBSbViewportRegion\fP &\fBvp\fP)" .br .ti -1c .RI "\fBvirtual\fP \fB~SoCallbackAction\fP (\fBvoid\fP)" .br .ti -1c .RI "\fBvoid\fP \fBsetViewportRegion\fP (\fBconst\fP \fBSbViewportRegion\fP &\fBvp\fP)" .br .ti -1c .RI "\fBvoid\fP \fBaddPreCallback\fP (\fBconst\fP \fBSoType\fP type, \fBSoCallbackActionCB\fP *cb, \fBvoid\fP *userdata)" .br .ti -1c .RI "\fBvoid\fP \fBaddPostCallback\fP (\fBconst\fP \fBSoType\fP type, \fBSoCallbackActionCB\fP *cb, \fBvoid\fP *userdata)" .br .ti -1c .RI "\fBvoid\fP \fBaddPreTailCallback\fP (\fBSoCallbackActionCB\fP *cb, \fBvoid\fP *userdata)" .br .ti -1c .RI "\fBvoid\fP \fBaddPostTailCallback\fP (\fBSoCallbackActionCB\fP *cb, \fBvoid\fP *userdata)" .br .ti -1c .RI "\fBvoid\fP \fBaddTriangleCallback\fP (\fBconst\fP \fBSoType\fP type, SoTriangleCB *cb, \fBvoid\fP *userdata)" .br .ti -1c .RI "\fBvoid\fP \fBaddLineSegmentCallback\fP (\fBconst\fP \fBSoType\fP type, SoLineSegmentCB *cb, \fBvoid\fP *userdata)" .br .ti -1c .RI "\fBvoid\fP \fBaddPointCallback\fP (\fBconst\fP \fBSoType\fP type, SoPointCB *cb, \fBvoid\fP *userdata)" .br .ti -1c .RI "\fBSoDecimationTypeElement::Type\fP \fBgetDecimationType\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "float \fBgetDecimationPercentage\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "float \fBgetComplexity\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBSoComplexity::Type\fP \fBgetComplexityType\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "int32_t \fBgetNumCoordinates\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBconst\fP \fBSbVec3f\fP & \fBgetCoordinate3\fP (\fBconst\fP int index) \fBconst\fP" .br .ti -1c .RI "\fBconst\fP \fBSbVec4f\fP & \fBgetCoordinate4\fP (\fBconst\fP int index) \fBconst\fP" .br .ti -1c .RI "\fBSoDrawStyle::Style\fP \fBgetDrawStyle\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBunsigned\fP short \fBgetLinePattern\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "float \fBgetLineWidth\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "float \fBgetPointSize\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBconst\fP \fBSbName\fP & \fBgetFontName\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "float \fBgetFontSize\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBSoLightModel::Model\fP \fBgetLightModel\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBconst\fP \fBSbVec3f\fP & \fBgetLightAttenuation\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBvoid\fP \fBgetMaterial\fP (\fBSbColor\fP &ambient, \fBSbColor\fP &diffuse, \fBSbColor\fP &specular, \fBSbColor\fP &\fBemission\fP, float &shininess, float &transparency, \fBconst\fP int index=0) \fBconst\fP" .br .ti -1c .RI "\fBSoMaterialBinding::Binding\fP \fBgetMaterialBinding\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "uint32_t \fBgetNumNormals\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBconst\fP \fBSbVec3f\fP & \fBgetNormal\fP (\fBconst\fP int index) \fBconst\fP" .br .ti -1c .RI "\fBSoNormalBinding::Binding\fP \fBgetNormalBinding\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "int32_t \fBgetNumProfileCoordinates\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBconst\fP \fBSbVec2f\fP & \fBgetProfileCoordinate2\fP (\fBconst\fP int index) \fBconst\fP" .br .ti -1c .RI "\fBconst\fP \fBSbVec3f\fP & \fBgetProfileCoordinate3\fP (\fBconst\fP int index) \fBconst\fP" .br .ti -1c .RI "\fBconst\fP \fBSoNodeList\fP & \fBgetProfile\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBSoShapeHints::VertexOrdering\fP \fBgetVertexOrdering\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBSoShapeHints::ShapeType\fP \fBgetShapeType\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBSoShapeHints::FaceType\fP \fBgetFaceType\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "float \fBgetCreaseAngle\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "int32_t \fBgetNumTextureCoordinates\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBconst\fP \fBSbVec2f\fP & \fBgetTextureCoordinate2\fP (\fBconst\fP int index) \fBconst\fP" .br .ti -1c .RI "\fBconst\fP \fBSbVec3f\fP & \fBgetTextureCoordinate3\fP (\fBconst\fP int index) \fBconst\fP" .br .ti -1c .RI "\fBconst\fP \fBSbVec4f\fP & \fBgetTextureCoordinate4\fP (\fBconst\fP int index) \fBconst\fP" .br .ti -1c .RI "\fBSoTextureCoordinateBinding::Binding\fP \fBgetTextureCoordinateBinding\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBconst\fP \fBSbColor\fP & \fBgetTextureBlendColor\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBconst\fP \fBunsigned\fP char * \fBgetTextureImage\fP (\fBSbVec2s\fP &size, int &numcomps) \fBconst\fP" .br .ti -1c .RI "\fBconst\fP \fBunsigned\fP char * \fBgetTextureImage\fP (\fBSbVec3s\fP &size, int &numcomps) \fBconst\fP" .br .ti -1c .RI "\fBconst\fP \fBSbMatrix\fP & \fBgetTextureMatrix\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBSoTexture2::Model\fP \fBgetTextureModel\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBSoTexture2::Wrap\fP \fBgetTextureWrapS\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBSoTexture2::Wrap\fP \fBgetTextureWrapT\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBSoTexture2::Wrap\fP \fBgetTextureWrapR\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBconst\fP \fBSbMatrix\fP & \fBgetModelMatrix\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBSoUnits::Units\fP \fBgetUnits\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "float \fBgetFocalDistance\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBconst\fP \fBSbMatrix\fP & \fBgetProjectionMatrix\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBconst\fP \fBSbMatrix\fP & \fBgetViewingMatrix\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBconst\fP \fBSbViewVolume\fP & \fBgetViewVolume\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBconst\fP \fBSbViewportRegion\fP & \fBgetViewportRegion\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBSoPickStyle::Style\fP \fBgetPickStyle\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "int32_t \fBgetSwitch\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBResponse\fP \fBgetCurrentResponse\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBvoid\fP \fBinvokePreCallbacks\fP (\fBconst\fP \fBSoNode\fP *\fBconst\fP node)" .br .ti -1c .RI "\fBvoid\fP \fBinvokePostCallbacks\fP (\fBconst\fP \fBSoNode\fP *\fBconst\fP node)" .br .ti -1c .RI "\fBvoid\fP \fBinvokeTriangleCallbacks\fP (\fBconst\fP \fBSoShape\fP *\fBconst\fP shape, \fBconst\fP \fBSoPrimitiveVertex\fP *\fBconst\fP \fBv1\fP, \fBconst\fP \fBSoPrimitiveVertex\fP *\fBconst\fP \fBv2\fP, \fBconst\fP \fBSoPrimitiveVertex\fP *\fBconst\fP \fBv3\fP)" .br .ti -1c .RI "\fBvoid\fP \fBinvokeLineSegmentCallbacks\fP (\fBconst\fP \fBSoShape\fP *\fBconst\fP shape, \fBconst\fP \fBSoPrimitiveVertex\fP *\fBconst\fP \fBv1\fP, \fBconst\fP \fBSoPrimitiveVertex\fP *\fBconst\fP \fBv2\fP)" .br .ti -1c .RI "\fBvoid\fP \fBinvokePointCallbacks\fP (\fBconst\fP \fBSoShape\fP *\fBconst\fP shape, \fBconst\fP \fBSoPrimitiveVertex\fP *\fBconst\fP v)" .br .ti -1c .RI "SbBool \fBshouldGeneratePrimitives\fP (\fBconst\fP \fBSoShape\fP *shape) \fBconst\fP" .br .ti -1c .RI "\fBvirtual\fP \fBSoNode\fP * \fBgetCurPathTail\fP (\fBvoid\fP)" .br .ti -1c .RI "\fBvoid\fP \fBsetCurrentNode\fP (\fBSoNode\fP *\fBconst\fP node)" .br .ti -1c .RI "\fBvoid\fP \fBsetCallbackAll\fP (SbBool \fBcallbackall\fP)" .br .ti -1c .RI "SbBool \fBisCallbackAll\fP (\fBvoid\fP) \fBconst\fP" .br .in -1c Public Member Functions inherited from \fBSoAction\fP .in +1c .ti -1c .RI "\fBvirtual\fP \fB~SoAction\fP (\fBvoid\fP)" .br .ti -1c .RI "\fBvirtual\fP SbBool \fBisOfType\fP (\fBSoType\fP type) \fBconst\fP" .br .ti -1c .RI "\fBvirtual\fP \fBvoid\fP \fBapply\fP (\fBSoNode\fP *root)" .br .ti -1c .RI "\fBvirtual\fP \fBvoid\fP \fBapply\fP (\fBSoPath\fP *path)" .br .ti -1c .RI "\fBvirtual\fP \fBvoid\fP \fBapply\fP (\fBconst\fP \fBSoPathList\fP &\fBpathlist\fP, SbBool \fBobeysrules\fP=FALSE)" .br .ti -1c .RI "\fBvoid\fP \fBapply\fP (\fBSoAction\fP *\fBbeingApplied\fP)" .br .ti -1c .RI "\fBvirtual\fP \fBvoid\fP \fBinvalidateState\fP (\fBvoid\fP)" .br .ti -1c .RI "\fBAppliedCode\fP \fBgetWhatAppliedTo\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBSoNode\fP * \fBgetNodeAppliedTo\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBSoPath\fP * \fBgetPathAppliedTo\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBconst\fP \fBSoPathList\fP * \fBgetPathListAppliedTo\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBconst\fP \fBSoPathList\fP * \fBgetOriginalPathListAppliedTo\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "SbBool \fBisLastPathListAppliedTo\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBPathCode\fP \fBgetPathCode\fP (int &\fBnumindices\fP, \fBconst\fP int *&indices)" .br .ti -1c .RI "\fBvoid\fP \fBtraverse\fP (\fBSoNode\fP *\fBconst\fP node)" .br .ti -1c .RI "SbBool \fBhasTerminated\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBconst\fP \fBSoPath\fP * \fBgetCurPath\fP (\fBvoid\fP)" .br .ti -1c .RI "\fBSoState\fP * \fBgetState\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBPathCode\fP \fBgetCurPathCode\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBvoid\fP \fBusePathCode\fP (int &\fBnumindices\fP, \fBconst\fP int *&indices)" .br .ti -1c .RI "\fBvoid\fP \fBpushCurPath\fP (\fBconst\fP int \fBchildindex\fP, \fBSoNode\fP *node=\fBNULL\fP)" .br .ti -1c .RI "\fBvoid\fP \fBpopCurPath\fP (\fBconst\fP \fBPathCode\fP \fBprevpathcode\fP)" .br .ti -1c .RI "\fBvoid\fP \fBpushCurPath\fP (\fBvoid\fP)" .br .ti -1c .RI "\fBvoid\fP \fBpopPushCurPath\fP (\fBconst\fP int \fBchildindex\fP, \fBSoNode\fP *node=\fBNULL\fP)" .br .ti -1c .RI "\fBvoid\fP \fBpopCurPath\fP (\fBvoid\fP)" .br .ti -1c .RI "\fBvoid\fP \fBswitchToPathTraversal\fP (\fBSoPath\fP *path)" .br .ti -1c .RI "\fBvoid\fP \fBswitchToNodeTraversal\fP (\fBSoNode\fP *node)" .br .in -1c .SS "Static Public Member Functions" .in +1c .ti -1c .RI "\fBstatic\fP \fBSoType\fP \fBgetClassTypeId\fP (\fBvoid\fP)" .br .ti -1c .RI "\fBstatic\fP \fBvoid\fP \fBaddMethod\fP (\fBconst\fP \fBSoType\fP type, SoActionMethod method)" .br .ti -1c .RI "\fBstatic\fP \fBvoid\fP \fBenableElement\fP (\fBconst\fP \fBSoType\fP type, \fBconst\fP int \fBstackindex\fP)" .br .ti -1c .RI "\fBstatic\fP \fBvoid\fP \fBinitClass\fP (\fBvoid\fP)" .br .in -1c Static Public Member Functions inherited from \fBSoAction\fP .in +1c .ti -1c .RI "\fBstatic\fP \fBvoid\fP \fBinitClass\fP (\fBvoid\fP)" .br .ti -1c .RI "\fBstatic\fP \fBvoid\fP \fBinitClasses\fP (\fBvoid\fP)" .br .ti -1c .RI "\fBstatic\fP \fBSoType\fP \fBgetClassTypeId\fP (\fBvoid\fP)" .br .ti -1c .RI "\fBstatic\fP \fBvoid\fP \fBnullAction\fP (\fBSoAction\fP *action, \fBSoNode\fP *node)" .br .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "\fBvirtual\fP \fBconst\fP \fBSoEnabledElementsList\fP & \fBgetEnabledElements\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBvirtual\fP \fBvoid\fP \fBbeginTraversal\fP (\fBSoNode\fP *node)" .br .in -1c Protected Member Functions inherited from \fBSoAction\fP .in +1c .ti -1c .RI "\fBSoAction\fP (\fBvoid\fP)" .br .ti -1c .RI "\fBvirtual\fP \fBvoid\fP \fBendTraversal\fP (\fBSoNode\fP *node)" .br .ti -1c .RI "\fBvoid\fP \fBsetTerminated\fP (\fBconst\fP SbBool \fBflag\fP)" .br .ti -1c .RI "\fBvirtual\fP SbBool \fBshouldCompactPathList\fP (\fBvoid\fP) \fBconst\fP" .br .in -1c .SS "Static Protected Member Functions" .in +1c .ti -1c .RI "\fBstatic\fP \fBSoEnabledElementsList\fP * \fBgetClassEnabledElements\fP (\fBvoid\fP)" .br .ti -1c .RI "\fBstatic\fP \fBSoActionMethodList\fP * \fBgetClassActionMethods\fP (\fBvoid\fP)" .br .in -1c Static Protected Member Functions inherited from \fBSoAction\fP .in +1c .ti -1c .RI "\fBstatic\fP \fBSoEnabledElementsList\fP * \fBgetClassEnabledElements\fP (\fBvoid\fP)" .br .ti -1c .RI "\fBstatic\fP \fBSoActionMethodList\fP * \fBgetClassActionMethods\fP (\fBvoid\fP)" .br .in -1c .SS "Additional Inherited Members" Protected Attributes inherited from \fBSoAction\fP .in +1c .ti -1c .RI "\fBSoState\fP * \fBstate\fP" .br .ti -1c .RI "\fBSoActionMethodList\fP * \fBtraversalMethods\fP" .br .in -1c .SH "Detailed Description" .PP The \fBSoCallbackAction\fP class invokes callbacks at specific nodes\&. This action has mechanisms for tracking traversal position and traversal state\&. In combination with the ability to pass geometry primitives to callback actions set by the user, this does for instance make it rather straightforward to extract the geometry of a scene graph\&. .PP You should be able to use this action for most of your 'simple' traversal needs, instead of cooking up your own code, as the \fBSoCallbackAction\fP is rather flexible\&. .PP A common use of this action is to extract geometry of non-primitive shapes as triangles\&. A full-fledged example that demonstrates this on a scene graph with two spheres follows: .PP .PP .nf #include #include #include #include #include #include #include #include #include static SoCoordinate3 * coord3 = NULL; static SoIndexedFaceSet * ifs = NULL; static int coord3idx = 0; static void triangle_cb(void * userdata, SoCallbackAction * action, const SoPrimitiveVertex * v1, const SoPrimitiveVertex * v2, const SoPrimitiveVertex * v3) { const SbVec3f vtx[] = { v1\->getPoint(), v2\->getPoint(), v3\->getPoint() }; const SbMatrix mm = action\->getModelMatrix(); SbVec3f vx[3]; for (int j=0; j < 3; j++) { mm\&.multVecMatrix(vtx[j], vx[j]); } // (This is sub\-optimal \-\- should scan for the same vertex // coordinates already being present in the SoCoordinate3 // node\&. We'll get lots of duplicate coordinates from this\&.) coord3\->point\&.setNum(coord3\->point\&.getNum() + 3); coord3\->point\&.setValues(coord3idx, 3, vx); int32_t indices[] = { coord3idx, coord3idx + 1, coord3idx + 2, \-1 }; coord3idx += 3; int oldsize = ifs\->coordIndex\&.getNum(); ifs\->coordIndex\&.setNum(oldsize + 4); ifs\->coordIndex\&.setValues(oldsize, 4, indices); // (Note that it would likely be desirable to grab normal vectors, // materials and / or texture coordinates in a real\-world // application\&. How to do this is not shown by the above code, // but it is not much different from the extraction of vertex // coordinates\&.) } int main(void) { SoDB::init(); SoSeparator * root = new SoSeparator; root\->addChild(new SoSphere); SoTranslation * trans = new SoTranslation; trans\->translation\&.setValue(10, 0, 0); root\->addChild(trans); SoSphere * ss = new SoSphere; ss\->radius = 3; root\->addChild(ss); root\->ref(); coord3 = new SoCoordinate3; coord3\->point\&.setNum(0); ifs = new SoIndexedFaceSet; ifs\->coordIndex\&.setNum(0); SoCallbackAction ca; ca\&.addTriangleCallback(SoShape::getClassTypeId(), triangle_cb, NULL); ca\&.apply(root); root\->unref(); // [the generated SoCoordinate3 and SoIndexedFaceSet nodes would now // typically be used in a scene graph in a viewer, or written to disk // or something] return 0; } .fi .PP .SH "Member Typedef Documentation" .PP .SS "\fBResponse\fP SoCallbackAction::SoCallbackActionCB" Callback functions need to be of this type\&. \fInode\fP is at the current traversal point in the scene graph\&. .SH "Member Enumeration Documentation" .PP .SS "\fBenum\fP \fBSoCallbackAction::Response\fP" Response values for callback function\&. .PP \fBEnumerator\fP .in +1c .TP \fB\fICONTINUE \fP\fP Continue traversal as usual\&. .TP \fB\fIABORT \fP\fP Abort traversal immediately\&. No other callbacks are called after this has been returned\&. .TP \fB\fIPRUNE \fP\fP Don't do traversal of neither the current node (if returning from a pre-traversal callback) nor its children\&. .PP If returned from a pre-callback, the post-callbacks will still be called\&. If returned from a post-callback, the behaviour will be the same as for returning CONTINUE\&. .SH "Constructor & Destructor Documentation" .PP .SS "SoCallbackAction::SoCallbackAction (\fBvoid\fP)" Default constructor\&. Will set the viewport to a standard viewport with size 640x512\&. .SS "SoCallbackAction::SoCallbackAction (\fBconst\fP \fBSbViewportRegion\fP & vp)" Constructor which lets you specify the viewport\&. .PP This constructor is an extension versus the Open Inventor API\&. .SS "SoCallbackAction::~SoCallbackAction (\fBvoid\fP)\fC [virtual]\fP" Destructor\&. .SH "Member Function Documentation" .PP .SS "\fBSoType\fP SoCallbackAction::getTypeId (\fBvoid\fP) const\fC [virtual]\fP" Returns the type identification of an object derived from a class inheriting \fBSoAction\fP\&. This is used for runtime type checking and 'downward' casting\&. .br .PP Implements \fBSoAction\fP\&. .PP Reimplemented in \fBSoVectorizeAction\fP, and \fBSoVectorizePSAction\fP\&. .SS "\fBSoType\fP SoCallbackAction::getClassTypeId (\fBvoid\fP)\fC [static]\fP" This static method returns the \fBSoType\fP object associated with objects of this class\&. .br .SS "\fBvoid\fP SoCallbackAction::addMethod (\fBconst\fP \fBSoType\fP type, SoActionMethod method)\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 .br .br .SS "\fBvoid\fP SoCallbackAction::enableElement (\fBconst\fP \fBSoType\fP type, \fBconst\fP int stackindex)\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 .br .br .SS "\fBconst\fP \fBSoEnabledElementsList\fP & SoCallbackAction::getEnabledElements (\fBvoid\fP) const\fC [protected]\fP, \fC [virtual]\fP" Returns list of enabled elements\&. .br .PP Reimplemented from \fBSoAction\fP\&. .PP Reimplemented in \fBSoVectorizeAction\fP, and \fBSoVectorizePSAction\fP\&. .SS "\fBSoEnabledElementsList\fP * SoCallbackAction::getClassEnabledElements (\fBvoid\fP)\fC [static]\fP, \fC [protected]\fP" Returns list of enabled elements for this class\&. The enabledElements and methods variables are protected in the original OIV API\&. This is not such a good idea, since exposed static class member variables is a major grievance with regard to Win32 DLLs\&. This function is an extension for Coin, and it is not available in the original SGI Open Inventor \fBv2\&.1\fP API\&. .br .br .SS "\fBSoActionMethodList\fP * SoCallbackAction::getClassActionMethods (\fBvoid\fP)\fC [static]\fP, \fC [protected]\fP" Returns list of action methods for this class\&. The enabledElements and methods variables are protected in the original OIV API\&. This is not such a good idea, since exposed static class member variables is a major grievance with regard to Win32 DLLs\&. This function is an extension for Coin, and it is not available in the original SGI Open Inventor \fBv2\&.1\fP API\&. .br .br .SS "\fBvoid\fP SoCallbackAction::initClass (\fBvoid\fP)\fC [static]\fP" Initializes the runtime type system for this class, and sets up the enabled elements and action method list\&. .SS "\fBvoid\fP SoCallbackAction::setViewportRegion (\fBconst\fP \fBSbViewportRegion\fP & vp)" Sets the viewport region for this action\&. When set, the viewport element is initialized right before a traversal starts, making it the current viewport\&. .PP This method is an extension versus the Open Inventor API\&. .SS "\fBvoid\fP SoCallbackAction::addPreCallback (\fBconst\fP \fBSoType\fP type, \fBSoCallbackActionCB\fP * cb, \fBvoid\fP * userdata)" Set a function \fIcb\fP to call before every node of \fItype\fP is traversed\&. \fIcb\fP will be called with \fIuserdata\fP\&. .SS "\fBvoid\fP SoCallbackAction::addPostCallback (\fBconst\fP \fBSoType\fP type, \fBSoCallbackActionCB\fP * cb, \fBvoid\fP * userdata)" Set a function \fIcb\fP to call after every node of \fItype\fP has been traversed\&. \fIcb\fP will be called with \fIuserdata\fP\&. .SS "\fBvoid\fP SoCallbackAction::addPreTailCallback (\fBSoCallbackActionCB\fP * cb, \fBvoid\fP * userdata)" Set a function \fIcb\fP to call before the tail of a path is traversed\&. \fIcb\fP will be called with \fIuserdata\fP\&. .SS "\fBvoid\fP SoCallbackAction::addPostTailCallback (\fBSoCallbackActionCB\fP * cb, \fBvoid\fP * userdata)" Set a function \fIcb\fP to call after the tail of a path has been traversed\&. \fIcb\fP will be called with \fIuserdata\fP\&. .SS "\fBvoid\fP SoCallbackAction::addTriangleCallback (\fBconst\fP \fBSoType\fP type, SoTriangleCB * cb, \fBvoid\fP * userdata)" Set a function \fIcb\fP to call when traversing a node of \fItype\fP which generates triangle primitives for rendering\&. \fIcb\fP will be called with \fIuserdata\fP\&. .SS "\fBvoid\fP SoCallbackAction::addLineSegmentCallback (\fBconst\fP \fBSoType\fP type, SoLineSegmentCB * cb, \fBvoid\fP * userdata)" Set a function \fIcb\fP to call when traversing a node of \fItype\fP which generates line primitives for rendering\&. \fIcb\fP will be called with \fIuserdata\fP\&. .SS "\fBvoid\fP SoCallbackAction::addPointCallback (\fBconst\fP \fBSoType\fP type, SoPointCB * cb, \fBvoid\fP * userdata)" Set a function \fIcb\fP to call when traversing a node of \fItype\fP which generates single point primitives for rendering\&. \fIcb\fP will be called with \fIuserdata\fP\&. .SS "\fBSoDecimationTypeElement::Type\fP SoCallbackAction::getDecimationType (\fBvoid\fP) const" Returns current decimation type setting\&. .SS "float SoCallbackAction::getDecimationPercentage (\fBvoid\fP) const" Returns current decimation percentage setting\&. .SS "float SoCallbackAction::getComplexity (\fBvoid\fP) const" Returns current complexity setting\&. .SS "\fBSoComplexity::Type\fP SoCallbackAction::getComplexityType (\fBvoid\fP) const" Returns current complexity type setting\&. .SS "int32_t SoCallbackAction::getNumCoordinates (\fBvoid\fP) const" Returns current number of coordinates in the state\&. .SS "\fBconst\fP \fBSbVec3f\fP & SoCallbackAction::getCoordinate3 (\fBconst\fP int index) const" Returns a coordinate triplet from the current state pool of coordinates\&. .SS "\fBconst\fP \fBSbVec4f\fP & SoCallbackAction::getCoordinate4 (\fBconst\fP int index) const" Returns a coordinate quadruplet from the current state pool of coordinates\&. .SS "\fBSoDrawStyle::Style\fP SoCallbackAction::getDrawStyle (\fBvoid\fP) const" Returns current draw style setting\&. .SS "\fBunsigned\fP short SoCallbackAction::getLinePattern (\fBvoid\fP) const" Returns current line pattern setting\&. .SS "float SoCallbackAction::getLineWidth (\fBvoid\fP) const" Returns current line width setting\&. .SS "float SoCallbackAction::getPointSize (\fBvoid\fP) const" Returns current point size setting\&. .SS "\fBconst\fP \fBSbName\fP & SoCallbackAction::getFontName (\fBvoid\fP) const" Returns current font name setting\&. .SS "float SoCallbackAction::getFontSize (\fBvoid\fP) const" Returns current font size setting\&. .SS "\fBSoLightModel::Model\fP SoCallbackAction::getLightModel (\fBvoid\fP) const" Returns current light model setting\&. .SS "\fBconst\fP \fBSbVec3f\fP & SoCallbackAction::getLightAttenuation (\fBvoid\fP) const" Returns current light attenuation setting\&. .SS "\fBvoid\fP SoCallbackAction::getMaterial (\fBSbColor\fP & ambient, \fBSbColor\fP & diffuse, \fBSbColor\fP & specular, \fBSbColor\fP & emission, float & shininess, float & transparency, \fBconst\fP int index = \fC0\fP) const" Returns current material settings\&. .SS "\fBSoMaterialBinding::Binding\fP SoCallbackAction::getMaterialBinding (\fBvoid\fP) const" Returns current material binding setting\&. .SS "uint32_t SoCallbackAction::getNumNormals (\fBvoid\fP) const" Returns current number of normals in the state\&. .SS "\fBconst\fP \fBSbVec3f\fP & SoCallbackAction::getNormal (\fBconst\fP int index) const" Returns the normal vectors at \fIindex\fP from the current state\&. .SS "\fBSoNormalBinding::Binding\fP SoCallbackAction::getNormalBinding (\fBvoid\fP) const" Returns current normal binding setting\&. .SS "int32_t SoCallbackAction::getNumProfileCoordinates (\fBvoid\fP) const" Returns current number of profile coordinates in the state\&. .SS "\fBconst\fP \fBSbVec2f\fP & SoCallbackAction::getProfileCoordinate2 (\fBconst\fP int index) const" Returns current number of \fBSbVec2f\fP profile coordinates in the state\&. .SS "\fBconst\fP \fBSbVec3f\fP & SoCallbackAction::getProfileCoordinate3 (\fBconst\fP int index) const" Returns current number of \fBSbVec3f\fP profile coordinates in the state\&. .SS "\fBconst\fP \fBSoNodeList\fP & SoCallbackAction::getProfile (\fBvoid\fP) const" Returns current list of profile nodes\&. .SS "\fBSoShapeHints::VertexOrdering\fP SoCallbackAction::getVertexOrdering (\fBvoid\fP) const" Returns current vertex ordering shape hint setting\&. .PP Please note that this is the vertex ordering set by the \fBSoShapeHints\fP node\&. If you want to find the vertex ordering for VRML nodes you'll need to read this directly from the \fIccw\fP field in those nodes\&. .SS "\fBSoShapeHints::ShapeType\fP SoCallbackAction::getShapeType (\fBvoid\fP) const" Returns current shape type hint setting\&. .PP Please note that this is the shape type set by the \fBSoShapeHints\fP node\&. If you want to find the shape type for VRML nodes you'll need to read this directly from the \fIsolid\fP field in those nodes\&. .SS "\fBSoShapeHints::FaceType\fP SoCallbackAction::getFaceType (\fBvoid\fP) const" Returns current face type hint setting\&. .PP Please note that this is the face type set by the \fBSoShapeHints\fP node\&. If you want to find the face type for VRML nodes you'll need to read this directly from the \fIconvex\fP field in those nodes\&. .SS "float SoCallbackAction::getCreaseAngle (\fBvoid\fP) const" Returns current crease angle setting\&. Please note that this is the crease angle value set by the \fBSoShapeHints\fP node\&. If you want to find the crease angle for VRML nodes you'll need to read this directly from the creaseAngle field in those nodes\&. .SS "int32_t SoCallbackAction::getNumTextureCoordinates (\fBvoid\fP) const" Returns current number of texture coordinates in the traversal state\&. .SS "\fBconst\fP \fBSbVec2f\fP & SoCallbackAction::getTextureCoordinate2 (\fBconst\fP int index) const" Returns \fBSbVec2f\fP texture coordinate at \fIindex\fP from the texture coordinate pool of the traversal state\&. .SS "\fBconst\fP \fBSbVec3f\fP & SoCallbackAction::getTextureCoordinate3 (\fBconst\fP int index) const" Returns \fBSbVec3f\fP texture coordinate at \fIindex\fP from the texture coordinate pool of the traversal state\&. .PP This function is an extension for Coin, and it is not available in the original SGI Open Inventor \fBv2\&.1\fP API\&. .br .PP \fBSince\fP .RS 4 Coin \fB2\&.0\fP .RE .PP .SS "\fBconst\fP \fBSbVec4f\fP & SoCallbackAction::getTextureCoordinate4 (\fBconst\fP int index) const" Returns \fBSbVec4f\fP texture coordinate at \fIindex\fP from the texture coordinate pool of the traversal state\&. .SS "\fBSoTextureCoordinateBinding::Binding\fP SoCallbackAction::getTextureCoordinateBinding (\fBvoid\fP) const" Returns current texture coordinate binding setting\&. .SS "\fBconst\fP \fBSbColor\fP & SoCallbackAction::getTextureBlendColor (\fBvoid\fP) const" Returns current texture blend color setting\&. .SS "\fBconst\fP \fBunsigned\fP char * SoCallbackAction::getTextureImage (\fBSbVec2s\fP & size, int & numcomps) const" Returns current texture image settings\&. .SS "\fBconst\fP \fBunsigned\fP char * SoCallbackAction::getTextureImage (\fBSbVec3s\fP & size, int & numcomps) const" Returns current 3D texture image settings\&. .PP This function is an extension for Coin, and it is not available in the original SGI Open Inventor \fBv2\&.1\fP API\&. .br .PP \fBSince\fP .RS 4 Coin \fB2\&.0\fP .RE .PP .SS "\fBconst\fP \fBSbMatrix\fP & SoCallbackAction::getTextureMatrix (\fBvoid\fP) const" Returns current texture transformation matrix setting\&. .SS "\fBSoTexture2::Model\fP SoCallbackAction::getTextureModel (\fBvoid\fP) const" Returns current texture mapping model setting\&. .SS "\fBSoTexture2::Wrap\fP SoCallbackAction::getTextureWrapS (\fBvoid\fP) const" Returns current texture wrapping setting for the \fCS\fP coordinate\&. .SS "\fBSoTexture2::Wrap\fP SoCallbackAction::getTextureWrapT (\fBvoid\fP) const" Returns current texture wrapping setting for the \fCT\fP coordinate\&. .SS "\fBSoTexture2::Wrap\fP SoCallbackAction::getTextureWrapR (\fBvoid\fP) const" Returns current texture wrapping setting for the \fCR\fP coordinate\&. .PP This function is an extension for Coin, and it is not available in the original SGI Open Inventor \fBv2\&.1\fP API\&. .br .PP \fBSince\fP .RS 4 Coin \fB2\&.0\fP .RE .PP .SS "\fBconst\fP \fBSbMatrix\fP & SoCallbackAction::getModelMatrix (\fBvoid\fP) const" Returns current model matrix\&. .SS "\fBSoUnits::Units\fP SoCallbackAction::getUnits (\fBvoid\fP) const" Returns current units setting\&. .SS "float SoCallbackAction::getFocalDistance (\fBvoid\fP) const" Returns current camera focal distance setting\&. .SS "\fBconst\fP \fBSbMatrix\fP & SoCallbackAction::getProjectionMatrix (\fBvoid\fP) const" Returns current projection matrix\&. .SS "\fBconst\fP \fBSbMatrix\fP & SoCallbackAction::getViewingMatrix (\fBvoid\fP) const" Returns current viewing matrix\&. .SS "\fBconst\fP \fBSbViewVolume\fP & SoCallbackAction::getViewVolume (\fBvoid\fP) const" Returns current view volume setting\&. .SS "\fBconst\fP \fBSbViewportRegion\fP & SoCallbackAction::getViewportRegion (\fBvoid\fP) const" Returns current viewport region setting\&. .PP This method is an extension versus the Open Inventor API\&. .SS "\fBSoPickStyle::Style\fP SoCallbackAction::getPickStyle (\fBvoid\fP) const" Returns current pick style setting\&. .SS "int32_t SoCallbackAction::getSwitch (\fBvoid\fP) const" Returns last \fBSoSwitch::whichChild\fP setting during the traversal\&. .SS "\fBSoCallbackAction::Response\fP SoCallbackAction::getCurrentResponse (\fBvoid\fP) const" \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 "\fBvoid\fP SoCallbackAction::invokePreCallbacks (\fBconst\fP \fBSoNode\fP *\fBconst\fP node)" \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 Invoke all 'pre traversal' callbacks\&. .SS "\fBvoid\fP SoCallbackAction::invokePostCallbacks (\fBconst\fP \fBSoNode\fP *\fBconst\fP node)" \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 Invoke all 'post traversal' callbacks\&. .SS "\fBvoid\fP SoCallbackAction::invokeTriangleCallbacks (\fBconst\fP \fBSoShape\fP *\fBconst\fP shape, \fBconst\fP \fBSoPrimitiveVertex\fP *\fBconst\fP v1, \fBconst\fP \fBSoPrimitiveVertex\fP *\fBconst\fP v2, \fBconst\fP \fBSoPrimitiveVertex\fP *\fBconst\fP v3)" \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 Invoke all 'triangle generation' callbacks\&. .SS "\fBvoid\fP SoCallbackAction::invokeLineSegmentCallbacks (\fBconst\fP \fBSoShape\fP *\fBconst\fP shape, \fBconst\fP \fBSoPrimitiveVertex\fP *\fBconst\fP v1, \fBconst\fP \fBSoPrimitiveVertex\fP *\fBconst\fP v2)" \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 Invoke all 'line segment generation' callbacks\&. .SS "\fBvoid\fP SoCallbackAction::invokePointCallbacks (\fBconst\fP \fBSoShape\fP *\fBconst\fP shape, \fBconst\fP \fBSoPrimitiveVertex\fP *\fBconst\fP v)" \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 Invoke all 'point' callbacks\&. .SS "SbBool SoCallbackAction::shouldGeneratePrimitives (\fBconst\fP \fBSoShape\fP * shape) const" \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 Check from the shape nodes whether or not to generate primitives from the complex shapes\&. If there are no callbacks attached to the node types, making the primitives would only be a waste of CPU\&. .SS "\fBSoNode\fP * SoCallbackAction::getCurPathTail (\fBvoid\fP)\fC [virtual]\fP" Returns the current tail of the traversal path for the callback action\&. .PP Reimplemented from \fBSoAction\fP\&. .SS "\fBvoid\fP SoCallbackAction::setCurrentNode (\fBSoNode\fP *\fBconst\fP node)" Used from nodes during traversal to keep a current node pointer in the action\&. .SS "\fBvoid\fP SoCallbackAction::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 scene graph 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 scene graph traversal\&. .PP Reimplemented from \fBSoAction\fP\&. .SH "Author" .PP Generated automatically by Doxygen for Coin from the source code\&.