SoCubeDetail(3)

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

✨ NAME ✨

SoCubeDetail β€” bestie, this class is literally the lil info packet that knows everything about the parts of a SoCube shape πŸ’– it's page SoCubeDetail(3) from the Library Functions Manual, and we're gonna get into it.


πŸ¦‹ SYNOPSIS πŸ¦‹

okay so first things first, you gotta pull it in:

#include <Inventor/details/SoCubeDetail.h>

Inherits SoDetail. yep, it's a detail class, it's giving nepo baby but in a slay way πŸ‘‘

πŸ’… Public Member Functions

  • virtual SoType getTypeId (void) const β€” the whole type-id vibe check
  • SoCubeDetail (void) β€” the constructor, hi hello
  • virtual ~SoCubeDetail () β€” the destructor, bye bestie
  • virtual SoDetail * copy (void) const β€” deep copy moment
  • void setPart (const int part) β€” set which part got picked
  • int getPart (void) const β€” get which part got picked

🌸 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)

πŸŽ€ Protected Attributes

  • int part

🌈 Additional Inherited Members

Protected Member Functions inherited from SoDetail

  • SoDetail (void)

πŸ“– Detailed Description πŸ“–

The SoCubeDetail class contains information about the parts of a SoCube shape. that's the whole assignment, periodt πŸ’…

So like, instances of this class get used to store info about hit points on cone geometry after pick operations 🎯 and also for storing the info that gets returned to tessellation callbacks. no cap.

The part indices are ordered from 0 to 5, and they go like this, in this exact order:

[ front, back, left, right, top, bottom ]

memorize it bestie, the vibes depend on the order 🧠✨

See also

  • SoCube
  • SoRayPickAction
  • SoCallbackAction

πŸ›  Constructor & Destructor Documentation πŸ› 

πŸ’– SoCubeDetail::SoCubeDetail (void )

Constructor 🌸 she's born.

References part.

Referenced by copy(), and getTypeId().

πŸ’€ SoCubeDetail::~SoCubeDetail () [virtual]

Destructor πŸ₯€ she's gone, we hardly knew her.


πŸ”₯ Member Function Documentation πŸ”₯

🌟 SoType SoCubeDetail::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, here it is verbatim bestie, don't touch a character:

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 SoCubeDetail().

🌟 SoDetail * SoCubeDetail::copy (void ) const [virtual]

Return a deep copy of ourself πŸͺž like a clone but make it legal.

⚠️ 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 πŸ’€ fr fr do not skip this one.

Implements SoDetail.

References copy(), part, and SoCubeDetail().

Referenced by copy().

🌟 void SoCubeDetail::setPart (const int partarg)

Set the part of a cube which was selected. A cube has of course six different conceptual parts β€” it's sides. that's right, six, count 'em 🎲

References part.

🌟 int SoCubeDetail::getPart (void ) const

Returns selected cube part 🧊 that's it, that's the function.

References part.


πŸ’Ύ Member Data Documentation πŸ’Ύ

πŸ”’ int SoCubeDetail::part [protected]

This API member is considered internal to the library, as it is not likely to be of interest to the application programmer. so like, mind your business bestie πŸ™ˆ (but also, now you know it exists).

Referenced by copy(), getPart(), setPart(), and SoCubeDetail().


πŸ’œ Author πŸ’œ

Generated automatically by Doxygen for Coin from the source code. the robot wrote it, we just made it cute πŸ€–βœ¨


and that's the whole page, bestie 🫢 this was Coin, Version 2.5.0, SoCubeDetail(3), slay, go pick some cube parts πŸ’…πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from