SOTEXTURECOORDINATEPLANE(3iv)

๐Ÿ’… SoTextureCoordinatePlane โ€” the manual, but make it cute

okay bestie, so this is SoTextureCoordinatePlane, from the 3IV manual fam. It's a node that specifies texture coordinates by projection from a plane. Yes. A plane. Like, geometry plane, not airplane, not plain. Stay with me ๐Ÿซถ


โœจ INHERITS FROM โœจ

This thing has a whole ancestry, and she's proud of it:

SoBase > SoFieldContainer > SoNode > SoTextureCoordinateFunction >
SoTextureCoordinatePlane

๐ŸŒธ SYNOPSIS ๐ŸŒธ

First things first, the include, literally:

#include <Inventor/nodes/SoTextureCoordinatePlane.h>

๐ŸŽ€ Fields from class SoTextureCoordinatePlane

SoSFVec3f           directionS
SoSFVec3f           directionT

๐ŸŽ€ Methods from class SoTextureCoordinatePlane

                     SoTextureCoordinatePlane()
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 ๐Ÿ’–

okay so here's the tea โ˜• โ€” this node makes texture coordinates for the points on an object's surface by projecting them onto a plane. That's the whole vibe. The directionS and directionT fields define that plane, bestie. Periodt.

  • The S coordinate gets computed as the distance from the object-space origin along the vector you put in the directionS field.
  • The T coordinate gets computed the same way, except using the directionT field.

And here's the part everyone forgets: the length of the direction vector counts too. Not just the direction, the whole magnitude. She's doing math with the full vector, no cap.

Like, say directionS is (0.5, 0, 0) and directionT is (0, 1, 0). Then this square, defined by these (x, y, z) vertices:

(-1, -1, 0) (1, -1, 0) (1, 1, 0) (-1, 1, 0)

will get assigned these (s, t) texture coordinates:

(-2, -1) (2, -1) (2, 1) (-2, 1)

look at that mapping go. ate. ๐Ÿ”ฅ


๐ŸŒˆ FIELDS ๐ŸŒˆ

  • SoSFVec3f directionS
  • SoSFVec3f directionT

those are the directions of projection for S and T coordinates. That's it, that's the field.


๐Ÿฆ‹ METHODS ๐Ÿฆ‹

  • SoTextureCoordinatePlane() โ€” creates a texture function node with default settings. a fresh baby node, defaults and all โœจ
  • static SoType getClassTypeId() โ€” returns the type identifier for this class. the little ID card she carries around ๐Ÿ’ณ

๐Ÿ‘‘ ACTION BEHAVIOR ๐Ÿ‘‘

SoGLRenderAction, SoCallbackAction, SoRayPickAction

Sets the current texture function in the state. that's the whole job, and she does it flawlessly ๐Ÿ’…

๐Ÿ“ FILE FORMAT/DEFAULTS ๐Ÿ“

TextureCoordinatePlane {
    directionS  1 0 0
    directionT  0 1 0
}

so if you just let her be, directionS is 1 0 0 and directionT is 0 1 0. iconic default behavior, no notes.


๐Ÿ”ฎ SEE ALSO ๐Ÿ”ฎ

the besties, the group chat, the whole squad:

  • SoTexture2
  • SoTexture2Transform
  • SoTextureCoordinateDefault
  • SoTextureCoordinateEnvironment

that's the whole page, babe. go project something onto a plane and slay ๐Ÿ’œ

kisses, SoTextureCoordinatePlane(3IV)() โ€” mwah ๐Ÿ’‹๐ŸŽ€