SoPathList(3)

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

🌸 SoPathList β€” the manual page, but make it cute 🌸

okay bestie, so this is SoPathList(3), a lil' page from the Library Functions Manual (the Coin crew's Doxygen did the heavy lifting, we're just here to vibe πŸ’…). Sit down, grab a strawberry πŸ“, and let's get into it.


✨ NAME ✨

SoPathList β€” the class that's literally just a container for pointers to SoPath objects. That's it. That's the whole job. And it slays at it. πŸ‘‘


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <Inventor/lists/SoPathList.h>

Inherits SoBaseList. (Family tree matters here, iykyk β€” a lot of the behaviour is inherited, so keep reading.)

πŸ’– Public Member Functions πŸ’–

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

🌈 Public Member Functions inherited from SoBaseList 🌈

  • SoBaseList (void)
  • SoBaseList (const int size)
  • SoBaseList (const SoBaseList &l)
  • ~SoBaseList ()
  • void append (SoBase *ptr)
  • void insert (SoBase *ptr, const int addbefore)
  • void remove (const int index)
  • void removeItem (SoBase *item)
  • void truncate (const int length)
  • void copy (const SoBaseList &l)
  • SoBaseList & operator= (const SoBaseList &l)
  • SoBase * operator[] (const int i) const
  • void set (const int i, SoBase *const ptr)
  • void addReferences (const SbBool flag)
  • SbBool isReferencing (void) const

πŸŽ€ Public Member Functions inherited from SbPList πŸŽ€

  • SbPList (const int sizehint=DEFAULTSIZE)
  • SbPList (const SbPList &l)
  • ~SbPList ()
  • void copy (const SbPList &l)
  • SbPList & operator= (const SbPList &l)
  • void fit (void)
  • void append (void *item)
  • int find (void *item) const
  • void insert (void *item, const int insertbefore)
  • void removeItem (void *item)
  • void remove (const int index)
  • void removeFast (const int index)
  • int getLength (void) const
  • void truncate (const int length, const int fit=0)
  • void ** getArrayPtr (const int start=0) const
  • void *& operator[] (const int index) const
  • int operator== (const SbPList &l) const
  • int operator!= (const SbPList &l) const
  • void * get (const int index) const
  • void set (const int index, void *item)

πŸ’œ Additional Inherited Members πŸ’œ

Protected Member Functions inherited from SbPList

  • void expand (const int size)
  • int getArraySize (void) const

πŸ‘‘ Detailed Description πŸ‘‘

SoPathList is a container for pointers to SoPath objects. Iconic. No notes.

And because it inherits SoBaseList, the referencing and dereferencing is done by default on the objects whenever you call append(), remove(), insert() and friends. So like… it handles the reference-counting drama for you. That's the whole point. 🫢


πŸ’… Constructor & Destructor Documentation πŸ’…

SoPathList::SoPathList (void)

Default constructor. The classic. Does exactly what it says on the tin. ✨

SoPathList::SoPathList (const int size)

Constructor that takes a little hint about how many elements the list is gonna hold. It's giving "I already know what I'm about, thanks".

See also

  • SoBaseList::SoBaseList(const int)

SoPathList::SoPathList (const SoPathList & pl)

Copy constructor, bestie.

Heads up tho: this does a shallow copy of the SoPath pointer values β€” but it updates the reference count. So the pointers are the same pointers, but the refcount knows what's up. πŸ’―

See also

  • SoBaseList::SoBaseList(const SoBaseList &)

SoPathList::~SoPathList ()

Destructor. Cleanup time, we love a graceful exit. πŸ¦‹

See also

  • SoBaseList::~SoBaseList()

🌸 Member Function Documentation 🌸

void SoPathList::append (SoPath *const path)

Appends ptr to the list. Adding to the group chat, basically. πŸ’Œ

See also

  • SoBaseList::append()

SoPath * SoPathList::operator[] (const int i) const

Returns the node pointer sitting at index i. (Yes, the docs say "node pointer" β€” that's the words they used, so that's the words we're keeping. πŸ™ˆ)

See also

  • SoBaseList::operator[]()

SoPathList & SoPathList::operator= (const SoPathList & pl)

Shallow copy of the contents of list pl into this list. Same energy, new home. 🏑

See also

  • SoBaseList::operator=()

int SoPathList::findPath (const SoPath & path) const

Finds and returns the index of the first item that's equal to path. First match only, no cap. πŸ”

void SoPathList::sort (void)

Sorts the paths in the list according to how early they get run into when you're traversing the scene graph. So it's not alphabetical, bestie β€” it's scene-graph-order. Order matters here, fr fr. πŸ”₯

void SoPathList::uniquify (void)

Removes identical paths, plus any paths that go through the tail of another path. Duplicates? Gone. Redundant tails? Also gone. It's a whole glow-up for your list. ✨

Heads up: this method assumes the list is already in a sorted order. So call sort() first or it will not behave the way you think. Don't skip this step, I'm begging. 😭

See also

  • sort()

🧚 Author 🧚

Generated automatically by Doxygen for Coin from the source code. Not a human, not a group chat, just a robot doing its best. πŸ€–πŸ’–


and that's the whole page, bestie! πŸŽ€ this one came from Coin, Version 3.1.3, dated right there in the footer as SoPathList(3). go forth and slay your scene graph traversals. periodt. πŸ’…πŸŒˆβ­

πŸ“¦ where this page comes from