Public Member Functions | List of all members
vtkPointAccumulator< T_CPP, T_VTK > Class Template Reference

Container class that manages appending data arrays of points. More...

#include <vtkPointAccumulator.h>

Public Member Functions

 vtkPointAccumulator ()
 
 ~vtkPointAccumulator ()
 
bool Empty ()
 Test if there is anything in the store. More...
 
void Accumulate (T_VTK *pts)
 Adds an array of points at the end of the internal store. More...
 
vtkIdType GetNumberOfPoints ()
 Return the number of points currently in the point store. More...
 
void Clear ()
 Free resources and mark as empty. More...
 
T_CPP * Expand (vtkIdType n)
 Extend the internal store and get a pointer to the newly added memory. More...
 
void Accumulate (T_CPP *pts, vtkIdType n)
 Adds an array of points to the end of the internal store. More...
 
vtkPointsBuildVtkPoints ()
 Creates a vtkPoints data structure from the internal store. More...
 
void GetBounds (double bounds[6])
 Compute axis-aligned bounding box. More...
 
void Print ()
 Print the contents of the internal store. More...
 

Detailed Description

template<typename T_CPP, class T_VTK>
class vtkPointAccumulator< T_CPP, T_VTK >

Container class that manages appending data arrays of points.

The template types are T_CPP for the c++ data type and T_VTK for the VTK data type. Eg: if T_CCP==double the T_VTK must be vtkDoubleArray. The main difference between the way this works and if you were to do the same thing with a data array is that here the memory grows by exactly what is needed, and in VTK data arrays the memory will grow by at least twice what is requested.

Definition at line 24 of file vtkPointAccumulator.h.

Constructor & Destructor Documentation

◆ vtkPointAccumulator()

template<typename T_CPP , class T_VTK >
vtkPointAccumulator< T_CPP, T_VTK >::vtkPointAccumulator ( )
inline

Definition at line 27 of file vtkPointAccumulator.h.

◆ ~vtkPointAccumulator()

template<typename T_CPP , class T_VTK >
vtkPointAccumulator< T_CPP, T_VTK >::~vtkPointAccumulator ( )
inline

Definition at line 32 of file vtkPointAccumulator.h.

Member Function Documentation

◆ Clear()

template<typename T_CPP , class T_VTK >
void vtkPointAccumulator< T_CPP, T_VTK >::Clear ( void  )
inline

Free resources and mark as empty.

Definition at line 37 of file vtkPointAccumulator.h.

◆ Empty()

template<typename T_CPP , class T_VTK >
bool vtkPointAccumulator< T_CPP, T_VTK >::Empty ( )
inline

Test if there is anything in the store.

Definition at line 50 of file vtkPointAccumulator.h.

◆ Expand()

template<typename T_CPP , class T_VTK >
T_CPP* vtkPointAccumulator< T_CPP, T_VTK >::Expand ( vtkIdType  n)
inline

Extend the internal store and get a pointer to the newly added memory.

Definition at line 56 of file vtkPointAccumulator.h.

◆ Accumulate() [1/2]

template<typename T_CPP , class T_VTK >
void vtkPointAccumulator< T_CPP, T_VTK >::Accumulate ( T_CPP *  pts,
vtkIdType  n 
)
inline

Adds an array of points to the end of the internal store.

Definition at line 84 of file vtkPointAccumulator.h.

◆ Accumulate() [2/2]

template<typename T_CPP , class T_VTK >
void vtkPointAccumulator< T_CPP, T_VTK >::Accumulate ( T_VTK *  pts)
inline

Adds an array of points at the end of the internal store.

Definition at line 97 of file vtkPointAccumulator.h.

◆ BuildVtkPoints()

template<typename T_CPP , class T_VTK >
vtkPoints* vtkPointAccumulator< T_CPP, T_VTK >::BuildVtkPoints ( )
inline

Creates a vtkPoints data structure from the internal store.

Caller to delete the points.

Definition at line 103 of file vtkPointAccumulator.h.

◆ GetBounds()

template<typename T_CPP , class T_VTK >
void vtkPointAccumulator< T_CPP, T_VTK >::GetBounds ( double  bounds[6])
inline

Compute axis-aligned bounding box.

An exhaustive search is made through points every time. It's calllers responsibility to use sparingly.

Definition at line 121 of file vtkPointAccumulator.h.

◆ GetNumberOfPoints()

template<typename T_CPP , class T_VTK >
vtkIdType vtkPointAccumulator< T_CPP, T_VTK >::GetNumberOfPoints ( )
inline

Return the number of points currently in the point store.

Definition at line 155 of file vtkPointAccumulator.h.

◆ Print()

template<typename T_CPP , class T_VTK >
void vtkPointAccumulator< T_CPP, T_VTK >::Print ( )
inline

Print the contents of the internal store.

Definition at line 160 of file vtkPointAccumulator.h.


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