SoDetail(3)

πŸ“¦ version 2.5.0, in fedora 43, fedora 44

πŸ’– SoDetail πŸ’–

okay bestie, sit down, hydrate, because we're talking about SoDetail β€” that's the class from section 3 of the library functions manual, the one you call when you need the ✨tea✨ on a shape. She's the superclass for literally every class that stores detailed information about particular shapes. the mother of all detail classes. the blueprint. the moment. πŸŽ€


🌸 NAME 🌸

SoDetail β€” The SoDetail class is the superclass for all classes storing detailed information about particular shapes.


✨ SYNOPSIS ✨

#include <Inventor/details/SoDetail.h>

Inherited by SoConeDetail, SoCubeDetail, SoCylinderDetail, SoFaceDetail, SoLineDetail, SoNodeKitDetail, SoPointDetail, and SoTextDetail.

like. that's a whole squad. πŸ’…

🫢 Public Member Functions

  • virtual ~SoDetail ()
  • virtual SoDetail * copy (void) const =0
  • virtual SoType getTypeId (void) const =0
  • SbBool isOfType (const SoType type) const

⭐ Static Public Member Functions

  • static void initClass (void)
  • static void initClasses (void)
  • static SoType getClassTypeId (void)

πŸ¦‹ Protected Member Functions

  • SoDetail (void)

πŸ’œ Detailed Description πŸ’œ

The SoDetail class is the superclass for all classes storing detailed information about particular shapes.

Detail information about shapes is used in relation to picking actions in Coin. fr fr that's the whole point. They typically contain the relevant information about what particular part of the shape a pick ray intersected with. so when your cursor goes πŸ‘‰ and hits a shape, the detail class is the one who tells you exactly which lil piece of it got hit. iconic behavior, no cap.


πŸŽ€ Constructor & Destructor Documentation πŸŽ€

SoDetail::~SoDetail () [virtual]

Destructor. she's done, she's logging off, bye bestie πŸ’–

SoDetail::SoDetail (void ) [protected]

Default constructor.

Referenced by copy(), and getTypeId().


🌈 Member Function Documentation 🌈

void SoDetail::initClass (void ) [static]

Initialize relevant common data for all instances, like the type system. the groundwork. the pregame. ✨

References SoType::badType(), SoType::createType(), and initClasses().

Referenced by SoDB::init(), and initClasses().

void SoDetail::initClasses (void ) [static]

Call the initClass() methods of all built-in detail classes. it's giving group project where everyone actually shows up.

(The initClass() method of user extension detail classes β€” if any β€” must be called explicitly by the application programmer in the application initialization code.) yeah you gotta do that one yourself, no auto-pilot for the custom ones πŸ™ˆ

References initClass().

Referenced by initClass().

virtual SoDetail * SoDetail::copy (void ) const [pure virtual]

Return a deep copy of ourself. deep copy. not a situationship copy. an actual copy. πŸ’…

⚠️ 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. bestie this is the part where you actually listen πŸ˜­πŸ’€

Implemented in SoConeDetail, SoCubeDetail, SoCylinderDetail, SoFaceDetail, SoLineDetail, SoNodeKitDetail, SoPointDetail, and SoTextDetail.

References SoDetail().

Referenced by SoShape::createPointDetail(), SoAsciiText::createTriangleDetail(), and SoText3::createTriangleDetail().

virtual SoType SoDetail::getTypeId (void ) const [pure 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 β€” this is how you find out what you're actually dealing with before you go casting things around. 🧚

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. those two macros are your besties, don't forget them. 🌟

Implemented in SoConeDetail, SoCubeDetail, SoCylinderDetail, SoFaceDetail, SoLineDetail, SoNodeKitDetail, SoPointDetail, and SoTextDetail.

References getClassTypeId(), isOfType(), and SoDetail().

Referenced by isOfType().

SbBool SoDetail::isOfType (const SoType type) const

Returns TRUE if type is derived from (or is) this class. basically "are you part of the family or not" check. πŸ‘‘

References getTypeId(), and SoType::isDerivedFrom().

Referenced by getTypeId().

SoType SoDetail::getClassTypeId (void ) [static]

Returns the type for this class.

Referenced by getTypeId().


πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for Coin from the source code.


and that's the whole page, bestie!! this lil masterpiece is from Coin, Version 2.5.0, and you found it chilling in the SoDetail(3) section of the library functions manual. mwah πŸ’‹ go forth and pick shapes responsibly πŸ¦‹βœ¨

πŸ“¦ where this page comes from