SOTRANSLATION(3iv)

πŸ’– SoTranslation β€” bestie's guide to the 3D translation node πŸ’–

okay so real talk, this is a page from the SoTranslation(3IV) manual β€” yes that's the manual name, 3IV, we love her β€” and she's about to explain a whole entire node to you. sit down, hydrate, let's go 🫢


✨ NAME ✨

SoTranslation β€” the node that represents a 3D translation. that's it, that's the whole job, and she does it gorgeously πŸ’…


🌸 INHERITS FROM 🌸

the family tree is giving legacy:

SoBase > SoFieldContainer > SoNode > SoTransformation > SoTranslation

she got it from her mamas, no cap 🧚


πŸŽ€ SYNOPSIS πŸŽ€

first things first, you gotta include her:

#include <Inventor/nodes/SoTranslation.h>

Fields from class SoTranslation:

SoSFVec3f           translation

Methods from class SoTranslation:

                    SoTranslation()
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

that's a LOT of inherited methods bestie, and yes, they all come through. she's not gatekeeping 🫢


πŸ’œ DESCRIPTION πŸ’œ

so basically: this node defines a translation by a 3D vector. literally that's it. she moves things. in three dimensions. iconic behaviour honestly ✨


πŸ¦‹ FIELDS πŸ¦‹

  • SoSFVec3f translation β€” the translation vector, aka the "where are we going" of it all. this is the field that does the moving πŸš—πŸ’¨

🌈 METHODS 🌈

  • SoTranslation() β€” creates a translation node with default settings. brand new, fresh out the box, defaults set, ready to slay πŸŽ€
  • static SoType getClassTypeId() β€” returns the type identifier for this class. it's her ID card, her little "yes I am who I say I am" moment πŸ‘‘

πŸ”₯ ACTION BEHAVIOR πŸ”₯

this is where it gets juicy, pay attention:

  • SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoRayPickAction β€” all four of these accumulate the translation into the current transformation. she stacks, she builds, she adds to the vibe πŸ“ˆ
  • SoGetMatrixAction β€” returns the matrix corresponding to the translation. matrix delivery service, at your service πŸ’…

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

here's what she looks like written out:

Translation {
    translation  0 0 0
}

default is 0 0 0 β€” no movement, no drama, just vibes πŸ’–


⭐ SEE ALSO ⭐

  • SoTransform

go read her too, she's the whole transformation package iykyk 🌟


and that's the page!! from the SoTranslation(3IV)() manual, version SoTranslation(3IV)() β€” which is literally the same string, the source/version and the date all wrapped into one cute little footer moment, no notes. go forth and translate, bestie πŸ’…βœ¨πŸŽ€