SoFaceDetail(3)

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

πŸ’– NAME πŸ’–

SoFaceDetail β€” the class whose whole entire job is storing detailed polygon info. That's the assignment, and it ate. ✨


🌸 SYNOPSIS 🌸

#include <Inventor/details/SoFaceDetail.h>

Inherits SoDetail. It's giving nepo baby but make it useful. πŸ’…

✨ Public Member Functions ✨

  • virtual SoType getTypeId (void) const
  • SoFaceDetail (void)
  • virtual ~SoFaceDetail ()
  • virtual SoDetail * copy (void) const
  • int getNumPoints (void) const
  • const SoPointDetail * getPoint (const int idx) const
  • SoPointDetail * getPoints (void)
  • int getFaceIndex (void) const
  • int getPartIndex (void) const
  • void setNumPoints (const int num)
  • void setPoint (const int idx, const SoPointDetail *const detail)
  • void setFaceIndex (const int idx)
  • void setPartIndex (const int idx)
  • void incFaceIndex (void)
  • void incPartIndex (void)

🫢 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 SoDetail
    • SoDetail (void)

πŸ“ Detailed Description πŸ“

So SoFaceDetail is the class that holds detailed polygon information. Fr fr, that's the whole plot. 😌

Instances of this class get used for, among other things, storing info about polygons after pick operations, and for storing info that gets returned to tessellation callbacks. Multi-purpose queen. πŸ‘‘

Worth clocking: a SoFaceDetail instance is made up of a set of SoPointDetail instances β€” one for each vertex of the polygon it represents. One point detail per vertex, no skipping, no cap. 🎯

See also

  • SoRayPickAction
  • SoPickedPoint
  • SoCallbackAction

πŸ’œ Constructor & Destructor Documentation πŸ’œ

SoFaceDetail::SoFaceDetail (void )

The default constructor sets up an empty, non-valid detail specification. Basically a blank canvas, no notes yet. 🫧

Referenced by copy(), and getTypeId().

SoFaceDetail::~SoFaceDetail () [virtual]

The destructor. It frees the internal resources that were being used to store the polygon vertices. Clean up after yourself, bestie. 🧹


πŸ”₯ Member Function Documentation πŸ”₯

SoType SoFaceDetail::getTypeId (void ) const [virtual]

Returns the type identification of a detail derived from a class inheriting SoDetail. This is what makes run-time type checking and "downward" casting happen. 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 the application programmers out there who wanna extend the library with new detail classes: this method needs to be overridden in all subclasses. That's 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. Do not skip this step, I am begging. 😭

Implements SoDetail.

References SoFaceDetail().

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

Returns a deep copy of ourself. Clone era. πŸ‘―

⚠️ Heads up, this one matters: 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. Mysterious crashes are NOT the vibe. πŸ’€

Implements SoDetail.

References copy(), getPoint(), and SoFaceDetail().

Referenced by copy().

int SoFaceDetail::getNumPoints (void ) const

The number of vertices making up the polygon. Count 'em. πŸ”’

const SoPointDetail * SoFaceDetail::getPoint (const int idx) const

Returns a pointer into the array of vertices, starting at the idx'th vertice of the polygon. ✨

The array will contain (SoFaceDetail::getNumPoints() - idx) elements.

Referenced by copy().

SoPointDetail * SoFaceDetail::getPoints (void )

Returns the full array of vertice details for the polygon. The array will contain SoFaceDetail::getNumPoints() elements. The whole roster, no cuts. πŸ“‹

int SoFaceDetail::getFaceIndex (void ) const

Returns the index of this polygon within the faceset node it's part of. Where it sits in the lineup. πŸͺ©

int SoFaceDetail::getPartIndex (void ) const

If this SoFaceDetail represents a triangle tessellated from a complex shape, this method returns the index of the part of the complex shape it was tessellated from. Detective work, honestly. πŸ•΅οΈ

void SoFaceDetail::setNumPoints (const int num)

Used internally from library client code setting up a SoFaceDetail instance. Internal business only, not your problem. 🀫

See also

  • getNumPoints()

void SoFaceDetail::setPoint (const int idx, const SoPointDetail *const detail)

Used internally from library client code setting up a SoFaceDetail instance.

See also

  • getPoint()
  • getPoints()

void SoFaceDetail::setFaceIndex (const int idx)

Used internally from library client code setting up a SoFaceDetail instance.

See also

  • getFaceIndex()

Referenced by SoIndexedTriangleStripSet::generatePrimitives(), SoQuadMesh::generatePrimitives(), and SoTriangleStripSet::generatePrimitives().

void SoFaceDetail::setPartIndex (const int idx)

Used internally from library client code setting up a SoFaceDetail instance.

See also

  • getPartIndex()

void SoFaceDetail::incFaceIndex (void )

Used internally from library client code setting up a SoFaceDetail instance.

This function is specific for Coin, and is not present in SGI/TGS Open Inventor. Coin-only, she's exclusive. πŸ’…

Referenced by SoFaceSet::generatePrimitives(), SoIndexedFaceSet::generatePrimitives(), SoIndexedTriangleStripSet::generatePrimitives(), SoQuadMesh::generatePrimitives(), SoTriangleStripSet::generatePrimitives(), SoVRMLElevationGrid::generatePrimitives(), and SoVRMLIndexedFaceSet::generatePrimitives().

void SoFaceDetail::incPartIndex (void )

Used internally from library client code setting up a SoFaceDetail instance.

This function is specific for Coin, and is not present in SGI/TGS Open Inventor. Same energy as her sister above. πŸ‘‘

Referenced by SoIndexedFaceSet::generatePrimitives(), SoIndexedTriangleStripSet::generatePrimitives(), SoQuadMesh::generatePrimitives(), and SoTriangleStripSet::generatePrimitives().


🌟 Author 🌟

Generated automatically by Doxygen for Coin from the source code. The robots wrote this one, not me. πŸ€–βœ¨


And that's the whole page, bestie! πŸŽ€ This was Coin, Version 2.5.0, manual page SoFaceDetail(3). Go forth and store those polygon details. Periodt. πŸ’–πŸ¦‹

πŸ“¦ where this page comes from