SoSelectOne(3)
π SoSelectOne π
okay bestie, gather round, because we're reading SoSelectOne(3) from the Coin manual (that's section 3, the library-functions section, iykyk) and honestly? it's giving "tiny engine, big personality". no cap. let's get into it π
β¨ NAME β¨
SoSelectOne β the class that picks one value out of a whole set of values. one (1) single value. out of a set. iconic behaviour, fr fr π
πΈ SYNOPSIS πΈ
#include <Inventor/engines/SoSelectOne.h>
Inherits SoEngine.
π Public Member Functions
virtual SoType getTypeId (void) constβ hands you the type ID of an object that inherits fromSoBase. it's the thing you use for runtime type checking and "downward" casting. (that little quote mark situation is literally how it's written, bestie, i'm not fixing it π)virtual const SoFieldData * getFieldData (void) constvirtual const SoEngineOutputData * getOutputData (void) constSoSelectOne (SoType inputtype)
π¦ Public Member Functions inherited from SoEngine
void evaluateWrapper (void)virtual int getOutputs (SoEngineOutputList &l) constSoEngineOutput * getOutput (const SbName &outputname) constSbBool getOutputName (const SoEngineOutput *output, SbName &outputname) constSbBool isNotifying (void) constvirtual void notify (SoNotList *nl)SoEngine * copy (void) constvirtual SoFieldContainer * copyThroughConnection (void) constSbBool shouldCopy (void) const
π Public Member Functions inherited from SoFieldContainer
void setToDefaults (void)SbBool hasDefaultValues (void) constSbBool fieldsAreEqual (const SoFieldContainer *container) constvoid copyFieldValues (const SoFieldContainer *container, SbBool copyconnections=FALSE)SbBool set (const char *const fielddata)void get (SbString &fielddata)virtual int getFields (SoFieldList &l) constvirtual int getAllFields (SoFieldList &l) constvirtual SoField * getField (const SbName &name) constvirtual SoField * getEventIn (const SbName &name) constvirtual SoField * getEventOut (const SbName &name) constSbBool getFieldName (const SoField *const field, SbName &name) constSbBool enableNotify (const SbBool flag)SbBool isNotifyEnabled (void) constSbBool set (const char *fielddata, SoInput *input)void get (SbString &fielddata, SoOutput *out)virtual SbBool validateNewFieldValue (SoField *field, void *newval)virtual void addWriteReference (SoOutput *out, SbBool isfromfield=FALSE)SbBool getIsBuiltIn (void) constvirtual void getFieldsMemorySize (size_t &managed, size_t &unmanaged) constvoid setUserData (void *userdata) constvoid * getUserData (void) const
π Public Member Functions inherited from SoBase
void ref (void) constvoid unref (void) constvoid unrefNoDelete (void) constint32_t getRefCount (void) constvoid touch (void)SbBool isOfType (SoType type) constβ returnsTRUEif the type of this object is either the same type, or inherited from type.virtual SbName getName (void) constvirtual void setName (const SbName &newname)virtual void startNotify (void)void addAuditor (void *const auditor, const SoNotRec::Type type)void removeAuditor (void *const auditor, const SoNotRec::Type type)const SoAuditorList & getAuditors (void) constSbBool shouldWrite (void)void assertAlive (void) const
β Static Public Member Functions
static SoType getClassTypeId (void)static void * createInstance (void)static void initClass (void)β sets up the initialization for data shared by every instance of this class, like submitting the necessary info to the Coin type system. the whole "get your paperwork in order" moment π«Ά
πΈ Static Public Member Functions inherited from SoEngine
static void initClass (void)β sets up the initialization for data common to all instances of this class, like submitting necessary information to the Coin type system.static void initClasses (void)static SoType getClassTypeId (void)β this static method returns theSoTypeobject associated with objects of this class.static SoEngine * getByName (const SbName &name)static int getByName (const SbName &name, SoEngineList &el)
π Static Public Member Functions inherited from SoFieldContainer
static void initClass (void)β sets up initialization for data common to all instances of this class, like submitting necessary information to the Coin type system.static SoType getClassTypeId (void)β this static method returns theSoTypeobject associated with objects of this class.static void cleanupClass (void)static void initCopyDict (void)static void addCopy (const SoFieldContainer *orig, const SoFieldContainer *copy)static SoFieldContainer * checkCopy (const SoFieldContainer *orig)static SoFieldContainer * findCopy (const SoFieldContainer *orig, const SbBool copyconnections)static void copyDone (void)
π§ Static Public Member Functions inherited from SoBase
static void initClass (void)β sets up initialization for data common to all instances of this class, like submitting necessary information to the Coin type system.static SoType getClassTypeId (void)β this static method returns theSoTypeobject associated with objects of this class.static void addName (SoBase *const base, const char *const name)static void removeName (SoBase *const base, const char *const name)static void incrementCurrentWriteCounter (void)static void decrementCurrentWriteCounter (void)static SoBase * getNamedBase (const SbName &name, SoType type)static int getNamedBases (const SbName &name, SoBaseList &baselist, SoType type)static SbBool read (SoInput *input, SoBase *&base, SoType expectedtype)static void setInstancePrefix (const SbString &c)static void setTraceRefs (SbBool trace)static SbBool getTraceRefs (void)static SbBool connectRoute (SoInput *input, const SbName &fromnodename, const SbName &fromfieldname, const SbName &tonodename, const SbName &tofieldname)static SbBool readRoute (SoInput *input)
π Public Attributes
SoSFInt32 indexSoMField * inputSoEngineOutput * output
π¦ Static Protected Member Functions
static const SoFieldData ** getInputDataPtr (void)static const SoEngineOutputData ** getOutputDataPtr (void)
π« Static Protected Member Functions inherited from SoEngine
static const SoFieldData ** getInputDataPtr (void)static const SoEngineOutputData ** getOutputDataPtr (void)
β¨ Static Protected Member Functions inherited from SoBase
static uint32_t getCurrentWriteCounter (void)static void staticDataLock (void)static void staticDataUnlock (void)
π Additional Inherited Members
Protected Types inherited from SoBase
enum BaseFlags { IS_ENGINE = 0x01, IS_GROUP = 0x02 }
Protected Member Functions inherited from SoEngine
SoEngine (void)virtual ~SoEngine (void)virtual void inputChanged (SoField *which)void writeOutputTypes (SoOutput *out)
Protected Member Functions inherited from SoFieldContainer
SoFieldContainer (void)virtual ~SoFieldContainer ()
Protected Member Functions inherited from SoBase
SoBase (void)virtual ~SoBase ()SbBool hasMultipleWriteRefs (void) constSbBool writeHeader (SoOutput *out, SbBool isgroup, SbBool isengine) constvoid writeFooter (SoOutput *out) constvirtual const char * getFileFormatName (void) constvirtual SoNotRec createNotRec (void)
Protected Attributes inherited from SoFieldContainer
SbBool isBuiltIn
π¦ Detailed Description π¦
okay so the whole point of SoSelectOne: it selects one value from a set of values. that's the vibe. π«
the output field is literally the index'th value of the input multivalue field. that's it. that's the whole job. she's a specialist, not a generalist π
now listen closely bestie, because this next bit is the part that makesSoSelectOnelowkey different from her engine sisters: this engine's output field deviates a little from the "standard" output mechanism that the majority of engine classes use. theSoSelectOne::outputis not a permanentSoEngineOutputinstance β it's a pointer to aSoEngineOutputinstance. and why?? because the output field has to be allocated dynamically so it can match whateverSoSelectOne::inputis connected to, since the type ofSoSelectOne::outputshould always be the same as the type ofSoSelectOne::input. it's giving "we match energies" and honestly? respect. π
the file format for this field is a bit special too β peep the leading type specification, which is not necessary for most other field types:
SelectOne {
type <multivaluefieldtype>
[...fields...]
}
π Constructor & Destructor Documentation π
SoSelectOne::SoSelectOne (SoType inputtype)
constructor! it sets the type of the input field. heads up though: the input field must be of type SoMField. no exceptions, no wiggle room, that's the rule π
π Member Function Documentation π
virtual SoType SoSelectOne::getTypeId (void ) const [virtual]
returns the type identification of an object derived from a class inheriting SoBase. this is what you use for runtime type checking and "downward" casting. usage example, so you can see it in the wild:
void foo(SoNode * node)
{
if (node->getTypeId() == SoFile::getClassTypeId()) {
SoFile * filenode = (SoFile *)node; // safe downward cast, knows the type
}
}
and for the application programmers out there who want to extend the library with new nodes, engines, nodekits, draggers or whatever else: this method needs to be overridden in all subclasses. typically you do that as part of setting up the full type system for your extension classes, which is usually accomplished by using the predefined macros available through, for instance, Inventor/nodes/SoSubNode.h (SO_NODE_INIT_CLASS and SO_NODE_CONSTRUCTOR for node classes), Inventor/engines/SoSubEngine.h (for engine classes) and so on. β¨
for more info on writing Coin extensions, go read the class documentation of the top level superclasses for the various class groups. π
Implements SoBase.
virtual const SoFieldData * SoSelectOne::getFieldData (void ) const [virtual]
returns a pointer to the class-wide field data storage object for this instance. if there are no fields present? it returns NULL. simple as that π
Reimplemented from SoFieldContainer.
virtual const SoEngineOutputData * SoSelectOne::getOutputData (void ) const [virtual]
ngl, this API member is considered internal to the library β it's not likely to be of interest to the application programmer. it's a backstage pass, not a main stage moment π
Implements SoEngine.
π Member Data Documentation π
SoSFInt32 SoSelectOne::index
the index of the value from the input field that's gonna get put on the output. that's the one she's picking ππ
SoMField* SoSelectOne::input
the multivalue input field that we'll be selecting a single value from for our output. she's the whole buffet, index is the plate π½οΈ
SoEngineOutput* SoSelectOne::output
(SoSField) this is the singlevalue field output containing the index'th value of SoSelectOne::input.
and of course the type of the field will match the type of the input field β so if SoSelectOne::input is an SoMFFloat, then SoSelectOne::output will be an SoSFFloat, etc. matching sets, always π
β¨
π Author π
Generated automatically by Doxygen for Coin from the source code. (not a human, just a very diligent robot doing its thing π€π)
and that's the whole page, bestie!! this was Version 4.0.10, dated Thu Jun 25 2026 00:00:00, and you can find her filed under SoSelectOne(3). slay, go select exactly one (1) value, no more no less πβ¨ππ¦
π¦ where this page comes from
- fedora 43: Coin4-devel 4.0.10-1.fc43 Β· BSD-3-Clause AND GPL-3.0-or-later
- fedora 43: Coin4-devel 4.0.10-1.fc43 Β· BSD-3-Clause AND GPL-3.0-or-later
- fedora 44: Coin4-devel 4.0.10-1.fc44 Β· BSD-3-Clause AND GPL-3.0-or-later
- fedora 44: Coin4-devel 4.0.10-1.fc44 Β· BSD-3-Clause AND GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms