SoCubeDetail(3)
β¨ 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 checkSoCubeDetail (void)β the constructor, hi hellovirtual ~SoCubeDetail ()β the destructor, bye bestievirtual SoDetail * copy (void) constβ deep copy momentvoid setPart (const int part)β set which part got pickedint 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
SoCubeSoRayPickActionSoCallbackAction
π 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
- 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