SoPathList(3)
πΈ 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) constSoPathList & operator= (const SoPathList &pl)int findPath (const SoPath &path) constvoid 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) constvoid 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) constvoid insert (void *item, const int insertbefore)void removeItem (void *item)void remove (const int index)void removeFast (const int index)int getLength (void) constvoid truncate (const int length, const int fit=0)void ** getArrayPtr (const int start=0) constvoid *& operator[] (const int index) constint operator== (const SbPList &l) constint operator!= (const SbPList &l) constvoid * get (const int index) constvoid 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
- fedora 43: Coin3-devel 3.1.3-40.fc43 Β· GPL-2.0-only
- fedora 43: Coin3-devel 3.1.3-40.fc43 Β· GPL-2.0-only
- fedora 44: Coin3-devel 3.1.3-42.fc44 Β· GPL-2.0-only
- fedora 44: Coin3-devel 3.1.3-42.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