SOTEXTURE2TRANSFORM(3iv)

πŸ’– SoTexture2Transform β€” 2D texture transformation node ✨

Okay bestie, pull up a chair 🫢 because this is the SoTexture2Transform node from the Open Inventor crew β€” this one lives in the 3IV manual and it's lowkey the glow-up artist for your textures. No cap. πŸ’…


🌈 INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoTexture2Transform

So she's down at the bottom of the family tree, but she carries main character energy the whole way. πŸ‘‘


✨ SYNOPSIS

#include <Inventor/nodes/SoTexture2Transform.h>

     Fields from class SoTexture2Transform:

SoSFVec2f           translation
SoSFFloat           rotation
SoSFVec2f           scaleFactor
SoSFVec2f           center

     Methods from class SoTexture2Transform:

                    SoTexture2Transform()
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 picture this: this node defines a 2D transformation that gets applied to your texture coordinates. πŸ¦‹ It changes the way textures land on the surfaces of every shape that comes after it β€” so it's giving "I set the vibe for everyone downstream," fr fr.

The transformation is made of three things, in this order:

  1. a non-uniform scale about an arbitrary center point
  2. a rotation about that same point
  3. a translation
⚠️ Bestie, listen β€” while the transformations can be thought of as being applied in that order, the GL matrices are actually premultiplied in the opposite order. That's why the operations are listed in the reverse order throughout this reference page. Don't let it jump you. πŸ’€

The whole point of all this? It lets a user change the size and position of the textures on objects. Slay. πŸ’…


πŸŽ€ FIELDS

  • SoSFVec2f translation β€” Translation in S and T. Where the texture's at, basically. πŸ“
  • SoSFFloat rotation β€” Counter-clockwise rotation of the coordinate space, in radians. Heads up though: this results in a clockwise rotation of the texture on the object. So the coordinate space spins one way and your texture spins the other β€” it's giving opposite day. πŸ™ˆ
  • SoSFVec2f scaleFactor β€” Scaling factors in S and T. Bigger, smaller, whatever, she contains multitudes. ✨
  • SoSFVec2f center β€” Center point used for scaling and rotation. The literal center of the whole situation. 🎯

πŸ¦‹ METHODS

  • SoTexture2Transform() β€” Creates a texture transformation node with default settings. Brand new, fresh out the box, defaults intact. 🎁
  • static SoType getClassTypeId() β€” Returns type identifier for this class. It's the "who am I" of the class, and she knows exactly who she is. πŸ‘‘

πŸ”₯ ACTION BEHAVIOR

  • SoGLRenderAction, SoCallbackAction β€” Concatenates transformation with the current texture transformation. She just stacks onto whatever's already there β€” teamwork makes the dream work, periodt. 🫢

🌸 FILE FORMAT/DEFAULTS

Texture2Transform {
    translation  0 0
    rotation     0
    scaleFactor  1 1
    center       0 0
}

Look at those defaults being all chill and neutral. So demure. So mindful. 🧚


⭐ SEE ALSO

  • SoTexture2
  • SoTextureCoordinate2
  • SoTextureCoordinateFunction

Go read those next, iykyk. πŸ“šπŸ’–


Bye bestie!! πŸŽ€ This was the SoTexture2Transform page from the 3IV manual β€” no version stamp or date came with it, so we're just vibing with the name and the manual number. Take care of your texture coordinates out there. πŸ¦‹βœ¨πŸ’