SONODESENSOR(3iv)
π¦ NAME π¦
okay so SoNodeSensor β it's a sensor class, and you can attach it to Inventor nodes. that's the whole vibe. it watches nodes for you, no cap. π
(also this page is SoNodeSensor(3IV) if you're keeping track, bestie β 3iv, section 3, iconic behavior)
πΈ INHERITS FROM πΈ
the family tree goes like this, top to bottom:
SoSensorSoDelayQueueSensorSoDataSensorSoNodeSensor
so it's a whole lineage. main character energy runs in the blood fr fr. β¨
π SYNOPSIS π
first, the include. copy it exactly, don't freestyle:
#include <Inventor/sensors/SoNodeSensor.h>
π Methods from class SoNodeSensor:
SoNodeSensor()
SoNodeSensor(SoSensorCB *func, void *data)
~SoNodeSensor()
void attach(SoNode *node)
void detach()
SoNode * getAttachedNode() const
π¦ 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
π 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()
β Methods from class SoSensor:
void setFunction(SoSensorCB *callbackFunction)
SoSensorCB * getFunction() const
void setData(void *callbackData)
void * getData() const
π DESCRIPTION π
so here's the tea. node sensors detect changes to nodes. they call a callback function whenever any field of the node changes β or, and this is the fun part, if the node is a group node, whenever any children of the node change. it's giving "watches the whole group chat, not just one person." obsessed. π«Ά
β¨ METHODS β¨
SoNodeSensor()SoNodeSensor(SoSensorCB *func, void *data)
these two are the creation methods, aka how you birth a sensor into existence. the second one takes the callback function and the data to be called when the sensor is triggered. that's your func and your data, right there in the signature. πΈ
~SoNodeSensor()
this is the destructor. it destroys the sensor and frees up any memory associated with it β but not before unscheduling it first. clean exit, we love to see it. π
void attach(SoNode *node)void detach()SoNode *getAttachedNode() const
okay so these three are a little trio, let me break them down:
- the
attach()method makes this sensor detect changes to the givennode. that's it. that's the assignment. - the
detach()method unschedules this sensor (only if it's scheduled, don't worry) and makes it ignore changes to the scene graph. it's giving "we're not doing this anymore." - the
getAttachedNode()method returns the node that this sensor is sensing β orNULLif it is not attached to any node. so like, if you detached, expect aNULL. don't be surprised bestie. π
π SEE ALSO π
go read these next, they're all in the same friend group:
SoFieldSensorSoPathSensorSoDataSensor
ok that's the whole page. go forth and sense nodes responsibly. no cap. π₯
and that's a wrap on SoNodeSensor(3IV) β source, version, and date all bundled up in that same little SoNodeSensor(3IV)() footer energy, mwah. byeeee ππ§π
π¦ 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