Open Inventor Release 2024.1.0
 
Loading...
Searching...
No Matches
SoPickedPointList Class Reference

Maintains a list of pointers to SoPickedPoint instances. More...

#include <Inventor/lists/SoPickedPointList.h>

+ Inheritance diagram for SoPickedPointList:

Public Member Functions

 SoPickedPointList ()
 Constructor.
 
 SoPickedPointList (int size)
 Constructor that pre-allocates storage for size pointers.
 
 SoPickedPointList (const SoPickedPointList &l)
 Constructor that copies the contents of another list.
 
virtual ~SoPickedPointList ()
 Destructor.
 
void append (SoPickedPoint *pickedPoint)
 Adds a pointer to the end of the list.
 
void insert (SoPickedPoint *pickedPoint, int addBefore)
 Inserts given pointer in list before pointer with given index.
 
virtual void truncate (int start)
 Removes all pointers after one with given index, inclusive, deleting all instances removed from the list.
 
SoPickedPointoperator[] (int i) const
 Returns pointer with given index.
 
void set (int i, SoPickedPoint *pickedPoint)
 Sets an element of a list.
 
- Public Member Functions inherited from SbPList
 SbPList ()
 Default constructor.
 
 SbPList (int initSize)
 Constructor.
 
 SbPList (const SbPList &pl)
 Constructor.
 
virtual ~SbPList ()
 Destructor.
 
void append (void *ptr)
 Adds given pointer to end of list.
 
int find (const void *ptr) const
 Returns index of given pointer in list, or -1 if not found.
 
void insert (void *ptr, int addBefore)
 Inserts given pointer in list before pointer with given index.
 
virtual void remove (int which)
 Removes pointer with given index.
 
int getLength () const
 Returns number of pointers in list.
 
void copy (const SbPList &pl)
 Copies a list.
 
SbPListoperator= (const SbPList &pl)
 Assignment operator: copies list into this list.
 
void *& operator[] (const int index) const
 Returns pointer with given index.
 
int operator== (const SbPList &pl) const
 Equality operator.
 
int operator!= (const SbPList &pl) const
 Inequality operator.
 
void swap (int index1, int index2)
 Swaps element having index1 with the one having index2.
 

Detailed Description

Maintains a list of pointers to SoPickedPoint instances.

This subclass of SbPList holds lists of pointers to instances of classes derived from SoPickedPoint. It is used primarily to return information from picking with the SoRayPickAction class.

SEE ALSO

SoPickedPoint, SoRayPickAction

Definition at line 74 of file SoPickedPointList.h.

Constructor & Destructor Documentation

◆ SoPickedPointList() [1/3]

SoPickedPointList::SoPickedPointList ( )
inline

Constructor.

Definition at line 80 of file SoPickedPointList.h.

◆ SoPickedPointList() [2/3]

SoPickedPointList::SoPickedPointList ( int  size)
inline

Constructor that pre-allocates storage for size pointers.

Definition at line 85 of file SoPickedPointList.h.

◆ SoPickedPointList() [3/3]

SoPickedPointList::SoPickedPointList ( const SoPickedPointList l)

Constructor that copies the contents of another list.

◆ ~SoPickedPointList()

virtual SoPickedPointList::~SoPickedPointList ( )
inlinevirtual

Destructor.

Definition at line 95 of file SoPickedPointList.h.

Member Function Documentation

◆ append()

void SoPickedPointList::append ( SoPickedPoint pickedPoint)
inline

Adds a pointer to the end of the list.

Definition at line 100 of file SoPickedPointList.h.

◆ insert()

void SoPickedPointList::insert ( SoPickedPoint pickedPoint,
int  addBefore 
)
inline

Inserts given pointer in list before pointer with given index.

Definition at line 106 of file SoPickedPointList.h.

◆ operator[]()

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

Returns pointer with given index.

If requested index does not exists, list is grown to return a valid pointer.

Definition at line 117 of file SoPickedPointList.h.

◆ set()

void SoPickedPointList::set ( int  i,
SoPickedPoint pickedPoint 
)

Sets an element of a list.

◆ truncate()

virtual void SoPickedPointList::truncate ( int  start)
inlinevirtual

Removes all pointers after one with given index, inclusive, deleting all instances removed from the list.

Reimplemented from SbPList.

Definition at line 113 of file SoPickedPointList.h.


The documentation for this class was generated from the following file: