SOSFNODE(3iv)
π NAME π
SoSFNode β a field that holds a pointer to a node, bestie. That's it, that's the whole job. π
π¦ INHERITS FROM π¦
SoField > SoSField > SoSFNode
So it's a whole family tree situation, and SoSFNode is the main character at the bottom of it. π
β¨ SYNOPSIS β¨
#include <Inventor/fields/SoSFNode.h>
πΈ Methods from class SoSFNode πΈ
static SoType getClassTypeId()
virtual void getTypeId() const
SoNode * getValue() const
SoNode * operator =(SoNode * newValue)
void setValue(SoNode * newValue)
int operator ==(const SoSFNode &f) const
int operator !=(const SoSFNode &f) const
π Methods from class SoField π
void setIgnored(SbBool ignore)
SbBool isIgnored() const
SbBool isDefault() const
virtual SbBool isOfType(SoType type) const
SbBool set(const char *valueString)
void get(SbString &valueString)
void touch()
SbBool connectFrom(SoField *fromField)
SbBool connectFrom(SoEngineOutput *fromEngine)
void disconnect()
SbBool isConnected() const
SbBool isConnectedFromField() const
SbBool getConnectedField(SoField *&writingField) const
SbBool isConnectedFromEngine() const
SbBool getConnectedEngine(SoEngineOutput *&engineOutput)
const
void enableConnection(SbBool flag)
SbBool isConnectionEnabled() const
int getForwardConnections(SoFieldList &list) const
SoFieldContainer * getContainer() const
π DESCRIPTION π
okay so listen. This field keeps a pointer to an SoNode instance, and the important part is that it maintains that node's reference count correctly. Like, it's not just holding a pointer and ghosting β it's doing the responsible thing. π
When SoSFNodes get written out to a file, they're written as the node they're pointing to. For example:
mySoSFNodeField Cube {}
That right there is an SoSFNode field named 'mySoSFNodeField', and it's pointing to an SoCube node. periodt. π§
And if that node is being used somewhere else too? Then the regular DEF/USE instancing mechanism kicks in, no cap:
anotherSoSFNodeField USE topSeparator
That's an SoSFNode field pointing at a node named 'topSeparator' that was DEF'ed earlier in the scene. Sharing is caring, fr fr. π«Ά
π METHODS π
static SoType getClassTypeId()virtual void getTypeId() constβ Returns the type for this class or a particular object of this class. iykyk.SoNode * getValue() constβ Returns this field's value. the whole point tbh.SoNode * operator =(SoNode * newValue)void setValue(SoNode * newValue)β Sets this field to newValue. slay.int operator ==(const SoSFNode &f) constint operator !=(const SoSFNode &f) constβ ReturnsTRUEif f is of the same type and has the same value as this field. both. it has to be both. π₯
π SEE ALSO π
SoField, SoSField, SoMFNode, SoNode
and that's the whole page, bestie π this was SoSFNode(3IV), and ngl the footer info is literally just that same name with some very empty parentheses hanging out β version? date? not a single crumb. π anyway ily, go point at some nodes responsibly π¦β¨
π¦ where this page comes from
- debian bookworm: inventor-doc 2.1.5-10+dfsg-2 Β· LGPL-2.0-or-later
- debian trixie: inventor-doc 2.1.6+ds-2 Β· LGPL-2.0-or-later
- ubuntu jammy: inventor-doc 2.1.5-10-24
- ubuntu noble: inventor-doc 2.1.5-10+dfsg-2.1build2 Β· LGPL-2.0-or-later
- ubuntu questing: inventor-doc 2.1.6+ds-2
- ubuntu resolute: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- ubuntu stonking: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms