SOCOMPOSEVEC4F(3iv)

✨ SoComposeVec4f ✨

okay bestie, welcome to the SoComposeVec4f page πŸ’– this is from section 3IV of the manual, and it's genuinely one of the cutest little engines in the Inventor universe. she takes four floaty numbers and smooshes them into one 4D vector. that's it. that's her whole job. iconic behavior honestly πŸŽ€


🌸 NAME 🌸

SoComposeVec4f β€” composes 4D vectors from floating-point values

like... she composes. she's the composer. the main character of vector assembly 🫢


πŸ‘‘ INHERITS FROM πŸ‘‘

SoBase > SoFieldContainer > SoEngine > SoComposeVec4f

so she's got that whole ancestry going on β€” everything SoBase can do, everything SoFieldContainer can do, everything SoEngine can do, and then her own lil thing on top. generational excellence fr fr πŸ’…


✨ SYNOPSIS ✨

#include <Inventor/engines/SoCompose.h>

Inputs from class SoComposeVec4f:

SoMFFloat           x
SoMFFloat           y
SoMFFloat           z
SoMFFloat           w

Outputs from class SoComposeVec4f:

(SoMFVec4f)         vector

Methods from class SoComposeVec4f:

                     SoComposeVec4f()

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 the tea is: this engine takes four floating-point inputs and composes a 4D vector out of them. literally that's the plot. four numbers walk in, one vec4f walks out πŸ¦‹

and here's the part that's lowkey the coolest β€” the input fields can have multiple values, which means the engine can compose several vectors in parallel. multitasking queen. ✨

but wait, what if some inputs have more values than others?? πŸ™ˆ no stress β€” in that case, the last value of the shorter inputs will be repeated as necessary. so she just stretches them out to match. the way that she pads the short ones without complaining... a supportive friend fr fr πŸ’œ


πŸŽ€ INPUTS πŸŽ€

  • SoMFFloat x β€” the x component πŸ’«
  • SoMFFloat y β€” the y component πŸ’«
  • SoMFFloat z β€” the z component πŸ’«
  • SoMFFloat w β€” the w component πŸ’«

four besties, four components, one destiny 🫢


🌈 OUTPUTS 🌈

  • (SoMFVec4f) vector β€” vector composed of x, y, z, and w. that's the whole girl. the final product. the moment we've all been waiting for πŸ‘‘

πŸ’… METHODS πŸ’…

  • SoComposeVec4f() β€” Constructor. new girl just dropped πŸŽ€

πŸ“ FILE FORMAT/DEFAULTS πŸ“

ComposeVec4f {
    x  0
    y  0
    z  0
    w  0
}

everything starts at 0 bestie, so she begins life as a very calm, very neutral vector at the origin. no drama. no cap. ⭐


πŸ”₯ SEE ALSO πŸ”₯

  • SoDecomposeVec4f β€” the reverse queen, she takes it apart again 😭
  • SoEngineOutput

ngl if you're composing vectors and you're not using this, what are you even doing. vibe check passed. βœ…

that's the whole page!! and just so we're clear, this was SoComposeVec4f(3IV)() β€” that's the source/version + date line from the very bottom of the original, folded into this little sign-off because we're cute like that πŸ’– thanks for reading bestie, go compose something gorgeous βœ¨πŸŒΈπŸ¦‹