SOTIMECOUNTER(3iv)
π SoTimeCounter β timed integer counter π
okay bestie, welcome to SoTimeCounter(3IV) β yes she's a section 3IV manpage, yes she's iconic, and yes we're gonna get through this together. grab a boba, we're counting π
πΈ INHERITS FROM πΈ
SoBase > SoFieldContainer > SoEngine > SoTimeCounter
like... look at that family tree. she gets it from her ancestors, fr fr.
β¨ SYNOPSIS β¨
#include <Inventor/engines/SoTimeCounter.h>
π Inputs from class SoTimeCounter
SoSFTime timeIn
SoSFShort min
SoSFShort max
SoSFShort step
SoSFBool on
SoSFFloat frequency
SoMFFloat duty
SoSFShort reset
SoSFTrigger syncIn
π¦ Outputs from class SoTimeCounter
(SoSFShort) output
(SoSFTrigger) syncOut
π Methods from class SoTimeCounter
SoTimeCounter()
π 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 π
okay so picture this: this engine is literally just a counter. it outputs numbers, starting at a minimum value, going up by a step value, and stopping at a number that does not exceed the maximum value. the moment it hits max? it starts all the way over from the beginning. periodt.
now here's the tea β the difference between this engine and the SoCounter engine is that this one has a timeIn input, which lets the counting cycles be timed. this engine counts automatically over time; it does not need to be triggered to go to the next step. by default, the timeIn input is connected to the realTime global field. but bestie, it can be connected to any time source you want. main character energy: flexible.
the frequency input field controls how many min-to-max cycles are performed per second. for example, a frequency value of 0.5 means it will take 2 seconds to complete a single min-to-max cycle. math ate, ngl.
and the steps in the count cycle do not necessarily all have the same duration. using the duty input field, you can arbitrarily split the time period of the count cycle between the steps. for example, if there are 5 steps in the cycle, a duty input of (1., 2., 2., 2., 1.) will make the second, third, and fourth steps take twice as long as the first and last steps. she said "not all steps are equal" and honestly? slay.
at any time the counter can be reset to a specific value. if you set the reset input field to a value, the engine will continue counting from there. note that the counter will always output numbers based on the min, max and step values, and setting the reset value does not affect those input fields. if the reset value is not a legal counter value, the counter will still behave as though it is:
- If
resetis greater thanmax, the counter is set tomax. - If
resetis less thanmin, the counter is set tomin. - If
resetis between step values, the counter is set to the lower step.
each time a counting cycle is started, the syncOut output is triggered. this output can be used to synchronize some other event with the counting cycle. other events can also synchronize the counter by triggering the syncIn input. it's giving collaboration β¨
you can pause the engine by setting the on input to FALSE, and it will stop updating the output field. when you turn off the pause by setting on to TRUE, it will start counting again from where it left off. nap time over, back to work π
π«Ά INPUTS π«Ά
SoSFTimetimeInβ running time. the clock that keeps everything moving, iykyk.SoSFShortminβ minimum value for the counter. the floor, the starting line, the bottom.SoSFShortmaxβ maximum value for the counter. the ceiling, the finish line, the top.SoSFShortstepβ counter step value. how big each lil hop is.SoSFBoolonβ counter pauses if this is set toFALSE. set it back toTRUEand she's awake again.SoSFFloatfrequencyβ number of min-to-max cycles per second. how fast the whole loop goes around.SoMFFloatdutyβ duty cycle values. the vibes-per-step breakdown.SoSFShortresetβ reset the counter to the specified value. snap back to a chosen number.SoSFTriggersyncInβ restart at the beginning of the cycle. do it again, but from the top.
β OUTPUTS β
(SoSFShort)outputβ counts min-to-max, in step increments. the actual number, bestie.(SoSFTrigger)syncOutβ triggers at cycle start. the "we're so back" signal.
π METHODS π
SoTimeCounter()β constructor. she's born β¨
π FILE FORMAT/DEFAULTS π
TimeCounter {
min 0
max 1
step 1
on TRUE
frequency 1
duty 1
timeIn <current time>
syncIn
reset 0
}
look at those defaults. min 0, max 1, step 1, on TRUE, frequency 1, duty 1, timeIn <current time>, syncIn, reset 0. immaculate. no notes. π«Ά
π¦ SEE ALSO π¦
SoCounter, SoElapsedTime, SoEngineOutput
go read those too, bestie, they're in the group chat.
lowkey obsessed with you for reading all the way down here. that's real.
this has been SoTimeCounter(3IV)() β yeah that's the source and version tag and honestly she's serving it π β signing off, stay counting, stay cunty, no cap πβ¨ππ¦πΈπ
π¦ 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