Open Inventor Reference
SoSelectOne Class Reference

Selects one value from a multiple-value field. More...

#include <Inventor/engines/SoSelectOne.h>

Inheritance diagram for SoSelectOne:
SoEngine SoFieldContainer SoBase

List of all members.

Public Member Functions

 SoSelectOne (SoType mfInputType)
 Constructor.
virtual SoFieldContainercopyThroughConnection () const
 Copies an instance that is encountered through a field connection.

Static Public Member Functions

static void initClass ()
 Initializes base engine class.

Public Attributes

SoSFInt32 index
 Index is used to choose which value of the input is written to output.
SoMFieldinput
 Note that unlike most engines the input field is a pointer.
SoEngineOutputoutput
 Note that unlike most engines the output is a pointer.

Detailed Description

This engine selects a single value from a multiple-value field, based on the input field index . The type of the input field can be any subclass of SoMField, and the type of the output is the corresponding subclass of SoSField. For example, if the input type is SoMFVec3f, the output type will be SoSFVec3f. The type is specified when an instance of the class is created. For example, SoSelectOne(SoMFFloat::getClassTypeId()) creates an engine that selects one floating-point value.

Note that unlike most other engine fields, the input field and output are pointers. Note also that by default input does not contain any values, and no value is output from the engine.

File Format/Default
SelectOne {
  index 0
}
See Also
SoEngineOutput, SoConcatenate, SoGate

Definition at line 103 of file SoSelectOne.h.


Constructor & Destructor Documentation

SoSelectOne::SoSelectOne ( SoType  mfInputType)

The argument specifies the type of the multiple-value input field.


Member Function Documentation

virtual SoFieldContainer* SoSelectOne::copyThroughConnection ( ) const [virtual]

Reimplemented from SoEngine.

static void SoSelectOne::initClass ( ) [static]

Reimplemented from SoEngine.


Member Data Documentation

Default is -1, meaning don't write anything.

Definition at line 115 of file SoSelectOne.h.

The default value for this field is no values.

Definition at line 119 of file SoSelectOne.h.

The type of the output is the single-value field corresponding to whatever type the input is.

Definition at line 124 of file SoSelectOne.h.


The documentation for this class was generated from the following file: