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_PARTorPER_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 forRIGHT, and at the lower center forCENTERπ - the texture is scaled equally in both S and T dimensions, with the font height representing 1 unit
Sincreases 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
Sis equal to 0 at the rear edge of the side faces- the
Torigin can occur anywhere along each character, depending on how that character's outline is defined. so like, it depends. iykyk π€·ββοΈ
π FIELDS π
SoMFStringstringβ the text string(s) to display π¬ each string will appear on its own line. the string(s) can be ascii or UTF-8 β¨SoSFFloatspacingβ 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 of1means single spacing,2means double spacing, and so on. it's giving very predictable, very demure πSoSFBitMaskpartsβ which parts of text are visible π and heads up bestie: for speed, the default for this field isFRONTonly. so if your sides are missing, that's not a bug, that's the default πSoSFEnumjustificationβ indicates placement and alignment of strings. withLEFTjustification, the left edge of the first line is at the (transformed) origin, and all left edges are aligned.RIGHTjustification is similar.CENTERjustification 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 πβ¨
π¦ where this page comes from
- debian bookworm: inventor-doc 2.1.5-10+dfsg-2 Β· LGPL-2.0-or-later
- debian trixie: inventor-doc 2.1.6+ds-2 Β· LGPL-2.0-or-later
- ubuntu jammy: inventor-doc 2.1.5-10-24
- ubuntu noble: inventor-doc 2.1.5-10+dfsg-2.1build2 Β· LGPL-2.0-or-later
- ubuntu questing: inventor-doc 2.1.6+ds-2
- ubuntu resolute: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- ubuntu stonking: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms