SOTEXTURECOORDINATE2(3iv)

πŸ’– SoTextureCoordinate2(3IV) β€” the 2D texture coordinate node πŸ’–

okay bestie, welcome to SoTextureCoordinate2(3IV), the manual page that's about to make texture mapping make sense. this is the Open Inventor node that handles your 2D texture coordinates, and yes she's giving main character energy. let's get into it πŸ¦‹


✨ NAME ✨

SoTextureCoordinate2 β€” 2D texture coordinate node πŸŽ€


🌸 INHERITS FROM 🌸

SoBase > SoFieldContainer > SoNode > SoTextureCoordinate2

so yeah she's deep in the family tree, four generations of iconic ancestry, no cap πŸ’…


✨ SYNOPSIS ✨

#include <Inventor/nodes/SoTextureCoordinate2.h>

          Fields from class SoTextureCoordinate2:

     SoMFVec2f           point

          Methods from class SoTextureCoordinate2:

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

look at all those inherited methods, she's literally carrying the whole family on her back and doing it flawlessly 🫢


🌈 DESCRIPTION 🌈

okay so here's the tea β˜• β€” this node defines a whole set of 2D coordinates that get used to map textures onto the vertex-based shapes that come after it (you know, the ones derived from SoVertexShape). she literally replaces the current texture coordinates in the rendering state so the shapes downstream can use them. it's giving "i'm the blueprint, follow me" energy πŸ‘‘

the current texture coordinate binding (peep SoTextureCoordinateBinding, linked below bestie) decides how those texture coordinates get mapped onto the vertices of your shapes. and if you're like "ugh, typing out explicit coordinates is so much work" β€” there's a whole alternative where you generate them with a function instead. go look at SoTextureCoordinateFunction πŸ’…

texture coordinates range from 0 to 1 across the texture. the horizontal coordinate is called S, and you specify it first. then comes the vertical coordinate, T. S then T. that's the order. don't flip them, i'm begging 😭


✨ FIELDS ✨

  • SoMFVec2f point β€” texture coordinate points πŸŽ€

(yes that's the whole field list. she's a one-field wonder and honestly? iconic. minimalism ate πŸ’…)


πŸ¦‹ METHODS πŸ¦‹

  • SoTextureCoordinate2() β€” creates a texture coordinate node with default settings. brand new baby node, defaults on defaults, fresh out the box ✨
  • static SoType getClassTypeId() β€” returns the type identifier for this class. it's her ID card, her little "yes i belong here" badge πŸ‘‘

πŸ”₯ ACTION BEHAVIOR πŸ”₯

  • SoGLRenderAction, SoCallbackAction β€” sets the current texture coordinates in the state 🌸

πŸ’œ FILE FORMAT/DEFAULTS πŸ’œ

TextureCoordinate2 {
    point  [  ]
}

note the empty point list, bestie β€” she starts with nothing and you fill her in. it's a vibe 🌈


⭐ SEE ALSO ⭐

SoTexture2, SoTextureCoordinateBinding, SoTextureCoordinateFunction, SoVertexShape

go read those too, they're all connected, it's a whole friend group fr fr 🫢


okay that's the whole page! πŸŽ€ this was SoTextureCoordinate2(3IV)() β€” that's the source/version-and-date line at the bottom, and yeah i folded it into this little sign-off instead of copy-pasting it, you're welcome πŸ’– now go map some textures, you've got this, slay βœ¨πŸ‘‘