SOTEXT3(3iv)

✨ NAME ✨

SoText3 β€” the 3D text shape node πŸŽ€ straight out of the 3IV manual, bestie. Yes, that manual. She's iconic, she's three-dimensional, let's go πŸ’…


🧬 INHERITS FROM 🧬

SoBase > SoFieldContainer > SoNode > SoShape > SoText3

so she's deep in the family tree, okay? SoShape is her mom, SoNode is her grandma, and she inherited everything 🫢


🌈 SYNOPSIS 🌈

#include <Inventor/nodes/SoText3.h>

πŸ’« Enums, bestie πŸ’«

enum Justification {
     SoText3::LEFT       Left edges of all strings are aligned
     SoText3::RIGHT      Right edges of all strings are aligned
     SoText3::CENTER     Centers of all strings are aligned
}

enum Part {
     SoText3::FRONT      Front faces of characters
     SoText3::SIDES      Extruded sides of characters
     SoText3::BACK       Back faces of characters
     SoText3::ALL        All parts
}

🌸 Fields from class SoText3 🌸

SoMFString          string
SoSFFloat           spacing
SoSFBitMask         parts
SoSFEnum            justification

πŸ¦‹ Methods from class SoText3 πŸ¦‹

                    SoText3()
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. this node defines one or more strings of 3D text. and here's the tea β€” unlike SoText2, 3D text can be rotated, scaled, lighted, and textured, just like literally every other 3D shape. she's not special-cased, she plays by the same rules, and she slays at it 😌

each character in a 3D text string gets made by extruding an outlined version of the character (in the current typeface) along the current profile, as defined by nodes derived from SoProfile. and if you don't specify a profile? the default text profile is a straight line segment one unit long. no cap, that's the default 🫑

the text origin sits at (0,0,0) after applying the current transformation. and the scale of the text is affected by the size field of the current SoFont as well as the current transformation. both. together. besties 🫢

SoText3 uses the current set of materials when rendering, and the vibe depends on your material binding:

  • if the material binding is OVERALL, the whole text is drawn with the first material
  • if it's PER_PART or PER_PART_INDEXED, the front part of the text is drawn with the first material, the sides with the second, and the back with the third

🧡 Textures on 3D text, the whole lore 🧡

Textures are applied to 3D text as follows, bestie, stay with me:

  • on the front and back faces, the texture origin is at the base point of the first string. that base point is at the lower left for justification LEFT, at the lower right for RIGHT, and at the lower center for CENTER πŸ’…
  • the texture is scaled equally in both S and T dimensions, with the font height representing 1 unit
  • S increases to the right on the front faces and to the left on the back faces πŸ™ƒ
  • on the sides, the texture is scaled the same as on the front and back
  • S is equal to 0 at the rear edge of the side faces
  • the T origin can occur anywhere along each character, depending on how that character's outline is defined. so like, it depends. iykyk πŸ€·β€β™€οΈ

🌟 FIELDS 🌟

  • SoMFString string β€” the text string(s) to display πŸ’¬ each string will appear on its own line. the string(s) can be ascii or UTF-8 ✨
  • SoSFFloat spacing β€” defines the distance (in the negative y direction) between the base points of successive strings, measured with respect to the current font height. a value of 1 means single spacing, 2 means double spacing, and so on. it's giving very predictable, very demure πŸ“
  • SoSFBitMask parts β€” which parts of text are visible πŸ‘€ and heads up bestie: for speed, the default for this field is FRONT only. so if your sides are missing, that's not a bug, that's the default πŸ™ˆ
  • SoSFEnum justification β€” indicates placement and alignment of strings. with LEFT justification, the left edge of the first line is at the (transformed) origin, and all left edges are aligned. RIGHT justification is similar. CENTER justification places the center of the first string at the (transformed) origin, with the centers of all remaining strings aligned under it 🎯

πŸ› οΈ METHODS πŸ› οΈ

  • SoText3() β€” creates a 3D text node with default settings. baby's first text node, we love her πŸ’–
  • static SoType getClassTypeId() β€” returns the type identifier for this class. it's her ID, her little badge πŸͺͺ

🎬 ACTION BEHAVIOR 🎬

πŸ–ŒοΈ SoGLRenderAction

Draws text based on the current font, profiles, transformation, drawing style, material, texture, complexity, and so on. literally the whole ensemble cast showed up for this one πŸ”₯

🎯 SoRayPickAction

Performs a pick on the text πŸ‘† the string index and character position are available from the SoTextDetail.

πŸ“¦ SoGetBoundingBoxAction

Computes the bounding box that encloses the text.

πŸ” SoCallbackAction

If any triangle callbacks are registered with the action, they will be invoked for each successive triangle used to approximate the text geometry. every single one. she does not skip a triangle, periodt πŸ’…


πŸ“ FILE FORMAT/DEFAULTS πŸ“

Text3 {
     string         ""
     spacing        1
     justification  LEFT
     parts          FRONT
}

look at her defaults. empty string, single spacing, LEFT justification, FRONT only. immaculate, consistent, exactly as written πŸ’–


πŸ‘€ SEE ALSO πŸ‘€

SoFont, SoProfile, SoText2, SoTextDetail


friendly reminder bestie: this whole page is page SoText3(3IV)() β€” that's the source/version stamp at the bottom of the original, and ngl there's no date on it, so don't come for me, i can only report what's there πŸ™ˆ

now go extrude some characters, you absolute icon πŸ‘‘βœ¨