SOSHUTTLE(3iv)

✨ SoShuttle ✨

okay bestie, gather round, because this is the SoShuttle(3IV) page and it's literally about making things move back and forth and I'm obsessed πŸ’–


πŸ¦‹ NAME πŸ¦‹

SoShuttle β€” animated oscillating translation node

no cap, that's the whole vibe: it's a translation node that shuttles. back. and. forth. πŸ”


🌸 INHERITS FROM 🌸

the whole glow-up lineage, from the very bottom to our girl:

SoBase > SoFieldContainer > SoNode > SoTransformation > SoTranslation >
SoShuttle

✨ SYNOPSIS ✨

first things first, you gotta pull her in:

#include <Inventor/nodes/SoShuttle.h>

πŸ’… Fields from class SoShuttle

SoSFVec3f           translation0
SoSFVec3f           translation1
SoSFFloat           speed
SoSFBool            on

πŸŽ€ Fields from class SoTranslation

SoSFVec3f           translation

🫢 Methods from class SoShuttle

                     SoShuttle()
static SoType       getClassTypeId()

🌈 Methods from class SoNode

void                setOverride(SbBool state)
SbBool              isOverride() const
SoNode *            copy(SbBool copyConnections = FALSE) const
virtual SbBool      affectsState() const
static SoNode *     getByName(const SbName &name)
static int          getByName(const SbName &name, SoNodeList &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 here's the tea, bestie β˜•: SoShuttle is derived from SoTranslation, which means it applies a translation to the current transformation. but like… it moves.

Using engines connected to the realTime global field, the translation value gets animated over time, bouncing between two fixed translations β€” that's the whole shuttling effect, it's giving metronome, it's giving pendulum's cooler cousin. πŸ•°οΈ

you can tune the period of the motion by changing the speed field. and if you ever wanna know where the translation currently is at any moment? that's sitting right there in the translation field, inherited from SoTranslation. iconic.


🌟 FIELDS 🌟

  • SoSFVec3f translation0 and SoSFVec3f translation1 β€” these are the two fixed translations that get interpolated to create the shuttling motion. two endpoints, one love story πŸ’ž
  • SoSFFloat speed β€” defines the speed of the shuttle, in cycles per second. ⚑
  • SoSFBool on β€” lets applications enable or disable the motion easily. the on/off switch, the pause button, the "not right now bestie" πŸ™ˆ

πŸŽ€ METHODS πŸŽ€

  • SoShuttle() β€” creates a shuttle node with default settings. fresh out the box, ready to vibe. ✨
  • static SoType getClassTypeId() β€” returns type identifier for this class. classic.

πŸ”₯ ACTION BEHAVIOR πŸ”₯

  • SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoRayPickAction β€” concatenates interpolated translation value with the current transformation matrix.
  • SoGetMatrixAction β€” returns transformation matrix specified by the interpolated translation.

🌈 FILE FORMAT/DEFAULTS 🌈

here's exactly what she looks like written out, no cap:

Shuttle {
    translation   0 0 0
    translation0  0 0 0
    translation1  0 0 0
    speed         1
    on            TRUE
}

πŸ‘‘ SEE ALSO πŸ‘‘

SoPendulum, SoRotor β€” the rest of the squad, go say hi 🫢


lowkey reminder: if you're tweaking speed, you're tweaking cycles per second. that's the whole dial. don't overthink it, bestie πŸ’…

and that's a wrap on this SoShuttle(3IV) page, from the SoShuttle(3IV)() era β€” go forth and oscillate, you absolute main character πŸŒΈπŸ’–βœ¨