SOCOUNTER(3iv)
π SoCounter β triggered integer counter π
okay bestie, welcome to the SoCounter(3IV) page, section 3 of the IV manuals, and no you're not dreaming, this is genuinely one of the cutest little engines in the whole Inventor situation. it counts. it goes up. it loops. it's giving β¨clockwork fairyβ¨. let's get into it π«Ά
πΈ INHERITS FROM πΈ
SoBase > SoFieldContainer > SoEngine > SoCounter
so yes, she has ancestors. she's got the whole family tree behind her. main character lineage fr fr π
β¨ SYNOPSIS β¨
#include <Inventor/engines/SoCounter.h>
π Inputs from class SoCounter:
SoSFShort min
SoSFShort max
SoSFShort step
SoSFTrigger trigger
SoSFShort reset
π Outputs from class SoCounter:
(SoSFShort) output
(SoSFTrigger) syncOut
π Methods from class SoCounter:
SoCounter()
π Methods from class SoEngine:
static SoType getClassTypeId()
virtual int getOutputs(SoEngineOutputList &list) const
SoEngineOutput * getOutput(const SbName &outputName) const
SbBool getOutputName(const SoEngineOutput *output, SbName
&outputName) const
SoEngine * copy() const
static SoEngine * getByName(const SbName &name)
static int getByName(const SbName &name, SoEngineList &list)
π Methods from class SoFieldContainer:
void setToDefaults()
SbBool hasDefaultValues() const
SbBool fieldsAreEqual(const SoFieldContainer *fc) const
void copyFieldValues(const SoFieldContainer *fc, SbBool
copyConnections = FALSE)
SbBool set(const char *fieldDataString)
void get(SbString &fieldDataString)
virtual int getFields(SoFieldList &resultList) const
virtual SoField * getField(const SbName &fieldName) const
SbBool getFieldName(const SoField *field, SbName &fieldName)
const
SbBool isNotifyEnabled() const
SbBool enableNotify(SbBool flag)
π Methods from class SoBase:
void ref()
void unref() const
void unrefNoDelete() const
void touch()
virtual SoType getTypeId() const
SbBool isOfType(SoType type) const
virtual void setName(const SbName &name)
virtual SbName getName() const
π¦ DESCRIPTION π¦
so what even is this. it's an engine that spits out numbers β literally just a counter. it starts at a minimum value, goes up by a step value, and stops before it would exceed the maximum value. every time the trigger input gets touched, it outputs the next number. and the moment it hits the maximum? it loops all the way back to the beginning and starts over. iconic circular behavior, honestly. π
at any point you can reset the counter to a specific value by setting the reset input field to that value. then, the next time the counter gets triggered, it starts counting from there. important though β the counter will always output numbers based on the min, max and step values, and setting the reset value does not change those input fields. no cap. and if the reset value isn't a legal counter value? the counter still acts like it is. she's unbothered. π
- if
resetis greater thanmax, the counter is set tomax. - if
resetis less thanmin, the counter is set tomin. - if
resetis between steps, the counter is set to the lower step value.
each time a counting cycle starts, the syncOut output gets triggered. use it to synchronize some other event with the counting cycle. it's giving "we move as one" π«Άβ¨
π INPUTS π
SoSFShort minβ the minimum value for the counter. the floor. the ground level. she will not go below it bestie.SoSFShort maxβ the maximum value for the counter. the ceiling. the moment she hits it, she loops back around.SoSFShort stepβ the counter step value. how big of a jump she takes every single time.SoSFTrigger triggerβ go to the next step. that's it. that's the whole job. touch her and she moves. β‘SoSFShort resetβ at the next trigger, reset the counter to the specified value. so like, a little redirect before the next count. π―
π OUTPUTS π
(SoSFShort) outputβ countsmin-to-maxinstepincrements. this is the number you came here for. π(SoSFTrigger) syncOutβ triggers at cycle start. perfect for syncing other stuff up with the counting cycle, iykyk.
π METHODS π
SoCounter()β constructor. the birth of a counter. tiny. fresh. ready to count. π£
π FILE FORMAT/DEFAULTS π
Counter {
min 0
max 1
step 1
trigger
reset 0
}
lowkey just copy this vibe and you're set. defaults are defaults, don't come for me. π
β SEE ALSO β
SoTimeCounter, SoEngineOutput
go read those too, bestie, they're the extended universe. π§
and that's the whole page!! this was the SoCounter(3IV)() manual, version/date footer and all, and honestly? she ate. slay. periodt. π
β¨π
π¦ 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