SoPickedPointList(3)

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

πŸ’… SoPickedPointList β€” like, the whole manual, bestie

okay so this is the SoPickedPointList(3) page from the Library Functions Manual, and it is genuinely one of those little classes that's doing the absolute most behind the scenes. sit down, hydrate, let's go πŸ“


✨ NAME ✨

SoPickedPointList β€” it's a container. for pointers. to SoPickedPoint objects. that's the whole vibe. it holds the pointers, and it is very serious about what happens to the actual objects. πŸ‘‘


🌸 SYNOPSIS 🌸

#include <Inventor/lists/SoPickedPointList.h>

Inherits SbPList.

πŸŽ€ Public Member Functions πŸŽ€

SoPickedPointList (void)
SoPickedPointList (const int sizehint)
SoPickedPointList (const SoPickedPointList &l)
void append (SoPickedPoint *pp)
void insert (SoPickedPoint *pp, const int insertbefore)
SoPickedPoint * operator[] (const int idx) const
void truncate (const int start, const int fit=0)
void set (const int idx, SoPickedPoint *pp)

πŸ’œ Public Member Functions inherited from SbPList

like, it got all of this from its parent, no notes, iconic behavior:

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 πŸ’–

okay so listen. SoPickedPointList is a container for pointers to SoPickedPoint objects. that's the name, that's the job, periodt.

but here's the part where you have to pay attention, bestie, because this list is not just vibing and holding your pointers. This list class will delete the picked points when destructed/truncated, or when a picked point in the list is replaced by another picked point.

read that again. slowly. 🫢

so the whole ownership situation is:

The caller is responsible for allocating the picked points passed to the list, but should not deallocate them since this will be handled by the list.

you birth them, the list raises them, and the list also handles the, um, end-of-life arrangements. do not double-dip on the deletion. that's a one-way ticket to chaos. πŸ’€

See also

  • SbPList

🌈 Constructor & Destructor Documentation 🌈

✨ SoPickedPointList::SoPickedPointList (void ) [inline]

Default constructor. the plain one. the no-thoughts-just-vibes one.

✨ SoPickedPointList::SoPickedPointList (const int sizehint) [inline]

This constructor initializes the internal allocated size for the list to sizehint. Note that the list will still initially contain zero items. so like… it's got the space, but it does not have the content. it's giving empty-but-prepared. main character energy honestly. ✨

See also

  • SbList::SbList(const int sizehint)

✨ SoPickedPointList::SoPickedPointList (const SoPickedPointList & l)

Copy constructor. Will copy picked points, not just pointers.

yes bestie this is the real deal β€” it's not just duplicating the little arrow-shaped pointers, it's actually copying the picked points themselves. deep copy behavior, we love to see it. πŸ’–

See also

  • SbList::SbList(const SbList<Type> & l)

🧚 Member Function Documentation 🧚

⭐ SoPickedPoint * SoPickedPointList::operator[] (const int idx) const [inline]

Returns element at idx.

Will automatically expand the size of the internal array if idx is outside the current bounds of the list. The values of any additional pointers are then set to NULL.

so yeah, it's not gonna yell at you for reaching past the end, it just… grows. and everything new in there is NULL. no cap. 🌱

⭐ void SoPickedPointList::truncate (const int start, const int fit = 0)

Overridden to delete truncated items. πŸ—‘οΈβœ¨

like β€” it's not just dropping them off the list, it is deleting them. remember the ownership thing up top? yeah. this is that.

⭐ void SoPickedPointList::set (const int idx, SoPickedPoint * pp)

Overridden to destruct the replaced item. πŸ’…

you put a new picked point where an old one was, the old one gets destructed. no loose ends, no leaks, no drama. the list is a clean girl.


πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for Coin from the source code. so nobody hand-wrote this, it just manifested, which honestly? slay.


and that's the whole page bestie!! this was SoPickedPointList(3) from the Library Functions Manual, brought to you by Coin β€” Version 3.1.3 β€” so yeah, that's the source and the version, take care of each other, don't double-free, and I'll see you in the next man page πŸ’œβœ¨πŸ¦‹

πŸ“¦ where this page comes from