VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
vtkSMPMergePoints Class Reference

Class designed to help with merging of points in parallel. More...

#include <vtkSMPMergePoints.h>

Inheritance diagram for vtkSMPMergePoints:
Inheritance graph
[legend]
Collaboration diagram for vtkSMPMergePoints:
Collaboration graph
[legend]

List of all members.

Public Types

typedef vtkMergePoints Superclass

Public Member Functions

virtual int IsA (const char *type)
vtkSMPMergePointsNewInstance () 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 vtkSMPMergePointsSafeDownCast (vtkObjectBase *o)
static vtkSMPMergePointsNew ()

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 vtkSMPMergePoints ()
 ~vtkSMPMergePoints ()

Protected Attributes

vtkAtomicInt< vtkIdTypeAtomicInsertionId

Detailed Description

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.


Member Typedef Documentation

Reimplemented from vtkMergePoints.

Definition at line 43 of file vtkSMPMergePoints.h.


Constructor & Destructor Documentation


Member Function Documentation

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.

Reimplemented from vtkMergePoints.

virtual vtkObjectBase* vtkSMPMergePoints::NewInstanceInternal ( ) const [protected, virtual]

Reimplemented from vtkMergePoints.

Reimplemented from vtkMergePoints.

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.

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()

Returns the biggest id in the locator.

Definition at line 75 of file vtkSMPMergePoints.h.

Retuns the number of points in a bin.

Definition at line 83 of file vtkSMPMergePoints.h.

Retuns the number of bins.

Definition at line 96 of file vtkSMPMergePoints.h.


Member Data Documentation

Definition at line 106 of file vtkSMPMergePoints.h.


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