SOPATHLIST(3iv)

✨ SoPathList β€” the 3IV manual page, but make it make sense πŸ’–

okay bestie, so this is the manual page for SoPathList, and yes the manual name is literally 3IV β€” that's the section, don't think about it too hard 🫢


🌸 NAME 🌸

SoPathList β€” maintains a list of pointers to paths

like... it's a list. full of pointers. pointing at paths. the name ate, honestly. πŸ’…


πŸ¦‹ INHERITS FROM πŸ¦‹

SbPList > SoBaseList > SoPathList

the family tree goes: SbPList is the grandparent, SoBaseList is the parent, and SoPathList is the main character. πŸ‘‘


✨ SYNOPSIS ✨

#include <Inventor/SoLists.h>

Methods from class SoPathList:

                     SoPathList()
                     SoPathList(int size)
                     SoPathList(const SoPathList &l)
                     ~SoPathList()
 void                append(SoPath *path)
 SoPath *            operator [](int i) const
 SoPathList &        operator =(const SoPathList &l)
 int                 findPath(const SoPath &path)
 void                sort()
 void                uniquify()

Methods from class SoBaseList:

 void                insert(SoBase *ptr, int addBefore)
 void                remove(int which)
 void                truncate(int start)
 void                copy(const SoBaseList &l)
 void                set(int i, SoBase *ptr)
 void                addReferences(SbBool flag)

Methods from class SbPList:

 int                 find(const void *ptr) const
 int                 getLength() const
 int                 operator ==(const SbPList &pl) const
 int                 operator !=(const SbPList &pl) const

ngl that's a LOT of inherited rizz and you get all of it for free. no cap. πŸ”₯


πŸ’– DESCRIPTION πŸ’–

so basically: this subclass of SoBaseList holds lists of pointers to SoPaths. and here's the part that's actually lowkey iconic β€” it updates reference counts to the paths in the list whenever you add or remove pointers. it's keeping receipts, respectfully. 🧚


πŸŽ€ METHODS πŸŽ€

SoPathList()

Constructor. the origin story. ✨

SoPathList(int size)

Constructor that pre-allocates storage for size pointers. it's giving prepared. it's giving organized. 🌈

SoPathList(const SoPathList &l)

Constructor that copies the contents of another list. twin behavior. 🫢

~SoPathList()

Destructor. it's the goodbye arc, we don't talk about it 😭

  • void append(SoPath *path) β€” Adds a path to the end of the list. queue up, bestie, end of the line. πŸŽ€
  • SoPath *operator [](int i) const β€” Accesses an element of a list. pick your fave by index. πŸ’…
  • SoPathList &operator =(const SoPathList &l) β€” Copies a list, keeping all reference counts correct. the glow-up is that the counts stay valid, periodt. ✨
  • int findPath(const SoPath &path) β€” Returns the index of the matching path in the list, or -1 if not found. if it's not there, it's a -1, and that's the whole vibe check. πŸ™ˆ
  • void sort() β€” Sorts list in place based on (1) increasing address of head node, then (2) increasing indices of children. two-step sort, main character energy. πŸ”₯
  • void uniquify() β€” Given a sorted list, removes any path that (1) is a duplicate, or (2) goes through a node that is the tail of another path.
⚠️ heads up bestie: uniquify() says "given a sorted list" for a reason. sort first, then uniquify. do not skip the first step, i'm literally begging. 😭

🌟 SEE ALSO 🌟

SoPath


and that's the whole page, bestie πŸ’œ the footer of this thing just says SoPathList(3IV)() β€” no date, no version, nothing, it's giving mysterious and honestly kind of iconic. so there's your sign-off: SoPathList(3IV)(), and that's on periodt. πŸŽ€βœ¨πŸ’