SoVRMLSwitch Class |
Note: This API is now obsolete.
Group node that traverses one chosen child.
Namespace: OIV.Inventor.VRMLnodes
The SoVRMLSwitch type exposes the following members.
Name | Description | |
---|---|---|
![]() | SoVRMLSwitch | Constructor. |
![]() | SoVRMLSwitch(Int32) | Constructor that takes approximate number of choices. |
Name | Description | |
---|---|---|
![]() | AddChild | Adds a child as last one in group. |
![]() | AddChoice | Adds a choice/child as last one in group. |
![]() | AffectsState | Overrides method in SoNode to return false if there is no selected child or the selected child does not affect the state. |
![]() | Callback | (Overrides SoGroupCallback(SoCallbackAction).) |
![]() | Copy | Calls Copy(false). (Inherited from SoNode.) |
![]() | Copy(Boolean) | Creates and returns an exact copy of the node. |
![]() | CopyFieldValues(SoFieldContainer) | Calls CopyFieldValues(fc, false). (Inherited from SoFieldContainer.) |
![]() | CopyFieldValues(SoFieldContainer, Boolean) | Copies the contents of fc's fields into this object's fields. |
![]() | Dispose |
Releases all resources used by SoDisposable.
(Inherited from SoDisposable.) |
![]() | Distribute | (Inherited from SoNode.) |
![]() | DoAction | (Overrides SoVRMLParentDoAction(SoAction).) |
![]() | EnableNotify | Notification at this Field Container is enabled (if flag == true) or disabled (if flag == false). |
![]() | Equals | (Inherited from Object.) |
![]() | FieldsAreEqual | Returns true if this object's fields are exactly equal to fc's fields. |
![]() | FindChild | Finds index of given child within group. |
![]() | FindChoice | Finds index of given choice/child within group. |
![]() | Get | Returns the values of the fields of this object in the Open Inventor ASCII file format in the given string. |
![]() | GetAllFields | Returns a list of fields, including the eventIn's and eventOut's. |
![]() | GetAlternateRep | This method is called by actions to allow the node to provide an "alternate representation" when appropriate (typically depending on the action type). |
![]() | GetBoundingBox | (Overrides SoGroupGetBoundingBox(SoGetBoundingBoxAction).) |
![]() | GetChild | Returns the nth child node. |
![]() | GetChoice | Returns the nth choice/child node. |
![]() | GetEventIn | Returns a the eventIn with the given name. |
![]() | GetEventOut | Returns the eventOut with the given name. |
![]() | GetField | Returns a the field of this object whose name is fieldName. |
![]() | GetFieldName | Returns the name of the given field in the fieldName argument. |
![]() | GetFields | Appends references to all of this object's fields to resultList, and returns the number of fields appended. |
![]() | GetHashCode |
Overrides GetHashCode().
(Inherited from SoNetBase.) |
![]() | GetMatrix | (Overrides SoGroupGetMatrix(SoGetMatrixAction).) |
![]() | GetName | Returns the name of an instance. |
![]() | GetNumChildren | Returns number of children. |
![]() | GetNumChoices | Returns number of choices/children. |
![]() | GetPrimitiveCount | (Inherited from SoVRMLParent.) |
![]() | GetRenderUnitID | (Inherited from SoNode.) |
![]() | GetStringName | (Inherited from SoBase.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | GLRender | (Overrides SoGroupGLRender(SoGLRenderAction).) |
![]() | GLRenderBelowPath | (Inherited from SoNode.) |
![]() | GLRenderInPath | (Inherited from SoNode.) |
![]() | GLRenderOffPath | (Inherited from SoNode.) |
![]() | GrabEventsCleanup | (Inherited from SoNode.) |
![]() | GrabEventsSetup | (Inherited from SoNode.) |
![]() | HandleEvent | (Overrides SoGroupHandleEvent(SoHandleEventAction).) |
![]() | HasDefaultValues | Returns true if all of the object's fields have their default values. |
![]() | InsertChild | Adds a child so that it becomes the one with the given index. |
![]() | InsertChoice | Adds a choice/child so that it becomes the one with the given index. |
![]() | IsBoundingBoxIgnoring | Used by BoundingBoxAction to known if bounding box computation should be ignored or not. |
![]() | IsNotifyEnabled | Notification is the process of telling interested objects that this object has changed. |
![]() | IsOverride | Returns the state of the override flag. |
![]() | IsSynchronizable | Gets the ScaleViz synchronizable state of this object. |
![]() | Pick | (Overrides SoGroupPick(SoPickAction).) |
![]() | RayPick | (Inherited from SoNode.) |
![]() | RemoveAllChildren | Removes all children from group. |
![]() | RemoveAllChoices | Removes all choices/children from group. |
![]() | RemoveChild(Int32) | Removes child with given index from group. |
![]() | RemoveChild(SoNode) | Removes first instance of given child from group. |
![]() | RemoveChoice(Int32) | Removes choice/child with given index from group. |
![]() | RemoveChoice(SoNode) | Removes first instance of given choice/child from group. |
![]() | ReplaceChild(Int32, SoNode) | Replaces child with given index with new child. |
![]() | ReplaceChild(SoNode, SoNode) | Replaces first instance of given child with new child. |
![]() | ReplaceChoice(Int32, SoNode) | Replaces choice with given index with new choice/child. |
![]() | ReplaceChoice(SoNode, SoNode) | Replaces first instance of given choice/child with new choice/child. |
![]() | Search | (Overrides SoVRMLParentSearch(SoSearchAction).) |
![]() | Set | Sets one or more fields in this object to the values specified in the given string, which should be a string in the Open Inventor file format. |
![]() | SetName | (Inherited from SoBase.) |
![]() | SetOverride | Turns the override flag on or off. |
![]() | SetSynchronizable | Sets this to be a ScaleViz synchronizable object. |
![]() | SetToDefaults | Sets all fields in this object to their default values. |
![]() | ToString |
Converts this SoBase structure to a human readable string.
(Inherited from SoBase.) |
![]() | Touch | Marks an instance as modified, simulating a change to it. |
![]() | Write | (Overrides SoGroupWrite(SoWriteAction).) |
Name | Description | |
---|---|---|
![]() | bboxCenter | The bboxCenter and bboxSize fields specify a bounding box that encloses the SoVRMLParent's children. |
![]() | bboxSize | The bboxCenter and bboxSize fields specify a bounding box that encloses the SoVRMLParents's children. |
![]() | boundingBoxIgnoring | Whether to ignore this node during bounding box traversal. |
![]() | children | Field that contains a list of children nodes. |
![]() | choice | Nodes to chose from (VRML97 only). |
![]() | IsDisposable | ISafeDisposable interface implementation.
(Inherited from SoDisposable.) |
![]() | metadata | Specifies the metadata node. |
![]() | UserData |
Gets or sets the user data to be contained by the field container.
(Inherited from SoFieldContainer.) |
![]() | whichChoice | Specifies the index of the child to traverse. |
<font color="#0000FF">NOTE:</font> This class does not exist in Open Inventor 10.0 and later.
NOTE: This field is not compatible with VRML97. If you specify a non-default value for this field, when this node is written to a VRML file, the file will contain this incompatible field and standard VRML97 file readers will not be able to read it. See the VRML97 Specification, below.
This section describes the expected behavior of the node in a conforming VRML97 browser application. In some cases, the application is responsible for implementing portions of the expected behavior. Open Inventor viewer classes and IVF classes implement some of the application behaviors.
This section may reference portions of the VRML97 specification that are not present in this help file. The complete VRML97 spec is available at http://www.web3d.org.
The SoVRMLSwitch grouping node traverses zero or one of the nodes specified in the choice field.
See the "Concepts - Grouping and Children Nodes" section which describes "children nodes" for a details on the types of nodes that are legal values for choice.
The whichChoice field specifies the index of the child to traverse, where the first child has index 0. If whichChoice is less than zero or greater than the number of nodes in the choice field then nothing is chosen.
SO_SWITCH_NONE (-1, the default) means do not traverse any children.
SO_SWITCH_INHERIT (-2) allows the index to be inherited from a previously-encountered SoSwitch node or from certain other nodes (such as SoArray or SoMultipleCopy) that set the switch value.
SO_SWITCH_ALL (-3) traverses all children, making the switch behave exactly like a regular SoGroup.
The bboxCenter and bboxSize fields specify a bounding box that encloses the SoVRMLSwitch's children. This is a hint that may be used for optimization purposes. If the specified bounding box is smaller than the actual bounding box of the children at any time, then the results are undefined. A default bboxSize value, (-1 -1 -1), implies that the bounding box is not specified and if needed must be calculated by the browser. See "Concepts - Bounding Boxes" for a description of the bboxCenter and bboxSize fields.
Note that all nodes under an SoVRMLSwitch continue to receive and send events regardless of the value of whichChoice.
VRMLSwitch {
choice | [] // VRML97 |
children | [] // X3D |
whichChoice | -1 |
metadata | NULL |
bboxCenter | 0 0 0 |
bboxSize | -1 -1 -1 |
SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoHandleEventAction, SoRayPickAction, SoGetMatrixAction, SoSearchAction, SoWriteAction Sets: SoSwitchElement
SoMFNode | addChildren // X3D only |
SoMFNode | removeChildren // X3D only |
SoMFNode | set_choice // VRML97 only |
SoMFNode | set_children // X3D only |
SoSFInt32 | set_whichChoice |
SoSFNode | set_metadata |
SoMFNode | choice_changed // VRML97 only |
SoMFNode | children_changed // X3D only |
SoSFInt32 | whichChoice_changed |
SoSFNode | metadata_changed |