VTK
|
Class designed to help with merging of points in parallel. More...
#include <vtkSMPMergePoints.h>
Public Types | |
typedef vtkMergePoints | Superclass |
Public Member Functions | |
virtual int | IsA (const char *type) |
vtkSMPMergePoints * | NewInstance () const |
void | PrintSelf (ostream &os, vtkIndent indent) |
void | InitializeMerge () |
void | FixSizeOfPointArray () |
void | Merge (vtkSMPMergePoints *locator, vtkIdType idx, vtkPointData *outPd, vtkPointData *inPd, vtkIdList *idList) |
vtkIdType | GetMaxId () |
vtkIdType | GetNumberOfIdsInBucket (vtkIdType idx) |
vtkIdType | GetNumberOfBuckets () |
Static Public Member Functions | |
static int | IsTypeOf (const char *type) |
static vtkSMPMergePoints * | SafeDownCast (vtkObjectBase *o) |
static vtkSMPMergePoints * | New () |
Protected Member Functions | |
virtual vtkObjectBase * | NewInstanceInternal () const |
vtkSMPMergePoints () | |
~vtkSMPMergePoints () | |
Protected Attributes | |
vtkAtomicInt< vtkIdType > | AtomicInsertionId |
Class designed to help with merging of points in parallel.
vtkSMPMergePoints is a subclass of vtkMergePoints designed to help with merging of points generated by using multiple locators in parallel. Its main functionality is provided by the Merge function. It also has a few additional convenience functions. Merge is thread safe as long as no two threads are merging the same bin. The common way of using vtkSMPMergePoints is:
Definition at line 40 of file vtkSMPMergePoints.h.
Reimplemented from vtkMergePoints.
Definition at line 43 of file vtkSMPMergePoints.h.
vtkSMPMergePoints::vtkSMPMergePoints | ( | ) | [protected] |
vtkSMPMergePoints::~vtkSMPMergePoints | ( | ) | [protected] |
static int vtkSMPMergePoints::IsTypeOf | ( | const char * | name | ) | [static] |
Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkMergePoints.
virtual int vtkSMPMergePoints::IsA | ( | const char * | name | ) | [virtual] |
Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkMergePoints.
static vtkSMPMergePoints* vtkSMPMergePoints::SafeDownCast | ( | vtkObjectBase * | o | ) | [static] |
Reimplemented from vtkMergePoints.
virtual vtkObjectBase* vtkSMPMergePoints::NewInstanceInternal | ( | ) | const [protected, virtual] |
Reimplemented from vtkMergePoints.
vtkSMPMergePoints* vtkSMPMergePoints::NewInstance | ( | ) | const |
Reimplemented from vtkMergePoints.
static vtkSMPMergePoints* vtkSMPMergePoints::New | ( | ) | [static] |
Construct with automatic computation of divisions, averaging 25 points per bucket.
Reimplemented from vtkMergePoints.
void vtkSMPMergePoints::PrintSelf | ( | ostream & | os, |
vtkIndent | indent | ||
) | [virtual] |
Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from vtkMergePoints.
void vtkSMPMergePoints::InitializeMerge | ( | ) |
This should be called from 1 thread before any call to Merge.
void vtkSMPMergePoints::Merge | ( | vtkSMPMergePoints * | locator, |
vtkIdType | idx, | ||
vtkPointData * | outPd, | ||
vtkPointData * | inPd, | ||
vtkIdList * | idList | ||
) |
Merge the points of one of the bins from the given locator to the same bin of the current locator. Note that this requires that the two locators have identical binning structures. This also merges point data given in the inPD argument to the outPd. Furthermore, it generates a map of the old ids of the input locator to the new ids. This is stored in the idList argument. The map is idList[oldId] = newId.
At the of the merge, this can be called to set the MaxId of the points array to the maximum id in the locator. The current design usage is as follows: - Allocate points with points->Resize(numPts). NumPts should be >= total number of points - Do bunch of merging with outLocator->Merge(inLocator[i], ...) - Fix the size of points with outLocator->FixSizeOfPointArray()
vtkIdType vtkSMPMergePoints::GetMaxId | ( | ) | [inline] |
Returns the biggest id in the locator.
Definition at line 75 of file vtkSMPMergePoints.h.
vtkIdType vtkSMPMergePoints::GetNumberOfIdsInBucket | ( | vtkIdType | idx | ) | [inline] |
Retuns the number of points in a bin.
Definition at line 83 of file vtkSMPMergePoints.h.
vtkIdType vtkSMPMergePoints::GetNumberOfBuckets | ( | void | ) | [inline] |
Retuns the number of bins.
Definition at line 96 of file vtkSMPMergePoints.h.
vtkAtomicInt<vtkIdType> vtkSMPMergePoints::AtomicInsertionId [protected] |
Definition at line 106 of file vtkSMPMergePoints.h.