SoFieldContainer(3)
π NAME π
okay bestie, so this is SoFieldContainer(3) β and the SoFieldContainer class is a base class for all classes that contain fields. that's the whole name section, slay. π
β¨ SYNOPSIS β¨
#include <Inventor/fields/SoFieldContainer.h>
Inherits SoBase.
Inherited by SoEngine, and SoNode.
π«Ά Public Member Functions
void setToDefaults (void)
SbBool hasDefaultValues (void) const
SbBool fieldsAreEqual (const SoFieldContainer *container) const
void copyFieldValues (const SoFieldContainer *container, SbBool copyconnections=0)
SbBool set (const char *const fielddata)
void get (SbString &fielddata)
virtual int getFields (SoFieldList &l) const
virtual int getAllFields (SoFieldList &l) const
virtual SoField * getField (const SbName &name) const
virtual SoField * getEventIn (const SbName &name) const
virtual SoField * getEventOut (const SbName &name) const
SbBool getFieldName (const SoField *const field, SbName &name) const
SbBool enableNotify (const SbBool flag)
SbBool isNotifyEnabled (void) const
SbBool set (const char *fielddata, SoInput *in)
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=0)
virtual void writeInstance (SoOutput *out)
SbBool getIsBuiltIn (void) const
virtual const SoFieldData * getFieldData (void) const
virtual void copyContents (const SoFieldContainer *from, SbBool copyconnections)
virtual SoFieldContainer * copyThroughConnection (void) const
void setUserData (void *userdata) const
void * getUserData (void) const
π Public Member Functions inherited from SoBase
void ref (void) const
void unref (void) const
void unrefNoDelete (void) const
int32_t getRefCount (void) const
void touch (void)
virtual SoType getTypeId (void) const =0
SbBool isOfType (SoType type) const
virtual SbName getName (void) const
virtual 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) const
SbBool shouldWrite (void)
void assertAlive (void) const
β Static Public Member Functions
static void initClass (void)
static SoType getClassTypeId (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)
static SoType getClassTypeId (void)
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 *in, SoBase *&base, SoType expectedtype)
static void setInstancePrefix (const SbString &c)
static void setTraceRefs (SbBool trace)
static SbBool getTraceRefs (void)
static SbBool connectRoute (SoInput *in, const SbName &fromnodename, const SbName &fromfieldname, const SbName &tonodename, const SbName &tofieldname)
static SbBool readRoute (SoInput *in)
π Protected Member Functions
SoFieldContainer (void)
~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) const
SbBool writeHeader (SoOutput *out, SbBool isgroup, SbBool isengine) const
void writeFooter (SoOutput *out) const
virtual const char * getFileFormatName (void) const
π¦ 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)
π DETAILED DESCRIPTION π
okay so the SoFieldContainer class is a base class for all classes that contain fields. yes, again, it's giving foundational. π
the classes that hold fields in Coin are the node and engine classes, so literally all of them are subclasses of SoFieldContainer. iconic family tree fr fr.
SoFieldContainer hands you the methods for reading, writing, comparing for equality, doing copy operations, etc on fields. it's the whole toolkit bestie. π«Ά
π See also
SoField
πΈ Constructor & Destructor Documentation πΈ
SoFieldContainer::SoFieldContainer (void ) [protected]
Constructor. β¨
References isBuiltIn.
Referenced by addCopy(), checkCopy(), SoBaseKit::copyContents(), SoCallback::copyContents(), SoClipPlaneManip::copyContents(), copyContents(), SoFile::copyContents(), SoGroup::copyContents(), SoInteractionKit::copyContents(), SoNode::copyContents(), SoNodeKitListPart::copyContents(), SoVRMLAppearance::copyContents(), SoVRMLGeometry::copyContents(), SoVRMLLOD::copyContents(), SoVRMLParent::copyContents(), SoVRMLScript::copyContents(), SoVRMLShape::copyContents(), SoVRMLSwitch::copyContents(), SoWWWInline::copyContents(), copyFieldValues(), SoEngine::copyThroughConnection(), copyThroughConnection(), SoNode::copyThroughConnection(), fieldsAreEqual(), findCopy(), SoEngine::getOutputData(), hasDefaultValues(), and setToDefaults().
SoFieldContainer::~SoFieldContainer () [protected]
Destructor. π that's it, that's the whole description.
π Member Function Documentation π
void SoFieldContainer::setToDefaults (void )
this method sets all fields which we are parenting to their respective default values. reset era. π
References SoType::createInstance(), getFieldData(), getFields(), SoBase::getTypeId(), SoFieldData::overlay(), SoBase::ref(), SoFieldContainer(), and SoBase::unref().
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. vibe check on the defaults, basically. β¨
References SoType::createInstance(), getFieldData(), SoBase::getTypeId(), SoFieldData::isSame(), SoBase::ref(), SoFieldContainer(), and SoBase::unref().
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. π―
References getFieldData(), SoFieldData::isSame(), and SoFieldContainer().
void SoFieldContainer::copyFieldValues (const SoFieldContainer * container, SbBool copyconnections = 0)
β οΈ heads up bestie β 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 aswell.
References getFieldData(), SoFieldData::overlay(), SoDebugError::postInfo(), and SoFieldContainer().
Referenced by copyContents().
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()
References set().
Referenced by set().
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. no cap, it's literally the file format. π
π See also
set()
References get().
Referenced by get().
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 valid.
References SoFieldList::append(), SoFieldData::getField(), getFieldData(), SoField::getFieldType(), and SoFieldData::getNumFields().
Referenced by setToDefaults(), and SoEngine::shouldCopy().
int SoFieldContainer::getAllFields (SoFieldList & fields) const [virtual]
returns VRML eventIn and eventOut fields in addition to the "ordinary" fields. the full roster, not just the mains. π
π See also
getFields()
References SoFieldList::append(), SoFieldData::getField(), getFieldData(), and SoFieldData::getNumFields().
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. π―
References SoFieldData::getField(), getFieldData(), SoFieldData::getFieldName(), and SoFieldData::getNumFields().
Referenced by SoField::copyConnection(), SoBaseKit::createFieldList(), SoTransformManip::fieldSensorCB(), getEventIn(), getEventOut(), SoField::readConnection(), SoTransformManip::valueChangedCB(), and SoDragger::workFieldsIntoTransform().
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. π
References getField(), and SoField::getFieldType().
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. π€
References getField(), and SoField::getFieldType().
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.
References getFieldData(), SoFieldData::getFieldName(), and SoFieldData::getIndex().
Referenced by SoField::connectFrom(), SoField::copyConnection(), SoVRMLScript::notify(), and SoDebug::writeField().
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()
Referenced by SoTabPlaneDragger::GLRender(), and SoBaseKit::readInstance().
SbBool SoFieldContainer::isNotifyEnabled (void ) const
bestie this one is just a little vibe check on your container π it hands back whether notification of changes to the field values in the container is propagated to its auditors. yes or no. that's the whole thing.
See also: enableNotify()
Referenced by SoEngine::notify(), and SoNodeEngine::notify().
SbBool SoFieldContainer::set (const char * fielddata, SoInput * in)
okay so this one parses the values of one or more fields straight out of the fielddata string, no cap β¨
and like β those fields have to be in the exact same format as the Open Inventor file format. no improvising, no freestyling π
if it goes well you get TRUE back, and if it doesn't you get FALSE. periodt.
we use the reference dictionary that in provides π«Ά
See also: get()
References getFieldData(), SoDebugError::postInfo(), SoFieldData::read(), and SoInput::setBuffer().
void SoFieldContainer::get (SbString & fielddata, SoOutput * out)
the mirror image, fr fr πͺ this one puts the names and values of the fields from this instance into the fielddata string. and heads up β the fields get separated in that returned string by end-of-line characters.
we use the reference dictionary that out provides.
See also: set()
References SoOutput::getBuffer(), getFieldData(), SoOutput::setBuffer(), SoOutput::setStage(), and SoFieldData::write().
void SoFieldContainer::notify (SoNotList * l) [virtual]
when changes happen, this one notifies all the auditors for this instance π£ that's it, that's the job.
Reimplemented from SoBase.
Reimplemented in SoAsciiText, SoBlinker, SoBumpMap, SoEngine, SoImage, SoLevelOfDetail, SoLOD, SoMaterial, SoNode, SoNodeEngine, SoPackedColor, SoSceneTexture2, SoSeparator, SoShadowGroup, SoShape, SoSwitch, SoText3, SoTexture2, SoTexture3, SoTextureCubeMap, SoVertexProperty, SoVertexShape, SoVRMLAppearance, SoVRMLBillboard, SoVRMLCollision, SoVRMLElevationGrid, SoVRMLExtrusion, SoVRMLGeometry, SoVRMLGroup, SoVRMLIndexedLine, SoVRMLIndexedShape, SoVRMLLOD, SoVRMLParent, SoVRMLPixelTexture, SoVRMLProximitySensor, SoVRMLScript, SoVRMLShape, SoVRMLSwitch, SoVRMLText, SoVRMLTimeSensor, SoVRMLTouchSensor, SoVRMLTransform, SoVRMLVertexLine, SoVRMLVertexPoint, and SoVRMLVertexShape. (she's booked and busy π
)
References SoNotList::append(), SoNotRec::getBase(), SoNotList::getLastRec(), SoNotRec::getType(), SoBase::notify(), SoDebugError::postInfo(), and SoBase::SoBase().
Referenced by SoLevelOfDetail::notify(), SoLOD::notify(), SoNode::notify(), SoSeparator::notify(), SoSwitch::notify(), SoVRMLLOD::notify(), SoVRMLParent::notify(), and SoVRMLSwitch::notify().
SbBool SoFieldContainer::validateNewFieldValue (SoField * field, void * newval) [virtual]
okay so this API member is considered internal to the library, because it is not likely to be of interest to the application programmer. it's giving backstage pass only, iykyk π
and literally, the original docs say this about it: "I can't make head or tails of this method, it seems to return TRUE no matter what the arguments are." so likeβ¦ yeah. that's the whole note. iconic honestly π
void SoFieldContainer::addWriteReference (SoOutput * out, SbBool isfromfield = 0) [virtual]
this one gets used during the first write pass of a write action, to count up how many references point at this object inside the scene graph π’ very "who's talking about me" energy.
Reimplemented from SoBase.
Reimplemented in SoBaseKit.
References SoBase::addWriteReference(), getFieldData(), and SoFieldData::write().
Referenced by SoField::countWriteRefs(), SoGroup::write(), SoNode::write(), SoSwitch::write(), and SoVRMLParent::write().
void SoFieldContainer::writeInstance (SoOutput * out) [virtual]
writes all the fields contained in this instance out to the output stream inside out βοΈ
heads up though, this method is solely called from the write methods of fields. two flavours of that:
- from
SoField, if the write is happening because of a field-to-field connection, or - from one of the fields which may actually write
SoFieldContainerinstances, i.e.SoSFNode,SoMFNode,SoSFEngine,SoMFEngine,SoSFPathandSoMFPath.
and the reason this method has to exist on top of the ordinary write() method of SoNode is that the fields don't have a write action instance in their writeValue() method β so writeInstance() will create a brand new SoWriteAction and call continueToApply() on it. main character problem-solving energy, honestly π
Reimplemented in SoElapsedTime, SoEngine, SoNode, SoNodeEngine, and SoTimeCounter.
References getFieldData(), and SoFieldData::write().
Referenced by SoField::writeConnection(), and SoEngine::writeInstance().
SbBool SoFieldContainer::getIsBuiltIn (void ) const
simple little true/false situation πΈ
TRUEif this object is instantiated from one of the native Coin classesFALSEif the object's class lives outside the standard Coin library
References isBuiltIn.
Referenced by SoFieldData::write().
const SoFieldData * SoFieldContainer::getFieldData (void ) const [virtual]
hands you back a pointer to the class-wide field data storage object for this instance π and if there are no fields present at all? you get NULL.
Reimplemented in honestly everybody, bestie β here's the full guest list: SoAnnotation, SoAntiSquish, SoAppearanceKit, SoArray, SoAsciiText, SoBaseColor, SoBaseKit, SoBlinker, SoBoolOperation, SoBumpMap, SoBumpMapCoordinate, SoBumpMapTransform, 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, SoDirectionalLight, SoDirectionalLightDragger, SoDirectionalLightManip, SoDragger, SoDragPointDragger, SoDrawStyle, SoElapsedTime, SoEnvironment, SoEventCallback, SoExtSelection, SoFaceSet, SoFieldConverter, SoFile, SoFont, SoFontStyle, SoFragmentShader, SoFrustumCamera, SoGate, SoGeoCoordinate, SoGeoLocation, SoGeometryShader, SoGeoOrigin, SoGeoSeparator, SoGroup, SoHandleBoxDragger, SoHandleBoxManip, SoImage, SoIndexedFaceSet, SoIndexedLineSet, SoIndexedNurbsCurve, SoIndexedNurbsSurface, 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, SoNonIndexedShape, SoNormal, SoNormalBinding, SoNurbsCurve, SoNurbsProfile, SoNurbsSurface, SoOneShot, SoOnOff, SoOrthographicCamera, SoPackedColor, SoPathSwitch, SoPendulum, SoPerspectiveCamera, SoPickStyle, SoPointLight, SoPointLightDragger, SoPointLightManip, SoPointSet, SoPolygonOffset, SoProfile, SoProfileCoordinate2, SoProfileCoordinate3, SoQuadMesh, SoResetTransform, SoRotateCylindricalDragger, SoRotateDiscDragger, SoRotateSphericalDragger, SoRotation, SoRotationXYZ, SoRotor, SoScale1Dragger, SoScale2Dragger, SoScale2UniformDragger, SoScale, SoScaleUniformDragger, SoSceneKit, SoSceneTexture2, SoSelection, SoSelectOne, SoSeparator, SoSeparatorKit, SoShaderObject, SoShaderProgram, SoShadowCulling, SoShadowGroup, SoShadowStyle, SoShape, SoShapeHints, SoShapeKit, SoShuttle, SoSphere, SoSpotLight, SoSpotLightDragger, SoSpotLightManip, SoSurroundScale, SoSwitch, SoTabBoxDragger, SoTabBoxManip, SoTabPlaneDragger, SoText2, SoText3, SoTexture2, SoTexture2Transform, SoTexture3, SoTexture3Transform, SoTextureCombine, SoTextureCoordinate2, SoTextureCoordinate3, SoTextureCoordinateBinding, SoTextureCoordinateCube, SoTextureCoordinateCylinder, SoTextureCoordinateDefault, SoTextureCoordinateEnvironment, SoTextureCoordinateFunction, SoTextureCoordinatePlane, SoTextureCoordinateSphere, SoTextureCubeMap, SoTextureScalePolicy, SoTextureUnit, SoTimeCounter, SoTrackballDragger, SoTrackballManip, SoTransform, SoTransformation, SoTransformBoxDragger, SoTransformBoxManip, SoTransformerDragger, SoTransformerManip, SoTransformManip, SoTransformSeparator, SoTransformVec3f, SoTranslate1Dragger, SoTranslate2Dragger, SoTranslation, SoTransparencyType, SoTriangleStripSet, SoTriggerAny, SoUnits, 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. β¨
Referenced by addWriteReference(), SoVRMLScript::copyContents(), copyFieldValues(), fieldsAreEqual(), get(), getAllFields(), getField(), getFieldName(), getFields(), hasDefaultValues(), SoFieldData::isSame(), SoFieldData::overlay(), readInstance(), SoBaseKit::set(), SoBaseKit::set(), set(), setToDefaults(), SoVRMLParent::updateChildList(), SoNode::write(), SoVRMLScript::write(), and writeInstance().
tiny note: yeah SoBaseKit::set() really does show up twice in the original list. we keep it twice. no notes. π
void SoFieldContainer::copyContents (const SoFieldContainer * from, SbBool copyconnections) [virtual]
makes a deep copy of all the data in from into this instance π§ except external scenegraph references, and those only get skipped if copyconnections is FALSE.
this is the protected method β the one that should be overridden by extension node / engine / dragger / whatever subclasses that need to account for internal data which isn't handled automatically. so like, if you're out here writing your own subclass and you've got secrets the base class doesn't know about, this is where you tell it πΈ
but okay, real talk β if you're copying nodes from application code, you should not invoke this function directly. call SoNode::copy() instead, like this:
SoNode * mynewnode = templatenode->copy();
the same also goes for engines π
and bestie, when you override the copyContents() method in your extension class, make sure you also make it call upwards to its parent superclass in the inheritance hierarchy β because 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 etc)
SoNode::copyContents(from, copyconnections);
// [..then copy internal data..]
}
Okay so this method? It gets reimplemented in a whole squad of classes: SoBaseKit, SoCallback, SoClipPlaneManip, SoDirectionalLightManip, SoFile, SoGroup, SoInteractionKit, SoNode, SoNodeKitListPart, SoPointLightManip, SoRotateCylindricalDragger, SoRotateSphericalDragger, SoSpotLightManip, SoTransformManip, SoVRMLAppearance, SoVRMLGeometry, SoVRMLLOD, SoVRMLParent, SoVRMLScript, SoVRMLShape, SoVRMLSwitch, and SoWWWInline. Slay.
It's lowkey referencing copyFieldValues(), SoBase::getName(), SoBase::setName(), and SoFieldContainer().
And it's highkey referenced by SoClipPlaneManip::copyContents(), SoDirectionalLightManip::copyContents(), SoNode::copyContents(), SoPointLightManip::copyContents(), SoRotateCylindricalDragger::copyContents(), SoRotateSphericalDragger::copyContents(), SoSpotLightManip::copyContents(), SoTransformManip::copyContents(), SoVRMLGeometry::copyContents(), and findCopy().
SoFieldContainer * SoFieldContainer::copyThroughConnection (void ) const [virtual]
Bestie, this one is giving "Return copy of this instance." π
Note: the default implementation just returns this pointer, but SoNode and SoEngine override this method to return the pointer to the actual copy. No cap.
Reimplemented in SoEngine and SoNode.
References SoFieldContainer().
Referenced by SoField::copyConnection().
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. (iykyk)
It initializes a dictionary hash storing pointers for original fieldcontainer instances and their copies during scene graph copy operations. It's giving organized. ποΈ
This method is called from the start of SoNode::copy().
References SbList< Type >::insert().
Referenced by SoEngine::copy() and SoNode::copy().
void SoFieldContainer::addCopy (const SoFieldContainer * orig, const SoFieldContainer * copy) [static]
Add a pair of pointers to an original fieldcontainer and a copy of it to an internal pointer dictionary used during scene graph copy operations. Matchmaker, matchmaker! π
References SoBase::ref() and SoFieldContainer().
Referenced by SoBaseKit::addToCopyDict(), SoNode::addToCopyDict(), SoEngine::copy(), and findCopy().
SoFieldContainer * SoFieldContainer::checkCopy (const SoFieldContainer * orig) [static]
Returns the copy of orig, if any. If no copy exists, we return a NULL pointer. Ghosted. π»
References SoFieldContainer().
Referenced by SoBaseKit::addToCopyDict(), SoNode::addToCopyDict(), SoEngine::copy(), SoEngine::copyThroughConnection(), SoNode::copyThroughConnection(), findCopy(), SoField::referencesCopy(), SoMFEngine::referencesCopy(), SoMFNode::referencesCopy(), SoMFPath::referencesCopy(), SoSFEngine::referencesCopy(), SoSFNode::referencesCopy(), and SoSFPath::referencesCopy().
SoFieldContainer * SoFieldContainer::findCopy (const SoFieldContainer * orig, const SbBool copyconnections) [static]
Returns a copy of orig. If no copy has been made earlier when the function is called, a copy is made on-the-fly (which is the reason we need to pass along the copyconnections flag). It's giving spontaneous. πββοΈπ¨
This method will also run the copyContents() method on the copy, if it hasn't been run already. Note that if you call copyContents() on the copy outside of this method, this will go undetected and the guts of orig will be copied multiple times into its copy. Yikes, messy. π¬
If copyContents() is called directly (instead of using copy()), it's assumed that the user only wants to copy the field values, and we just return NULL here. This is done to match how it's done in SGI Inventor. Respect the OGs. π
See also: checkCopy()
References addCopy(), checkCopy(), copyContents(), SoType::createInstance(), SbList< Type >::getLength(), SoBase::getTypeId(), SoBase::isOfType(), and SoFieldContainer().
Referenced by SoEngine::copy(), SoNode::copy(), SoFile::copyContents(), SoGroup::copyContents(), SoWWWInline::copyContents(), SoEngine::copyThroughConnection(), SoNode::copyThroughConnection(), SoMFEngine::fixCopy(), SoMFNode::fixCopy(), SoMFPath::fixCopy(), SoSFEngine::fixCopy(), SoSFNode::fixCopy(), and SoSFPath::fixCopy().
void SoFieldContainer::copyDone (void ) [static]
This API member is considered internal to the library, as it is not likely to be of interest to the application programmer. (again, iykyk)
Clean up the dictionary hash. It's giving Marie Kondo. π§Ή
This method is called from the end of SoNode::copy().
References SbList< Type >::remove().
Referenced by SoEngine::copy() and SoNode::copy().
void SoFieldContainer::setUserData (void * userdata) const
Set a generic user data pointer for this field container. π¦
This function can be used by the application programmer to, for instance, store a pointer to an application specific data structure that is in some way related to the field container. getUserData() can later be used to retrieve the pointer. So you can put your stuff there and get it back. Slay.
See also: getUserData()
Since: Coin 2.0
void * SoFieldContainer::getUserData (void ) const
Return the generic user data pointer for this field container, or NULL if no user data has been set. Like, if you didn't set anything, you get nothing. π€·ββοΈ
See also: setUserData()
Since: Coin 2.0
SbBool SoFieldContainer::readInstance (SoInput * in, unsigned short flags) [protected], [virtual]
This method is mainly intended for internal use during file import operations. Not for the faint of heart.
It reads a definition of an instance from the input stream in. The input stream state points to the start of a serialized / persistant 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. The import process should be robust and handle corrupted input streams by returning FALSE. So like, don't crash, just say no. π
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, SoSeparator, SoShaderObject, SoTexture2, SoTexture3, SoTextureCoordinateBinding, SoTextureCubeMap, SoVRMLImageTexture, SoVRMLLOD, SoVRMLParent, SoVRMLPixelTexture, SoVRMLSwitch, and SoWWWInline.
References getFieldData() and SoFieldData::read().
Referenced by SoEngine::readInstance(), SoImage::readInstance(), SoNode::readInstance(), SoVRMLImageTexture::readInstance(), and SoVRMLPixelTexture::readInstance().
π Member Data Documentation π
SbBool SoFieldContainer::isBuiltIn [protected]
Flag for storing whether or not this class instance is a built-in class or not. 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. It's giving insider info. π·οΈ
Referenced by getIsBuiltIn(), SoShape::shouldGLRender(), and SoFieldContainer().
πΈ Author πΈ
Generated automatically by Doxygen for Coin from the source code. So like, a robot wrote this. Beep boop. π€
And that's the tea, bestie! This page was auto-generated by Doxygen for Coin from the source code. Coin Version 2.5.0, SoFieldContainer(3). Stay slaying! π β¨
π¦ where this page comes from
- fedora 43: Coin2-devel 2.5.0-52.fc43 Β· GPL-2.0-only
- fedora 43: Coin2-devel 2.5.0-52.fc43 Β· GPL-2.0-only
- fedora 44: Coin2-devel 2.5.0-54.fc44 Β· GPL-2.0-only
- fedora 44: Coin2-devel 2.5.0-54.fc44 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms