SOFIELDSENSOR(3iv)
π SoFieldSensor π
okay so bestie, you found the SoFieldSensor(3IV) page, and honestly? iconic. this is the sensor class that can be attached to Inventor fields, and we're gonna go through the whole thing together, no skipping, no skimming, periodt. grab a strawberry π and let's go.
π¦ INHERITS FROM π¦
the family tree, the lineage, the bloodline:
SoSensor > SoDelayQueueSensor > SoDataSensor > SoFieldSensor
so yes, your girl inherits from SoSensor, which inherits from SoDelayQueueSensor, which inherits from SoDataSensor, which inherits from SoFieldSensor. it's giving noble ancestry π
β¨ SYNOPSIS β¨
first things first, the include. copy it exactly, don't be cute with it:
#include <Inventor/sensors/SoFieldSensor.h>
the methods from class SoFieldSensor π
SoFieldSensor()
SoFieldSensor(SoSensorCB *func, void *data)
~SoFieldSensor()
void attach(SoField *field)
void detach()
SoField * getAttachedField() const
and the methods from class SoDataSensor πΈ
void setDeleteCallback(SoSensorCB *function, void *data)
SoNode * getTriggerNode() const
SoField * getTriggerField() const
SoPath * getTriggerPath() const
void setTriggerPathFlag(SbBool flag)
SbBool getTriggerPathFlag() const
plus the methods from class SoDelayQueueSensor π§
void setPriority(uint32_t pri)
uint32_t getPriority()
static uint32_t getDefaultPriority()
virtual void schedule()
virtual void unschedule()
virtual SbBool isScheduled()
and finally the methods from class SoSensor β
void setFunction(SoSensorCB *callbackFunction)
SoSensorCB * getFunction() const
void setData(void *callbackData)
void * getData() const
π DESCRIPTION π
so what is this thing, bestie? Field sensors detect changes to fields, and they call a callback function whenever the field changes. that's the whole vibe. the way that a field can be part of a node, an input of an engine, or a global field β literally any of those. you attach a sensor, you get told when stuff moves. it's giving main character energy, fr fr.
π METHODS π
okay now the good part. buckle up.
SoFieldSensor()SoFieldSensor(SoSensorCB *func, void *data)
these are the creation methods, the origin story. the second one takes the callback function and the data that gets called when the sensor is triggered. so you hand it func and data and it knows what to do when the tea gets spilled. π«
~SoFieldSensor()
the destructor. it destroys the sensor, and it frees up any memory associated with it after unscheduling it. so like, it cleans up after itself, which is honestly more than most of us can say π
void attach(SoField *field)void detach()SoField *getAttachedField() const
the trio, the friend group, the holy trinity of attachment:
- the
attach()method makes this sensor detect changes to the givenfield. you're basically saying "hey bestie, watch this one for me" π - the
detach()method unschedules this sensor (if it is scheduled) and makes it ignore changes to the scene graph. it's the "we're not doing this anymore" of methods, no hard feelings. - the
getAttachedField()method returns the field that this sensor is sensing, orNULLif it is not attached to any field. so if you forgot what you attached it to, this tells you. very "who did i text at 3am" energy.
ngl the NULL case matters: no attached field, no field returned, that's just how it is.
π SEE ALSO π
go read these next, they're all in the same friend group:
SoNodeSensorSoPathSensorSoDataSensor
and that's the whole page, bestie!! π no cap, you now know SoFieldSensor better than most people know themselves. this adorable lil' page signs off as SoFieldSensor(3IV)() β that's the source and the version stamp, right there at the bottom, and yes it's the same as the title because that's just the format, okay?? slay. bye!! πβ¨π¦πΈπ
π«Ά
π¦ 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