'\"! tbl | mmdoc '\"macro stdmacro .ie n \{\ . ds Cr \fB . ds Cb \fB .\} .el \{\ . ds Cr \f7 . ds Cb \f8 .\} .TH SoBaseKit(3IV) .SH NAME SoBaseKit \(em base class for all node kits .SH INHERITS FROM SoBase > SoFieldContainer > SoNode > SoBaseKit .SH SYNOPSIS .ps -1 \*(Cr#include .sp .in 1i \f1Parts from class SoBaseKit: .in 0.5i .sp .ta 21m .in 1i+21n .ti 0.5i .ta 21m .ds Pt \*(Cr(SoNodeKitListPart) .ie \w'\*(Pt'>=21n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbcallbackList\*(Cr .sp .in 1i \f1Methods from class SoBaseKit: .in 0.5i .sp .ta 25m .in 1i+25n .ti 0.5i .ta 25m .ds Pt \*(Cr .ie \w'\*(Pt'>=25n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbSoBaseKit\*(Cr() .br .in 1i+25n .ti 0.5i .ta 25m .ds Pt \*(Crstatic const SoNodekitCatalog * .ie \w'\*(Pt'>=25n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetClassNodekitCatalog\*(Cr() const .br .in 1i+25n .ti 0.5i .ta 25m .ds Pt \*(Crvirtual const SoNodekitCatalog * .ie \w'\*(Pt'>=25n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetNodekitCatalog\*(Cr() const .br .in 1i+25n .ti 0.5i .ta 25m .ds Pt \*(Crvirtual SoNode * .ie \w'\*(Pt'>=25n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetPart\*(Cr(const SbName &partName, SbBool makeIfNeeded) .br .in 1i+25n .ti 0.5i .ta 25m .ds Pt \*(CrSbString .ie \w'\*(Pt'>=25n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetPartString\*(Cr(const SoBase *part) .br .in 1i+25n .ti 0.5i .ta 25m .ds Pt \*(Crvirtual SoNodeKitPath * .ie \w'\*(Pt'>=25n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbcreatePathToPart\*(Cr(const SbName &partName, SbBool makeIfNeeded, const SoPath *pathToExtend = NULL) .br .in 1i+25n .ti 0.5i .ta 25m .ds Pt \*(Crvirtual SbBool .ie \w'\*(Pt'>=25n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetPart\*(Cr(const SbName &partName, SoNode *newPart) .br .in 1i+25n .ti 0.5i .ta 25m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=25n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbset\*(Cr(char *partName, char *parameters) .br .in 1i+25n .ti 0.5i .ta 25m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=25n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbset\*(Cr(char *nameValuePairs) .br .in 1i+25n .ti 0.5i .ta 25m .ds Pt \*(Crstatic SbBool .ie \w'\*(Pt'>=25n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbisSearchingChildren\*(Cr() .br .in 1i+25n .ti 0.5i .ta 25m .ds Pt \*(Crstatic void .ie \w'\*(Pt'>=25n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetSearchingChildren\*(Cr(SbBool newVal) .br .in 1i+25n .ti 0.5i .ta 25m .ds Pt \*(Crstatic SoType .ie \w'\*(Pt'>=25n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetClassTypeId\*(Cr() .sp .in 1i \f1Methods from class SoNode: .in 0.5i .sp .ta 20m .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetOverride\*(Cr(SbBool state) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbisOverride\*(Cr() const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSoNode * .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbcopy\*(Cr(SbBool copyConnections = FALSE) const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvirtual SbBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbaffectsState\*(Cr() const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crstatic SoNode * .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetByName\*(Cr(const SbName &name) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crstatic int .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetByName\*(Cr(const SbName &name, SoNodeList &list) .sp .in 1i \f1Methods from class SoFieldContainer: .in 0.5i .sp .ta 20m .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetToDefaults\*(Cr() .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbhasDefaultValues\*(Cr() const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbfieldsAreEqual\*(Cr(const SoFieldContainer *fc) const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbcopyFieldValues\*(Cr(const SoFieldContainer *fc, SbBool copyConnections = FALSE) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbget\*(Cr(SbString &fieldDataString) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvirtual int .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetFields\*(Cr(SoFieldList &resultList) const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvirtual SoField * .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetField\*(Cr(const SbName &fieldName) const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetFieldName\*(Cr(const SoField *field, SbName &fieldName) const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbisNotifyEnabled\*(Cr() const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbenableNotify\*(Cr(SbBool flag) .sp .in 1i \f1Methods from class SoBase: .in 0.5i .sp .ta 20m .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbref\*(Cr() .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbunref\*(Cr() const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbunrefNoDelete\*(Cr() const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbtouch\*(Cr() .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvirtual SoType .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetTypeId\*(Cr() const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbisOfType\*(Cr(SoType type) const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvirtual void .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetName\*(Cr(const SbName &name) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvirtual SbName .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetName\*(Cr() const .sp .in 1i \f1Macros from class SoBaseKit: .in 0.5i .sp \*(CbSO_GET_PART\*(Cr(kit, partName, partClass) .br \*(CbSO_CHECK_PART\*(Cr(kit, partName, partClass) .sp .SH DESCRIPTION This is the base class from which all nodekit nodes are derived. Nodekits provide a convenient mechanism for creating groups of scene graph nodes with some larger meaning. When you create a shape node such \&as an indexed face set, for example, you almost always precede it with a coordinate node. You may also want to add a transform node or specify properties with material, drawing style, material binding, \&etc. Instead of creating each of these nodes individually and then arranging them into a subgraph, you can use a nodekit of the appropriate type (in this case, \*(CbSoShapeKit\f1). .sp Each class of nodekit has a \f2nodekit catalog\f1 (\*(CbSoNodekitCatalog\f1) that describes \&the nodes in the subgraph, referred to as \f2parts\f1. The catalog has an entry for each part, with information such as the \f2partName\f1, \f2partType\f1, and \f2nullByDefault\f1 (if FALSE the constructor creates it). The catalog also describes the arrangement \&of parts in the subgraph. (Other information is described below; a complete description is in the \*(CbSoNodekitCatalog\f1 reference page.) .sp If we regard the scene graph arrangement as a branching tree, then the top node (root) \&of the arrangement is always the nodekit itself. The leaf nodes are those at the bottom (containing no children). Some leaves of the tree are defined in the catalog to be \f2public\f1 parts, while other leaves \&are \f2private\f1. All non-leaf parts are considered internal to the nodekit structure and are marked private. Public parts are accessible; they may be requested, changed, or set by the programmer with member functions \&such as \*(CbgetPart()\f1. Private parts are not accessible, so methods such as \*(CbgetPart()\f1 will have no effect on them. For example, if you call \*(CbgetPart()\f1 to retrieve a private part, \*(CrNULL\f1 will be returned even when the part exists. .sp Every \&nodekit reference page has a Parts section describing the function of each public part it adds to those inherited from its parent class. Also, a Catalog Parts section has tables of often-needed information \&from the catalog (part type, etc.). These tables include all public parts, both new and inherited. Only the public parts of a nodekit are described in the reference pages. Nodekits take care of the rest \&for you; they automatically arrange the subgraph, creating and deleting the private parts when necessary. (The \*(CbSoNodekitCatalog\f1 reference page has methods for finding out the part names and arrangement of all parts, \&both public and private.) .sp The nodekit catalog is a template shared by all instances of a class. They use the shared catalog as a \f2guide\f1 when creating parts (i.e., constructing actual nodes), but each instance \&stores its own parts separately. Moreover, nodekits are \f2not\f1 \*(CbSoGroup\f1 nodes, and parts are added as \f2hidden children\f1; you can only access parts with the methods of \*(CbSoBaseKit\f1 and its derived classes. .sp Any public part may be retrieved with \*(CbgetPart()\f1, \&installed with \*(CbsetPart()\f1, or removed by giving a \*(CrNULL\f1 argument to \*(CbsetPart()\f1. Paths from the nodekit down to a part can be created by \*(CbcreatePathToPart()\f1. .sp By default, parts are not created until the user requests or sets them. This keeps the \&subgraph uncluttered and efficient for traversal. Additionally, removing a part (setting it to NULL) has the extra effect of removing any internal parts that are no longer needed. .sp Since nodekits hide their \&children, any \*(CbSoPath\f1 containing nodekits will end at the topmost nodekit. However, since nodekits may be nested within other nodekits, you may wish to cast an \*(Cb(SoPath *)\f1 into an \*(Cb(SoNodeKitPath *)\f1. The methods of \*(CbSoNodeKitPath\f1 allow you to view all \&nodekits that lie on the path (see the reference page for \*(CbSoNodeKitPath\f1). .sp Public parts in the nodekit catalog fall into three categories: .sp [1] \f2regular nodes\f1 .sp [2] \f2nodekits\f1, or \f2nested nodekits\f1 (which may nest recursively). Any node which is public in a \&nested nodekit is accessible to the higher level nodekit(s) that contains it. The description of \*(CbgetPart()\f1 below shows how to refer to nested parts by name (e.g., \*(Cr"appearance.material"\f1). This works for any nodekit method that \&takes a part name for an argument. .sp [3] \f2lists\f1, or \f2list parts\f1. These parts group together children (\f2list elements\f1) of a particular type or types. As with nested nodekits, you can refer to individual elements using notation described \&in \*(CbgetPart()\f1 (e.g., \*(Cr"childList[0]"\f1, or if the list elements are in turn nodekits, \*(Cr"childList[2].transform"\f1). .sp When the catalog denotes that a part is a list, the part itself is always a node of type \*(CbSoNodeKitListPart\f1. The catalog specifies a set of permissible \*(CrlistItemTypes\f1 and \&a \*(CrlistContainerType\f1 for that part. It gives this information to the \*(CbSoNodeKitListPart\f1 when it creates it. From then on, the list part will enforce type checking. So even if you retrieve the \*(CbSoNodeKitListPart\f1 with \*(CbgetPart()\f1, you will not be able to add illegal \&children. (See the \*(CbSoNodeKitListPart\f1 reference page for more information). As an example, the \f2callbackList\f1 part of \*(CbSoBaseKit\f1 has an \*(CbSoSeparator\f1 container and allows only \*(CbSoCallback\f1 and \*(CbSoEventCallback\f1 nodes in the list. Children may be added, retrieved, and removed from \&an \*(CbSoNodeKitListPart\f1 node using methods that parallel those of \*(CbSoGroup\f1. However, type-checking is strictly enforced. .sp Note that, although all public parts are leaves in the nodekit catalog, you are free to add children to them \&(assuming that they are groups, nodekits, or list parts). A part's status as a leaf in the catalog just means that the nodekit will not manage the part's children. For example, \*(CbSoWrapperKit\f1 has a part called \f2contents\f1 with \&a part type of \*(CbSoSeparator\f1. You can put whatever you want underneath the separator, as long as \f2contents\f1 itself is an \*(CbSoSeparator\f1. .sp Thus, a nodekit only controls a section of the scene graph. Above and below that section, anything \&goes. .sp However, when nodekits are nested, they effectively create a larger `known' section of the scene graph. For example, the \f2appearance\f1 part of the \*(CbSoSeparatorKit\f1 is a leaf node in the \*(CbSoSeparatorKit\f1 catalog. But \f2appearance\f1 is in turn an \*(CbSoAppearanceKit\f1, containing \&parts such as \f2material\f1 and \f2drawStyle\f1. The two nodekits combine to make an even larger template, which the \*(CbSoSeparatorKit\f1 can examine by looking at the catalogs for both classes. So an \*(CbSoSeparatorKit\f1 can successfully return a part named \*(Cr"material"\f1; first it \&finds (or creates) the \f2appearance\f1 part, then it gets the \f2material\f1 by calling \*(CbgetPart()\f1 on the \f2appearance\f1. .sp When the catalog defines the \*(CrlistItemTypes\f1 of a list part to be nodekits, the name-able space expands further. For example, \*(CbSoSeparatorKit\f1 has a part \f2childList\f1 which \&permits only \*(CbSoSeparatorKits\f1, so each list element can be further searched. Hence the name \*(Cb"childList[0].childList[1].childList[2].material"\f1 is perfectly legal. .SH PARTS .ta 21m .in 1i+21n .ti 0.5i .ta 21m .ds Pt \*(Cr(SoNodeKitListPart) .ie \w'\*(Pt'>=21n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbcallbackList\*(Cr .br .in 1i \f1This is the only part that the base class \*(CbSoBaseKit\f1 creates. It is a public part that is inherited by \f2all\f1 nodekits. It provides an easy way to add callbacks for a nodekit to use during action traversal \&(e.g. \*(CbSoHandleEventAction\f1). It is a list part and may contain numerous \*(CbSoCallback\f1 and/or \*(CbSoEventCallback\f1 nodes. .sp .in 0.5i .SH METHODS .ta 25m .in 1i+25n .ti 0.5i .ta 25m .ds Pt \*(Cr .ie \w'\*(Pt'>=25n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbSoBaseKit\*(Cr() .br .in 1i \f1Constructor. .sp .in 0.5i .in 1i+25n .ti 0.5i .ta 25m .ds Pt \*(Crstatic const SoNodekitCatalog * .ie \w'\*(Pt'>=25n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetClassNodekitCatalog\*(Cr() const .br .in 1i \f1Returns the \*(CbSoNodekitCatalog\f1 for the class \*(CbSoBaseKit\f1. .sp .in 0.5i .in 1i+25n .ti 0.5i .ta 25m .ds Pt \*(Crvirtual const SoNodekitCatalog * .ie \w'\*(Pt'>=25n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetNodekitCatalog\*(Cr() const .br .in 1i \f1Returns the \*(CbSoNodekitCatalog\f1 for this instance of \*(CbSoBaseKit\f1. While each instance of a given class creates its own distinct set of parts (which are actual nodes), all instances share the same catalog (which describes \&the parts but contains no actual node pointers). .sp .in 0.5i .in 1i+25n .ti 0.5i .ta 25m .ds Pt \*(Crvirtual SoNode * .ie \w'\*(Pt'>=25n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetPart\*(Cr(const SbName &partName, SbBool makeIfNeeded) .br .in 1i \f1Searches the nodekit catalog (and those of all nested nodekits) for the part named \*(CrpartName\f1. Returns a pointer to the part if a \f2match is found\f1, the part is \f2public\f1, and the part has \f2already been built\f1. If no match is found, or if the part is \f2private\f1, \*(CrNULL\f1 is \&returned. If \*(CrpartName\f1 is in the catalog (or that of one of its nested nodekit parts), but the part has not been built yet, the argument \*(CrmakeIfNeeded\f1 determines the course of action. When \*(CrmakeIfNeeded\f1 is \*(CrFALSE\f1, \*(CrNULL\f1 is returned; when \*(CrmakeIfNeeded\f1 is \*(CrTRUE\f1, \*(CbgetPart()\f1 will \&create the part (as well as any necessary intermediary parts), put it in the correct place, and return a pointer to the newly created part. .sp Elements of \f2list parts\f1 and parts within nested nodekits can all be retrieved \&with \*(CbgetPart()\f1 The full syntax for legal \*(CrpartName\f1 arguments is given below. .sp \f2Part name BNF notation\f1: .sp \*(CrpartName = singleName | compoundName\f1 .sp \*(CrcompoundName = singleName | compoundName.singleName\f1 .sp \*(CrsingleName = singlePartName | singleListElementName\f1 .sp \*(CrsinglePartName =\f1 the name of any single part in the catalog (including those that are lists or nodekits), or in the recursively nested catalogs of any \&of its parts. .sp \*(CrsingleListElementName = singleListName[index]\f1 .sp \*(CrsingleListName =\f1 the name of any single list-type part in the catalog, or in the recursively nested catalogs of any of its parts. .sp \*(Crindex = integer\f1 .sp Examples of valid part names are: .sp "transform", "appearance.material", "childList[2].drawStyle", \&"foot", "bird.leftLeg.foot", "octopus.leg[4].suctionCup[2].material" .sp .in 0.5i .in 1i+25n .ti 0.5i .ta 25m .ds Pt \*(CrSbString .ie \w'\*(Pt'>=25n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetPartString\*(Cr(const SoBase *part) .br .in 1i \f1Given a node or a path to a node, checks if the part exists in the nodekit, in a nested nodekit, or an element of a list part. If so, returns a string describing the part name; otherwise, returns an empty \&string (""). .sp .in 0.5i .in 1i+25n .ti 0.5i .ta 25m .ds Pt \*(Crvirtual SoNodeKitPath * .ie \w'\*(Pt'>=25n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbcreatePathToPart\*(Cr(const SbName &partName, SbBool makeIfNeeded, const SoPath *pathToExtend = NULL) .br .in 1i \f1Returns a path that begins at this nodekit and ends at \*(CrpartName\f1. Searching for the part is the same as in \*(CbgetPart()\f1. \*(CrNULL\f1 is returned if \*(CrpartName\f1 cannot be found, or if \*(CrmakeIfNeeded\f1 is \*(CrFALSE\f1 and the part is not yet built. If the the part is retrieved \&and the argument \*(CrpathToExtend\f1 is \*(CrNULL\f1, the path returned begins at \*(Crthis\f1 and ends at \*(CrpartName\f1. If \*(CrpathToExtend\f1 is not \*(CrNULL\f1, the path created is a copy of \*(CrpathToExtend\f1 with entries appended all the way down to \*(CrpartName\f1. It is okay for \*(CrpathToExtend\f1 to go beyond the nodekit; extra \&nodes will be popped off the tail before continuing from \*(Crthis\f1 down to \*(CrpartName\f1. .sp .in 0.5i .in 1i+25n .ti 0.5i .ta 25m .ds Pt \*(Crvirtual SbBool .ie \w'\*(Pt'>=25n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetPart\*(Cr(const SbName &partName, SoNode *newPart) .br .in 1i \f1Inserts the given node (not a copy) as the new part specified by \*(CrpartName\f1. See \*(CbgetPart()\f1 for the syntax of \*(CrpartName\f1. This method adds any extra nodes needed to fit the part into the nodekit's catalog. For example, if you call: .nf .in 1.5i \*(Cr mySepKit->setPart("childList[0]", myNewChild); \f1 .fi .in 1i the \&kit may need to create the part \f2childList\f1 before it can install \*(CrmyNewChild\f1. Run-time type checking verifies that the node type of \*(CrnewPart\f1 matches the type called for by \*(CrpartName\f1. For example, if \*(CrpartName\f1 was a \f2material\f1 for an \*(CbSoSeparatorKit\f1, but \*(CrnewPart\f1 was an \*(CbSoTransform\f1 node, then \&the node would not be installed, and \*(CrFALSE\f1 would be returned. .sp If \*(CrnewPart\f1 is \*(CrNULL\f1, then the node specified by \*(CrpartName\f1 is removed. If this renders any private parts useless (as occurs when you remove the last child of an \*(CbSoGroup\f1 node), \&they will also be removed. Hence nodekits do not retain unnecessary nodes. .sp \*(CrTRUE\f1 is returned on success, and \*(CrFALSE\f1 upon error. .sp .in 0.5i .in 1i+25n .ti 0.5i .ta 25m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=25n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbset\*(Cr(char *partName, char *parameters) .br .in 1i+25n .ti 0.5i .ta 25m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=25n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbset\*(Cr(char *nameValuePairs) .br .in 1i \f1These functions allow field values of parts (nodes) to be set. If \*(CrpartName\f1 and \*(Crparameters\f1 are used, then a single part is specified by \*(CrpartName\f1; the field values are specified in \*(Crparameters\f1. The format of \*(Crparamaters\f1 is the Inventor File Format syntax. \&For example, .nf .in 1.5i \*(Cr mySepKit->set("material", "diffuseColor 1 0 0 shininess 0.6"); \f1 .fi .in 1i sets the part \f2material\f1 to the values \*(Cr"diffuseColor 1 0 0 shininess 0.6"\f1. The values used in \*(Crparameters\f1 must of course be appropriate for the node-type to which \*(CrpartName\f1 belongs. In this case, the nodekit \*(CbSoSeparatorKit\f1 has a part named \f2material\f1 which is of type \*(CbSoMaterial\f1. .sp The \*(CrnameValuePairs\f1 \&syntax can be used to set the field values in several different parts simultaneously. In this case, the argument string, \*(CrnameValuePairs\f1 contains \f2name-value\f1 pairs: \*(Cr"partName1 { parameters1 } ... partNameN { parametersN }"\f1. .sp For example, .nf .in 1.5i \*(Cr mySepKit->set("material { diffuseColor 1 1 1 } transform { translation 4 3 .6 }"); mySepKit->set("childList[0].material { ambientColor .5 .5 .5 }");\f1 .fi .in 1i .sp .in 0.5i .in 1i+25n .ti 0.5i .ta 25m .ds Pt \*(Crstatic SbBool .ie \w'\*(Pt'>=25n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbisSearchingChildren\*(Cr() .br .in 1i+25n .ti 0.5i .ta 25m .ds Pt \*(Crstatic void .ie \w'\*(Pt'>=25n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetSearchingChildren\*(Cr(SbBool newVal) .br .in 1i \f1Sets and queries if nodekit children are searched during \*(CbSoSearchAction\f1 traversal. By default, they are not. .sp .in 0.5i .in 1i+25n .ti 0.5i .ta 25m .ds Pt \*(Crstatic SoType .ie \w'\*(Pt'>=25n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetClassTypeId\*(Cr() .br .in 1i \f1Returns type identifier for this class. .sp .in 0.5i .SH MACROS \*(CbSO_GET_PART\*(Cr(kit, partName, partClass) .br .in 1i \f1Calls \*(CbgetPart()\f1 with \*(CrmakeIfNeeded\f1 set to \*(CrTRUE\f1, then casts the result to the type \*(CrpartClass\f1. Note that in the debug library, this macro checks to see if the part is of type \*(CrpartClass\f1, while the regular library does no type checking. .sp .in 0.5i \*(CbSO_CHECK_PART\*(Cr(kit, partName, partClass) .br .in 1i \f1Calls \*(CbgetPart()\f1, but with \*(CrmakeIfNeeded\f1 set to \*(CrFALSE\f1, then casts the result to the type \*(CrpartClass\f1. Note that in the debug library, this macro checks to see if the part is of type \*(CrpartClass\f1, while the regular library does no type checking. .sp .in 0.5i .SH ACTION BEHAVIOR \*(CbSoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoHandleEventAction .br .in 1i \f1Behaves like an \*(CbSoGroup\f1. Traverses each child in order. .sp .in 0.5i \*(CbSoRayPickAction .br .in 1i \f1Traverses each child in order. Then, for any pick containing the kit on its path, makes an \*(CbSoNodeKitDetail\f1 as follows: Sets the \*(Cr"detailNodeKit"\f1 (retrievable with \*(CbSoNodeKitDetail::getNodeKit()\f1) to be a pointer to itself. Sets the \*(Cr"detailPart"\f1 (retrievable with \*(CbSoNodeKitDetail::getPart()\f1) to be a pointer \&to the kit's leaf-most part that lies on the pickPath. Sets the \*(Cr"detailPartName"\f1 (retrievable with \*(CbSoNodeKitDetail::getPartName()\f1) to be the partName of that part, as found in the catalog. .sp Does not descend into nested nodekits. Each nodekit along \&the path is the \*(Cr"detailPart"\f1 in its parent's detail. However, if the pick path goes through a list part, a pointer to the child is used for the \*(Cr"detailPart"\f1, and \*(Cr"detailPartName"\f1 is of the form \*(Cr"listName[i]"\f1. .sp .in 0.5i \*(CbSoGetMatrixAction .br .in 1i \f1Behaves like an \*(CbSoGroup\f1. Does nothing unless the kit is in the middle of the path chain the action is being applied to. If so, the children up to and including the next node in the chain are traversed. .sp .in 0.5i \*(CbSoSearchAction .br .in 1i \f1First, searches itself like an \*(CbSoNode\f1. Then, checks the value of \*(CbisSearchingChildren()\f1. If TRUE, traverses the children in order. If FALSE, returns. .sp .in 0.5i \*(CbSoWriteAction .br .in 1i \f1Begins by writing out regular fields, then writes out the parts. A nodekit does \f2not\f1 write out its parts the way an \*(CbSoGroup\f1 writes out its children. Instead, it writes each part as an \*(CbSoSFNode\f1 field. First the partName is \&written, then the node being used for that part. .sp To keep the files terse, nodekits write out as few parts as possible. However, nodekits \f2always\f1 write a part if another instance or a path is writing it. If this \&is not the case, parts are left out according to the following rules: .sp [1] NULL parts only write if the catalog states they are created by default. .sp [2] Empty \*(CbSoGroup\f1 and \*(CbSoSeparator\f1 nodes do not write. .sp [3] Non-leaf parts \&only write if they have non-default field values. .sp [4] List parts only write if they have children or if the container node has non-default field values. .sp [5] Nested nodekit parts only write if they need \&to write one or more parts, or if they have non-default field values. .sp .in 0.5i .SH CATALOG PARTS .ne 10 .TS box, tab(!); cb s s s lb lb lb lb lb lb lb lb l l l c. All parts !!!NULL by Part Name!Part Type!Default Type!Default callbackList!NodeKitListPart!--!yes .TE .ne 10 .TS box, tab(!); cb s s lb lb lbw(30n) l l l. Extra information for list parts from above table .sp Part Name!Container Type!Permissible Types callbackList!Separator!T{ Callback, EventCallback T} .TE .SH FILE FORMAT/DEFAULTS .nf \*(CrBaseKit { .in 1i .ta 14m callbackList NULL .in 0.5i } .SH SEE ALSO \*(CbSoAppearanceKit, SoCameraKit, SoLightKit, SoNodeKit, SoNodeKitDetail, SoNodeKitListPart, SoNodeKitPath, SoNodekitCatalog, SoSceneKit, SoSeparatorKit, SoShapeKit, SoWrapperKit