SoTextDetail(3)
π SoTextDetail(3) π
ok so this is a page from the Library Functions Manual bestie, and it's literally all about SoTextDetail β the little note-taker that remembers stuff about a single character in a string. yes. one character. main character energy fr fr. π
β¨ NAME β¨
SoTextDetail β the class that stores info about a character in a string. that's it, that's the whole vibe. π
πΈ SYNOPSIS πΈ
#include <Inventor/details/SoTextDetail.h>
Inherits SoDetail. yes she's a subclass, she has a whole family tree, we love generational wealth. π
π Public Member Functions
virtual SoType getTypeId(void) constSoTextDetail(void)virtual ~SoTextDetail()virtual SoDetail * copy(void) constint getStringIndex(void) constint getCharacterIndex(void) constint getPart(void) constvoid setStringIndex(const int idx)void setCharacterIndex(const int idx)void setPart(const int idx)
π Public Member Functions inherited from SoDetail
virtual ~SoDetail()SbBool isOfType(const SoType type) const
β Static Public Member Functions
static SoType getClassTypeId(void)static void initClass(void)
π¦ Static Public Member Functions inherited from SoDetail
static void initClass(void)static void initClasses(void)static SoType getClassTypeId(void)
π Additional Inherited Members
- Protected Member Functions inherited from
SoDetailSoDetail(void)
π DESCRIPTION π
SoTextDetail stores information about a character in a string. (yes we said that already. it's iconic, it bears repeating. β¨)
Instances of this class are what you use to stash info about hit points on textual 2D or 3D geometry β that's after pick operations β and also for stashing info that gets handed back to tessellation callbacks. so like, two jobs, and she does both flawlessly, no cap. π
π See also
SoRayPickAction,SoCallbackActionSoText3,SoText2,SoAsciiText
π Constructor & Destructor Documentation π
π SoTextDetail::SoTextDetail(void)
The constructor sets up an "empty" detail β and by empty we mean all indices are set to -1 to indicate that. it's giving blank canvas, it's giving unbothered, it's giving -1. π
Referenced by copy(), and getTypeId().
π SoTextDetail::~SoTextDetail() [virtual]
Destructor. This class does not allocate any extra resources, so no actions are taken. she leaves the party exactly as clean as she found it. periodt. π
π₯ Member Function Documentation π₯
β SoType SoTextDetail::getTypeId(void) const [virtual]
Returns the type identification of a detail derived from a class inheriting SoDetail. This is used for run-time type checking and "downward" casting. iykyk. β¨
Usage example:
void fuhbear(SoDetail * detail)
{
if (detail->getTypeId() == SoFaceDetail::getClassTypeId()) {
// safe downward cast, know the type
SoFaceDetail * facedetail = (SoFaceDetail *)detail;
}
return; // ignore if not a SoFaceDetail
}
For application programmers wanting to extend the library with new detail classes: this method needs to be overridden in all subclasses. This is typically done as part of setting up the full type system for extension classes, which is usually accomplished by using the pre-defined macros available through Inventor/nodes/SoSubDetail.h: SO_DETAIL_SOURCE and SO_DETAIL_INIT_CLASS.
Implements SoDetail.
References SoTextDetail().
β SoDetail * SoTextDetail::copy(void) const [virtual]
Return a deep copy of ourself. clone her, she's that good. π§
β οΈ Note that if the Coin library has been built as a DLL under Microsoft Windows and you use this method from application code, you must make sure that both the Coin DLL and the application executable is using the same instance of a C Run-Time (CRT) library. Otherwise, you will get memory heap corruption upon deallocating the returned instances, eventually leading to mysterious crashes. π like genuinely mysterious. be careful bestie.
Implements SoDetail.
References copy(), and SoTextDetail().
Referenced by copy().
β int SoTextDetail::getStringIndex(void) const
Returns the index of the string where a character was hit / generated, from a set of multiple strings. (multiple strings!! she's keeping track of which one!! multitasking queen π)
π See also
SoMFString
β int SoTextDetail::getCharacterIndex(void) const
Returns the index of the character in the string which was hit. the one. the chosen one. πΈ
π See also
getStringIndex()
β int SoTextDetail::getPart(void) const
For SoText3, returns the part id of the text geometry. The id numbers matches those specified in the SoText3::Part enumeration. matching fit, we love a coordinated moment. π
β void SoTextDetail::setStringIndex(const int idx)
Internal method for "client" shape nodes to initialize this SoTextDetail instance. (internal!! so this is a backstage pass, not a front-door thing, got it? ποΈ)
Referenced by SoAsciiText::generatePrimitives(), SoVRMLText::generatePrimitives(), and SoText2::rayPick().
β void SoTextDetail::setCharacterIndex(const int idx)
Internal method for "client" shape nodes to initialize this SoTextDetail instance. same backstage situation, different index. π
Referenced by SoAsciiText::generatePrimitives(), SoVRMLText::generatePrimitives(), and SoText2::rayPick().
β void SoTextDetail::setPart(const int partarg)
Internal method for "client" shape nodes to initialize this SoTextDetail instance. third backstage pass, and note the arg is named partarg here, not idx β we keep it exactly as it is, no renaming in this house. π
Referenced by SoAsciiText::generatePrimitives(), and SoVRMLText::generatePrimitives().
π Author π
Generated automatically by Doxygen for Coin from the source code. (not a human author, a robot wrote this, and honestly? slay, robot. π€β¨)
ok that's the whole page bestie, you ate it, you understood it, you're basically a Coin developer now π
this has been Coin, Version 2.5.0, page SoTextDetail(3) β take care of her, she's delicate and she's doing her best π«ΆπΈ
π¦ where this page comes from
- fedora 43: Coin2-devel 2.5.0-52.fc43 Β· GPL-2.0-only
- fedora 43: Coin2-devel 2.5.0-52.fc43 Β· GPL-2.0-only
- fedora 44: Coin2-devel 2.5.0-54.fc44 Β· GPL-2.0-only
- fedora 44: Coin2-devel 2.5.0-54.fc44 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms