SoFieldContainer(3)
π NAME π
SoFieldContainer β bestie, this is the base class for literally every class that contains fields. You're reading the SoFieldContainer(3) page from the Coin manual, and honestly? It's kind of the mother of all node/engine lore. π
β¨ SYNOPSIS β¨
#include <Inventor/fields/SoFieldContainer.h>
Inherits SoBase.
Inherited by SoEngine, and SoNode.
π«Ά Public Member Functions
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 void notify (SoNotList *l)virtual SbBool validateNewFieldValue (SoField *field, void *newval)virtual void addWriteReference (SoOutput *out, SbBool isfromfield=FALSE)virtual void writeInstance (SoOutput *out)SbBool getIsBuiltIn (void) constvirtual const SoFieldData * getFieldData (void) constvirtual void copyContents (const SoFieldContainer *from, SbBool copyconnections)virtual SoFieldContainer * copyThroughConnection (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)virtual SoType getTypeId (void) const =0β Returns the type identification of an object derived from a class inheritingSoBase. This is used for runtime type checking anddownward"casting.SbBool isOfType (SoType type) constβ ReturnsTRUEif the type of this object is either of the same type or inherited fromtype.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 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)
π¦ Protected Member Functions
SoFieldContainer (void)virtual ~SoFieldContainer ()virtual SbBool readInstance (SoInput *in, unsigned short flags)
π Protected Member Functions inherited from SoBase
SoBase (void)virtual ~SoBase ()virtual void destroy (void)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
SbBool isBuiltIn
π Additional Inherited Members
Protected Types inherited from SoBase
enum BaseFlags { IS_ENGINE = 0x01, IS_GROUP = 0x02 }
Static Protected Member Functions inherited from SoBase
static uint32_t getCurrentWriteCounter (void)static void staticDataLock (void)static void staticDataUnlock (void)
π« DESCRIPTION π«
The SoFieldContainer class is a base class for all classes that contain fields.
The classes containing fields in Coin are the node and engine classes, so they are all subclasses of SoFieldContainer. π«Ά
SoFieldContainer provides methods for reading, writing, comparing for equality, doing copy operations, etc on fields. It's giving β¨utility queenβ¨, fr fr.
See also
SoField
π CONSTRUCTOR & DESTRUCTOR DOCUMENTATION π
SoFieldContainer::SoFieldContainer (void ) [protected]
Constructor. That's it, that's the note. π
SoFieldContainer::~SoFieldContainer () [protected], [virtual]
Destructor. Say bye bestie. π
π₯ MEMBER FUNCTION DOCUMENTATION π₯
void SoFieldContainer::cleanupClass (void ) [static]
This static method cleans up static data for the SoFieldContainer class. Tidy up, periodt. π§Ή
void SoFieldContainer::setToDefaults (void )
This method sets all fields which we are parenting to their respective default values. Reset era. βͺ
SbBool SoFieldContainer::hasDefaultValues (void ) const
This method checks to see if the fields of this container have their default values, and returns TRUE if that is the case.
SbBool SoFieldContainer::fieldsAreEqual (const SoFieldContainer * container) const
This method returns TRUE if the values of the fields of this and container are equal. Twin check, no cap. π―
void SoFieldContainer::copyFieldValues (const SoFieldContainer * container, SbBool copyconnections = FALSE)
This API member is considered internal to the library, as it is not likely to be of interest to the application programmer.
This method copies the field values from container into this. The fields are assumed to be of the same type. The copyconnections flag decides whether the field connections are to be copied as well.
SbBool SoFieldContainer::set (const char *const fielddata)
This method parses the values of one or more fields from the fielddata string.
The fields must be in the same format as the Open Inventor file format. TRUE is returned upon success, and FALSE otherwise.
See also
get()
void SoFieldContainer::get (SbString & fielddata)
This methods stores the field data in the given fielddata string. The format of the returned string follows the Open Inventor file format.
See also
set()
int SoFieldContainer::getFields (SoFieldList & fields) const [virtual]
This method adds the fields in this container to the l argument, and returns the number of fields added.
The virtual nature of this function means that it can be overridden to e.g. hide private fields. Sneaky but make it β¨intentionalβ¨.
int SoFieldContainer::getAllFields (SoFieldList & fields) const [virtual]
Returns VRML eventIn and eventOut fields in addition to the "ordinary" fields.
See also
getFields()
SoField * SoFieldContainer::getField (const SbName & name) const [virtual]
This method returns a pointer to the field with name, or NULL if no such field exists.
SoField * SoFieldContainer::getEventIn (const SbName & name) const [virtual]
This method returns a pointer to the eventIn with name name, or NULL if no such eventIn exists.
SoField * SoFieldContainer::getEventOut (const SbName & name) const [virtual]
This method returns a pointer to the eventOut with name name, or NULL if no such eventOut exists.
SbBool SoFieldContainer::getFieldName (const SoField *const field, SbName & name) const
Finds the name of the given field and returns the value in the name argument.
TRUE is returned if the field is contained within this instance, and FALSE otherwise.
SbBool SoFieldContainer::enableNotify (const SbBool enable)
This method sets whether notification will be propagated on changing the values of the contained fields. The old value of the flag is returned.
Notification is default on. Turning off automatic notification can be useful for optimizing performance. During series of updates you may want to avoid the propagation of notifications upon every field value change if you make a lot of them. This is how you should handle those cases:
SbBool autonotify = node->enableNotify(FALSE);
// ...
// Make modifications to fields of "node" here.
// ...
node->enableNotify(autonotify);
node->touch();
See also
isNotifyEnabled()
SbBool SoFieldContainer::isNotifyEnabled (void ) const
This method returns whether notification of changes to the field values in the container is propagated to its auditors.
See also
enableNotify()
SbBool SoFieldContainer::set (const char * fielddata, SoInput * in)
This method parses the values of one or more fields from the fielddata string.
The fields must be in the same format as the Open Inventor file format. TRUE is returned upon success, and FALSE otherwise.
We use the reference dictionary provided by in.
See also
get()
void SoFieldContainer::get (SbString & fielddata, SoOutput * out)
Put names and values of fields from this instance in the fielddata string. Fields will be separated in the returned string by end-of-line characters.
We use the reference dictionary provided by out.
See also
set()
void SoFieldContainer::notify (SoNotList * l) [virtual]
Notifies all auditors for this instance when changes are made. π£
Reimplemented from SoBase.
...and that's where part 1 wraps, bestie β more of this page is coming right up, so don't go anywhere π
So who's reimplementing this? Buckle up bestie, it's literally a whole squad: Reimplemented in SoAsciiText, SoBlinker, SoBumpMap, SoEngine, SoImage, SoIndexedLineSet, SoIndexedPointSet, SoLevelOfDetail, SoLOD, SoMaterial, SoNode, SoNodeEngine, SoPackedColor, SoProfilerStats, SoSceneTexture2, SoSceneTextureCubeMap, SoSeparator, SoShadowGroup, SoShape, SoSwitch, SoText3, SoTexture2, SoTexture3, SoTextureCubeMap, SoVertexAttribute, SoVertexProperty, SoVertexShape, SoVRMLAppearance, SoVRMLBillboard, SoVRMLCollision, SoVRMLElevationGrid, SoVRMLExtrusion, SoVRMLGeometry, SoVRMLGroup, SoVRMLIndexedLine, SoVRMLIndexedLineSet, SoVRMLIndexedShape, SoVRMLLOD, SoVRMLParent, SoVRMLPixelTexture, SoVRMLProximitySensor, SoVRMLScript, SoVRMLShape, SoVRMLSwitch, SoVRMLText, SoVRMLTimeSensor, SoVRMLTouchSensor, SoVRMLTransform, SoVRMLVertexLine, SoVRMLVertexPoint, and SoVRMLVertexShape.
π§ SbBool SoFieldContainer::validateNewFieldValue(SoField * field, void * newval) [virtual]
This API member is considered internal to the library, as it is not likely to be of interest to the application programmer.
I can't make head or tails of this method, it seems to return TRUE no matter what the arguments are.
ngl bestie, this one is internal, so like, not for you. And the docs literally say: "I can't make head or tails of this method, it seems to return TRUE no matter what the arguments are." So yeah, it's a mystery, but it always returns TRUE. π
βοΈ void SoFieldContainer::addWriteReference(SoOutput * out, SbBool isfromfield = FALSE) [virtual]
This method is used during the first write pass of a write action to count the number of references to this object in the scene graph.
Reimplemented from SoBase.
Reimplemented in SoBaseKit, and SoGroup.
π void SoFieldContainer::writeInstance(SoOutput * out) [virtual]
Writes all the fields contained in this instance to the output stream within out.
This method is solely called from the write methods of fields.
Either from SoField if the write is done because of a field-to-field connection, or from one of the fields which may actually write SoFieldContainer instances, i.e. SoSFNode, SoMFNode, SoSFEngine, SoMFEngine, SoSFPath and SoMFPath.
This method, in addition to the ordinary write() method of SoNode, needs to be present since the fields don't have a write action instance in their writeValue() method, and writeInstance() will create a new SoWriteAction and call continueToApply() on it.
Reimplemented in SoElapsedTime, SoEngine, SoNode, SoNodeEngine, and SoTimeCounter.
π SbBool SoFieldContainer::getIsBuiltIn(void) const
Returns TRUE if this object is instantiated from one of the native Coin classes, FALSE if the object's class is outside the standard Coin library.
So like, is it a homegrown Coin baby or not? π
π const SoFieldData * SoFieldContainer::getFieldData(void) const [virtual]
Returns a pointer to the class-wide field data storage object for this instance. If no fields are present, returns NULL.
Reimplemented in literally EVERYONE: SoAlphaTest, SoAnnotation, SoAntiSquish, SoAppearanceKit, SoArray, SoAsciiText, SoBaseColor, SoBaseKit, SoBlinker, SoBoolOperation, SoBumpMap, SoBumpMapCoordinate, SoBumpMapTransform, SoCacheHint, SoCalculator, SoCallback, SoCamera, SoCameraKit, SoCenterballDragger, SoCenterballManip, SoClipPlane, SoClipPlaneManip, SoColorIndex, SoComplexity, SoComposeMatrix, SoComposeRotation, SoComposeRotationFromTo, SoComposeVec2f, SoComposeVec3f, SoComposeVec4f, SoComputeBoundingBox, SoConcatenate, SoCone, SoCoordinate3, SoCoordinate4, SoCounter, SoCube, SoCylinder, SoDecomposeMatrix, SoDecomposeRotation, SoDecomposeVec2f, SoDecomposeVec3f, SoDecomposeVec4f, SoDepthBuffer, SoDirectionalLight, SoDirectionalLightDragger, SoDirectionalLightManip, SoDragger, SoDragPointDragger, SoDrawStyle, SoElapsedTime, SoEnvironment, SoEventCallback, SoExtSelection, SoFaceSet, SoFieldConverter, SoFile, SoFont, SoFontStyle, SoForeignFileKit, SoFragmentShader, SoFrustumCamera, SoGate, SoGeoCoordinate, SoGeoLocation, SoGeometryShader, SoGeoOrigin, SoGeoSeparator, SoGroup, SoHandleBoxDragger, SoHandleBoxManip, SoHeightMapToNormalMap, SoImage, SoIndexedFaceSet, SoIndexedLineSet, SoIndexedMarkerSet, SoIndexedNurbsCurve, SoIndexedNurbsSurface, SoIndexedPointSet, SoIndexedShape, SoIndexedTriangleStripSet, SoInfo, SoInteractionKit, SoInterpolate, SoInterpolateFloat, SoInterpolateRotation, SoInterpolateVec2f, SoInterpolateVec3f, SoInterpolateVec4f, SoJackDragger, SoJackManip, SoLabel, SoLevelOfDetail, SoLight, SoLightKit, SoLightModel, SoLinearProfile, SoLineSet, SoListener, SoLocateHighlight, SoLOD, SoMarkerSet, SoMaterial, SoMaterialBinding, SoMatrixTransform, SoMultipleCopy, SoNodeKitListPart, SoNodeVisualize, SoNonIndexedShape, SoNormal, SoNormalBinding, SoNurbsCurve, SoNurbsProfile, SoNurbsSurface, SoOneShot, SoOnOff, SoOrthographicCamera, SoPackedColor, SoPathSwitch, SoPendulum, SoPerspectiveCamera, SoPickStyle, SoPointLight, SoPointLightDragger, SoPointLightManip, SoPointSet, SoPolygonOffset, SoProfile, SoProfileCoordinate2, SoProfileCoordinate3, SoProfilerOverlayKit, SoProfilerStats, SoProfilerTopEngine, SoProfilerTopKit, SoProfilerVisualizeKit, SoProtoInstance, SoQuadMesh, SoResetTransform, SoReversePerspectiveCamera, SoRotateCylindricalDragger, SoRotateDiscDragger, SoRotateSphericalDragger, SoRotation, SoRotationXYZ, SoRotor, SoScale1Dragger, SoScale2Dragger, SoScale2UniformDragger, SoScale, SoScaleUniformDragger, SoSceneKit, SoSceneTexture2, SoSceneTextureCubeMap, SoScrollingGraphKit, SoSelection, SoSelectOne, SoSeparator, SoSeparatorKit, SoShaderObject, SoShaderParameter1f, SoShaderParameter1i, SoShaderParameter2f, SoShaderParameter2i, SoShaderParameter3f, SoShaderParameter3i, SoShaderParameter4f, SoShaderParameter4i, SoShaderParameter, SoShaderParameterArray1f, SoShaderParameterArray1i, SoShaderParameterArray2f, SoShaderParameterArray2i, SoShaderParameterArray3f, SoShaderParameterArray3i, SoShaderParameterArray4f, SoShaderParameterArray4i, SoShaderParameterMatrix, SoShaderParameterMatrixArray, SoShaderProgram, SoShaderStateMatrixParameter, SoShadowCulling, SoShadowDirectionalLight, SoShadowGroup, SoShadowSpotLight, SoShadowStyle, SoShape, SoShapeHints, SoShapeKit, SoShuttle, SoSphere, SoSpotLight, SoSpotLightDragger, SoSpotLightManip, SoSTLFileKit, SoSurroundScale, SoSwitch, SoTabBoxDragger, SoTabBoxManip, SoTabPlaneDragger, SoText2, SoText3, SoTexture2, SoTexture2Convert, SoTexture2Transform, SoTexture3, SoTexture3Transform, SoTexture, SoTextureCombine, SoTextureCoordinate2, SoTextureCoordinate3, SoTextureCoordinateBinding, SoTextureCoordinateCube, SoTextureCoordinateCylinder, SoTextureCoordinateDefault, SoTextureCoordinateEnvironment, SoTextureCoordinateFunction, SoTextureCoordinateNormalMap, SoTextureCoordinateObject, SoTextureCoordinatePlane, SoTextureCoordinateReflectionMap, SoTextureCoordinateSphere, SoTextureCubeMap, SoTextureMatrixTransform, SoTextureScalePolicy, SoTextureUnit, SoTimeCounter, SoTrackballDragger, SoTrackballManip, SoTransform, SoTransformation, SoTransformBoxDragger, SoTransformBoxManip, SoTransformerDragger, SoTransformerManip, SoTransformManip, SoTransformSeparator, SoTransformVec3f, SoTranslate1Dragger, SoTranslate2Dragger, SoTranslation, SoTransparencyType, SoTriangleStripSet, SoTriggerAny, SoUniformShaderParameter, SoUnits, SoVertexAttributeBinding, SoVertexProperty, SoVertexShader, SoVertexShape, SoVRMLAnchor, SoVRMLAppearance, SoVRMLAudioClip, SoVRMLBackground, SoVRMLBillboard, SoVRMLBox, SoVRMLCollision, SoVRMLColor, SoVRMLColorInterpolator, SoVRMLCone, SoVRMLCoordinate, SoVRMLCoordinateInterpolator, SoVRMLCylinder, SoVRMLCylinderSensor, SoVRMLDirectionalLight, SoVRMLDragSensor, SoVRMLElevationGrid, SoVRMLExtrusion, SoVRMLFog, SoVRMLFontStyle, SoVRMLGeometry, SoVRMLGroup, SoVRMLImageTexture, SoVRMLIndexedFaceSet, SoVRMLIndexedLine, SoVRMLIndexedLineSet, SoVRMLIndexedShape, SoVRMLInline, SoVRMLInterpolator, SoVRMLLight, SoVRMLLOD, SoVRMLMaterial, SoVRMLMovieTexture, SoVRMLNavigationInfo, SoVRMLNormal, SoVRMLNormalInterpolator, SoVRMLOrientationInterpolator, SoVRMLParent, SoVRMLPixelTexture, SoVRMLPlaneSensor, SoVRMLPointLight, SoVRMLPointSet, SoVRMLPositionInterpolator, SoVRMLProximitySensor, SoVRMLScalarInterpolator, SoVRMLSensor, SoVRMLShape, SoVRMLSound, SoVRMLSphere, SoVRMLSphereSensor, SoVRMLSpotLight, SoVRMLSwitch, SoVRMLText, SoVRMLTexture, SoVRMLTextureCoordinate, SoVRMLTextureTransform, SoVRMLTimeSensor, SoVRMLTouchSensor, SoVRMLTransform, SoVRMLVertexLine, SoVRMLVertexPoint, SoVRMLVertexShape, SoVRMLViewpoint, SoVRMLVisibilitySensor, SoVRMLWorldInfo, SoWrapperKit, SoWWWAnchor, and SoWWWInline.
π void SoFieldContainer::copyContents(const SoFieldContainer * from, SbBool copyconnections) [virtual]
Makes a deep copy of all data of from into this instance, except external scene graph references if copyconnections is FALSE.
This is the method that should be overridden by extension node / engine / dragger / whatever subclasses which need to account for internal data that are not handled automatically.
For copying nodes from application code, you should not invoke this function directly, but rather call the SoNode::copy() function:
SoNode * mynewnode = templatenode->copy();
The same also goes for engines.
Make sure that when you override the copyContents() method in your extension class that you also make it call upwards to its parent superclass in the inheritance hierarchy, as copyContents() in for instance SoNode and SoFieldContainer does important work. It should go something like this:
void
MyCoinExtensionNode::copyContents(const SoFieldContainer * from,
SbBool copyconnections)
{
// let parent superclasses do their thing (copy fields, copy
// instance name, etc.)
SoNode::copyContents(from, copyconnections);
// [..then copy internal data..]
}
Reimplemented in SoBaseKit, SoCallback, SoClipPlaneManip, SoDirectionalLightManip, SoFile, SoGroup, SoInteractionKit, SoNode, SoNodeKitListPart, SoPointLightManip, SoRotateCylindricalDragger, SoRotateSphericalDragger, SoSpotLightManip, SoTransformManip, SoVertexAttribute, SoVRMLAppearance, SoVRMLGeometry, SoVRMLLOD, SoVRMLParent, SoVRMLScript, SoVRMLShape, SoVRMLSwitch, and SoWWWInline.
Bestie, if you're copying nodes from application code, do NOT call this directly! Use SoNode::copy() instead. And when you override it, always call up to your parent superclass. Periodt. π
π SoFieldContainer * SoFieldContainer::copyThroughConnection(void) const [virtual]
Return copy of this instance.
Note: default implementation just returns this pointer, SoNode and SoEngine overrides this method to return the pointer to the actual copy.
Reimplemented in SoEngine, and SoNode.
ποΈ void SoFieldContainer::initCopyDict(void) [static]
This API member is considered internal to the library, as it is not likely to be of interest to the application programmer.
Initialize a dictionary hash storing pointers for original field container instances and their copies during scene graph copy operations.
This method is called from the start of SoNode::copy().
Internal again, bestie. Just know it's doing some behind-the-scenes magic for copying. β¨
static void SoFieldContainer::addCopy(const SoFieldContainer * orig, const SoFieldContainer * copy)β bestie this one takes a pair of pointers, an original field container and a copy of it, and drops them into an internal pointer dictionary that gets used during scene graph copy operations. It's the lil' bookkeeping drawer where the copies live while the copying is happening. β¨static SoFieldContainer * SoFieldContainer::checkCopy(const SoFieldContainer * orig)β hands you back the copy of orig, if there even is one. No copy? You get aNULLpointer, no drama. That's literally the whole function. πstatic SoFieldContainer * SoFieldContainer::findCopy(const SoFieldContainer * orig, const SbBool copyconnections)β gives you a copy of orig. And if nobody has made a copy yet when you call it, it just makes one on the fly, which is exactly why you have to pass along thatcopyconnectionsflag. π¦
This method will also run the copyContents() method on the copy, if it hasn't been run already. But listen β big warning here: if you call copyContents() on the copy outside of this method, it will go completely undetected, and the guts of orig will get copied multiple times into its copy. π Multiple times. Undetected. Do not.
And if copyContents() is called directly (instead of using copy()), the assumption is that you only want to copy the field values, so we just return NULL here. That's deliberate, to match how it's done in SGI Inventor. π
See also: checkCopy()
static void SoFieldContainer::copyDone(void)β okay so heads up, this API member is considered internal to the library, as it is not likely to be of interest to the application programmer. What it does: clean up the dictionary hash. π§Ή It gets called from the end ofSoNode::copy().virtual void SoFieldContainer::getFieldsMemorySize(size_t & managed, size_t & unmanaged) constβ returns the data array sizes of theSoFieldData-registered multi-fields. The managed argument returns the size of the fields that Coin manages the memory for, and the unmanaged argument returns the size of the data in the multi-fields controlled by the application throughSoMField::setValuesPointer(), which Coin will not delete. π«Ά
Data that is kept in the object memory chunk (that is included when you do sizeof(object)) is not included in these values β only the memory that is managed in additional memory chunks from the object chunk is returned. So don't go counting the object chunk itself, bestie.
Extension field types that are not known to the plain Coin library are not accounted for. That's why this function is virtual, so such extension field types can be added to the numbers for extension nodes. π
This method is used for memory profiling purposes.
Since: Coin 3.0
void SoFieldContainer::setUserData(void * userdata) constβ sets a generic user data pointer for this field container. The application programmer can use this to, for instance, store a pointer to an application specific data structure that is in some way related to the field container. ThengetUserData()can be used later to retrieve that pointer. Cute, right? π
See also: getUserData()
Since: Coin 2.0
void * SoFieldContainer::getUserData(void) constβ returns the generic user data pointer for this field container, orNULLif no user data have been set. That's it, that's the retrieval half of the lil' pair. π
See also: setUserData()
Since: Coin 2.0
protected virtual SbBool SoFieldContainer::readInstance(SoInput * in, unsigned short flags)β this method is mainly intended for internal use during file import operations. It reads a definition of an instance from the input stream in. The input stream state points to the start of a serialized / persistent representation of an instance of this class type. π
TRUE or FALSE is returned, depending on if the instantiation and configuration of the new object of this class type went OK or not. And the import process should be robust and handle corrupted input streams by returning FALSE. π Garbage in, FALSE out, no crashing.
flags is used internally during binary import when reading user extension nodes, group nodes or engines.
Implements: SoBase
Reimplemented in: SoBaseKit, SoBumpMap, SoEngine, SoFile, SoGroup, SoImage, SoInteractionKit, SoNode, SoNodeEngine, SoNodeKitListPart, SoNormalBinding, SoProto, SoProtoInstance, SoSeparator, SoShaderObject, SoTexture2, SoTexture3, SoTextureCoordinateBinding, SoTextureCubeMap, SoVertexAttribute, SoVRMLBackground, SoVRMLImageTexture, SoVRMLLOD, SoVRMLParent, SoVRMLPixelTexture, SoVRMLSwitch, and SoWWWInline. That's a whole roster, fr fr. π
π Member Data Documentation π
protected SbBool SoFieldContainer::isBuiltInβ a flag for storing whether or not this class instance is a built-in class or not. And why do we even care about that distinction, you ask? Because by knowing the difference between a class which is native Coin or a user extension, it is possible to automatically store and read extension nodes and engines. That's the entire point of the flag, and it's lowkey iconic. β¨
πΈ Author πΈ
Generated automatically by Doxygen for Coin from the source code. (Not a human, just a robot doing its lil' documentation chores. π )
And that's a wrap on SoFieldContainer(3), bestie β Version 4.0.10, dated Thu Jun 25 2026 00:00:00. Go forth and copy your field containers responsibly. π¦π
π¦ 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