SOTEXTDETAIL(3iv)

πŸ’– SoTextDetail β€” the 3IV manual, but make it make sense πŸ’–

okay bestie, gather round, because today we're talking about SoTextDetail from the SoTextDetail(3IV) manual page. she's a lil class that stores detail information about a text node. that's the whole vibe. ✨


🌸 INHERITS FROM 🌸

SoDetail > SoTextDetail

so she's a SoDetail girlie with her own main character upgrade. the family tree is giving lineage. πŸ‘‘


✨ SYNOPSIS ✨

#include <Inventor/details/SoTextDetail.h>

Methods from class SoTextDetail:

                     SoTextDetail()
virtual             ~SoTextDetail()
int32_t             getStringIndex() const
int32_t             getCharacterIndex() const
SoText3::Part       getPart() const
SbBox3f             getBoundingBox() const
SbXfBox3f           getXfBoundingBox() const
static SoType       getClassTypeId()

Methods from class SoDetail:

SoDetail *          copy() const
virtual SoType      getTypeId() const
SbBool              isOfType(SoType type) const

look at her. seven methods of her own plus the inherited ones. she's booked and busy fr fr. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

This class contains detail information about a point on a text shape (SoText2 or SoText3). It contains the part of the text, the string, and the character that were hit or generated.

so like… when you click on some text and the library is like "bestie it was this exact letter," that's this class. she's the receipts. 🧾✨


πŸŽ€ METHODS πŸŽ€

  • SoTextDetail()
  • virtual ~SoTextDetail()

Constructor and destructor. the birth and the departure. iconic behavior honestly. πŸΌπŸ’€

  • int32_t getStringIndex() const

Returns the index of the relevant string within a multiple-value string field of a text node.

so if your text node is out here holding several strings at once, this tells you which one was the one. index energy. πŸ”’

  • int32_t getCharacterIndex() const

Returns the index of the relevant character within the string. For example, if the character of detail was the "u" within "Splurmph", the character index would be 3.

ok let's count together bestie: S=0, p=1, l=2, u=3. yes we're zero-indexed, yes we're counting from the start, no we're not arguing about it. πŸ“

  • SoText3::Part getPart() const

For SoText3, this returns which part was picked or generated.

she's specific. she knows exactly which piece of the text you're talking about. no guessing, no vague energy. πŸ’…

  • SbBox3f getBoundingBox() const
  • SbXfBox3f getXfBoundingBox() const

When the detail is returned from picking, these return the object-space bounding box of the character that was intersected. Otherwise, they return an empty box. The second method returns an SbXfBox3f instead of a SbBox3f. These methods are implemented only for 3D text.

🚨 lowkey important: if you're not in a picking situation, you get an empty box. and these two are 3D text only, so don't come looking for them in 2D land. ngl that's just how it is. πŸ™ˆ
  • static SoType getClassTypeId()

Returns type identifier for this class. the class's lil ID card. show it at the door. πŸͺͺ✨


🌈 SEE ALSO 🌈

SoText2, SoText3, SoDetail, SoPickedPoint, SoPrimitiveVertex

the whole friend group. go say hi. 🫢


and that's the tea, bestie 🍡 β€” this was the SoTextDetail(3IV) page, footer and all: SoTextDetail(3IV)(). no date, no version drama, just the page name holding it down at the bottom like always. go pick some text. slay. πŸ’–πŸŒΈβœ¨