VTK
|
a Kd-tree spatial decomposition of a set of points More...
#include <vtkKdTree.h>
a Kd-tree spatial decomposition of a set of points
Given one or more vtkDataSets, create a load balancing k-d tree decomposition of the points at the center of the cells. Or, create a k-d tree point locator from a list of points.
This class can also generate a PolyData representation of the boundaries of the spatial regions in the decomposition.
It can sort the regions with respect to a viewing direction, and it can decompose a list of regions into subsets, each of which represent a convex spatial region (since many algorithms require a convex region).
If the points were derived from cells, vtkKdTree can create a list of cell Ids for each region for each data set. Two lists are available - all cells with centroid in the region, and all cells that intersect the region but whose centroid lies in another region.
For the purpose of removing duplicate points quickly from large data sets, or for finding nearby points, we added another mode for building the locator. BuildLocatorFromPoints will build a k-d tree from one or more vtkPoints objects. This can be followed by BuildMapForDuplicatePoints which returns a mapping from the original ids to a subset of the ids that is unique within a supplied tolerance, or you can use FindPoint and FindClosestPoint to locate points in the original set that the tree was built from.
Definition at line 79 of file vtkKdTree.h.
typedef vtkLocator vtkKdTree::Superclass |
Reimplemented from vtkLocator.
Reimplemented in vtkPKdTree.
Definition at line 82 of file vtkKdTree.h.
anonymous enum [protected] |
Definition at line 541 of file vtkKdTree.h.
vtkKdTree::vtkKdTree | ( | ) | [protected] |
vtkKdTree::~vtkKdTree | ( | ) | [protected] |
vtkKdTree::vtkKdTree | ( | const vtkKdTree & | ) | [protected] |
virtual const char* vtkKdTree::GetClassName | ( | ) | [virtual] |
Reimplemented from vtkLocator.
Reimplemented in vtkPKdTree.
static int vtkKdTree::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 vtkLocator.
Reimplemented in vtkPKdTree.
virtual int vtkKdTree::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 vtkLocator.
Reimplemented in vtkPKdTree.
Reimplemented from vtkLocator.
Reimplemented in vtkPKdTree.
void vtkKdTree::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 vtkLocator.
Reimplemented in vtkPKdTree.
static vtkKdTree* vtkKdTree::New | ( | ) | [static] |
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
Reimplemented from vtkObject.
Reimplemented in vtkPKdTree.
virtual void vtkKdTree::TimingOn | ( | ) | [virtual] |
Turn on timing of the k-d tree build
virtual void vtkKdTree::TimingOff | ( | ) | [virtual] |
Turn on timing of the k-d tree build
virtual void vtkKdTree::SetTiming | ( | int | ) | [virtual] |
Turn on timing of the k-d tree build
virtual int vtkKdTree::GetTiming | ( | ) | [virtual] |
Turn on timing of the k-d tree build
virtual void vtkKdTree::SetMinCells | ( | int | ) | [virtual] |
Minimum number of cells per spatial region. Default is 100.
virtual int vtkKdTree::GetMinCells | ( | ) | [virtual] |
Minimum number of cells per spatial region. Default is 100.
virtual int vtkKdTree::GetNumberOfRegionsOrLess | ( | ) | [virtual] |
Set/Get the number of spatial regions you want to get close to without going over. (The number of spatial regions is normally a power of two.) Call this before BuildLocator(). Default is unset (0).
virtual void vtkKdTree::SetNumberOfRegionsOrLess | ( | int | ) | [virtual] |
virtual int vtkKdTree::GetNumberOfRegionsOrMore | ( | ) | [virtual] |
Set/Get the number of spatial regions you want to get close to while having at least this many regions. (The number of spatial regions is normally a power of two.) Default is unset (0).
virtual void vtkKdTree::SetNumberOfRegionsOrMore | ( | int | ) | [virtual] |
virtual double vtkKdTree::GetFudgeFactor | ( | ) | [virtual] |
Some algorithms on k-d trees require a value that is a very small distance relative to the diameter of the entire space divided by the k-d tree. This factor is the maximum axis-aligned width of the space multipled by 10e-6.
virtual void vtkKdTree::SetFudgeFactor | ( | double | ) | [virtual] |
virtual vtkBSPCuts* vtkKdTree::GetCuts | ( | ) | [virtual] |
Get a vtkBSPCuts object, a general object representing an axis- aligned spatial partitioning. Used by vtkBSPIntersections.
void vtkKdTree::SetCuts | ( | vtkBSPCuts * | cuts | ) |
Normally the k-d tree is computed from the dataset(s) provided in SetDataSet. Alternatively, you can provide the cuts that will be applied by calling SetCuts.
void vtkKdTree::OmitXPartitioning | ( | ) |
Omit partitions along the X axis, yielding shafts in the X direction
void vtkKdTree::OmitYPartitioning | ( | ) |
Omit partitions along the Y axis, yielding shafts in the Y direction
void vtkKdTree::OmitZPartitioning | ( | ) |
Omit partitions along the Z axis, yielding shafts in the Z direction
void vtkKdTree::OmitXYPartitioning | ( | ) |
Omit partitions along the X and Y axes, yielding slabs along Z
void vtkKdTree::OmitYZPartitioning | ( | ) |
Omit partitions along the Y and Z axes, yielding slabs along X
void vtkKdTree::OmitZXPartitioning | ( | ) |
Omit partitions along the Z and X axes, yielding slabs along Y
void vtkKdTree::OmitNoPartitioning | ( | ) |
Partition along all three axes - this is the default
virtual void vtkKdTree::SetDataSet | ( | vtkDataSet * | set | ) | [virtual] |
This class can compute a spatial decomposition based on the cells in a list of one or more input data sets. SetDataSet sets the first data set in the list to the named set. SetNthDataSet sets the data set at index N to the data set named. RemoveData set takes either the data set itself or an index and removes that data set from the list of data sets. AddDataSet adds a data set to the list of data sets.
Clear out all data sets and replace with single data set. For backward compatibility with superclass.
Reimplemented from vtkLocator.
virtual void vtkKdTree::AddDataSet | ( | vtkDataSet * | set | ) | [virtual] |
This class can compute a spatial decomposition based on the cells in a list of one or more input data sets. Add them one at a time with this method.
virtual void vtkKdTree::RemoveDataSet | ( | int | index | ) | [virtual] |
Remove the given data set.
virtual void vtkKdTree::RemoveDataSet | ( | vtkDataSet * | set | ) | [virtual] |
Remove the given data set.
virtual void vtkKdTree::RemoveAllDataSets | ( | ) | [virtual] |
Remove the given data set.
int vtkKdTree::GetNumberOfDataSets | ( | ) |
Get the number of data sets included in spatial paritioning
vtkDataSet* vtkKdTree::GetDataSet | ( | int | n | ) |
Get the nth defined data set in the spatial partitioning. (If you used SetNthDataSet to define 0,1 and 3 and ask for data set 2, you get 3.)
Return the n'th data set.
vtkDataSet* vtkKdTree::GetDataSet | ( | ) | [inline, virtual] |
Return the 0'th data set. For compatability with the superclass' interface.
Reimplemented from vtkLocator.
Definition at line 190 of file vtkKdTree.h.
virtual vtkDataSetCollection* vtkKdTree::GetDataSets | ( | ) | [virtual] |
Return a collection of all the data sets.
int vtkKdTree::GetDataSetIndex | ( | vtkDataSet * | set | ) |
Return the index of the given data set. Returns -1 if that data set does not exist.
void vtkKdTree::GetBounds | ( | double * | bounds | ) |
Get the spatial bounds of the entire k-d tree space. Sets bounds array to xmin, xmax, ymin, ymax, zmin, zmax.
void vtkKdTree::SetNewBounds | ( | double * | bounds | ) |
There are certain applications where you want the bounds of the k-d tree space to be at least as large as a specified box. If the k-d tree has been built, you can expand it's bounds with this method. If the bounds supplied are smaller than those computed, they will be ignored.
virtual int vtkKdTree::GetNumberOfRegions | ( | ) | [virtual] |
The number of leaf nodes of the tree, the spatial regions
Get the spatial bounds of k-d tree region
Get the bounds of the data within the k-d tree region
void vtkKdTree::PrintTree | ( | ) |
Print out nodes of kd tree
void vtkKdTree::PrintVerboseTree | ( | ) |
Print out nodes of kd tree
void vtkKdTree::PrintRegion | ( | int | id | ) |
Print out leaf node data for given id
Create a list for each of the requested regions, listing the IDs of all cells whose centroid falls in the region. These lists are obtained with GetCellList(). If no DataSet is specified, the cell list is created for DataSet 0. If no list of requested regions is provided, the cell lists for all regions are created. When CreateCellLists is called again, the lists created on the previous call are deleted.
void vtkKdTree::CreateCellLists | ( | vtkDataSet * | set, |
int * | regionReqList, | ||
int | reqListSize | ||
) |
void vtkKdTree::CreateCellLists | ( | ) |
virtual void vtkKdTree::SetIncludeRegionBoundaryCells | ( | int | ) | [virtual] |
If IncludeRegionBoundaryCells is ON, CreateCellLists() will also create a list of cells which intersect a given region, but are not assigned to the region. These lists are obtained with GetBoundaryCellList(). Default is OFF.
virtual int vtkKdTree::GetIncludeRegionBoundaryCells | ( | ) | [virtual] |
If IncludeRegionBoundaryCells is ON, CreateCellLists() will also create a list of cells which intersect a given region, but are not assigned to the region. These lists are obtained with GetBoundaryCellList(). Default is OFF.
virtual void vtkKdTree::IncludeRegionBoundaryCellsOn | ( | ) | [virtual] |
If IncludeRegionBoundaryCells is ON, CreateCellLists() will also create a list of cells which intersect a given region, but are not assigned to the region. These lists are obtained with GetBoundaryCellList(). Default is OFF.
virtual void vtkKdTree::IncludeRegionBoundaryCellsOff | ( | ) | [virtual] |
If IncludeRegionBoundaryCells is ON, CreateCellLists() will also create a list of cells which intersect a given region, but are not assigned to the region. These lists are obtained with GetBoundaryCellList(). Default is OFF.
void vtkKdTree::DeleteCellLists | ( | ) |
Free the memory used by the cell lists.
Get the cell list for a region. This returns a pointer to vtkKdTree's memory, so don't free it.
The cell list obtained with GetCellList is the list of all cells such that their centroid is contained in the spatial region. It may also be desirable to get a list of all cells intersecting a spatial region, but with centroid in some other region. This is that list. This list is computed in CreateCellLists() if and only if IncludeRegionBoundaryCells is ON. This returns a pointer to KdTree's memory, so don't free it.
vtkIdType vtkKdTree::GetCellLists | ( | vtkIntArray * | regions, |
int | set, | ||
vtkIdList * | inRegionCells, | ||
vtkIdList * | onBoundaryCells | ||
) |
For a list of regions, get two cell lists. The first lists the IDs all cells whose centroids lie in one of the regions. The second lists the IDs of all cells that intersect the regions, but whose centroid lies in a region not on the list. The total number of cell IDs written to both lists is returned. Either list pointer passed in can be NULL, and it will be ignored. If there are multiple data sets, you must specify which data set you wish cell IDs for. The caller should delete these two lists when done. This method uses the cell lists created in CreateCellLists(). If the cell list for any of the requested regions does not exist, then this method will call CreateCellLists() to create cell lists for *every* region of the k-d tree. You must remember to DeleteCellLists() when done with all calls to this method, as cell lists can require a great deal of memory.
vtkIdType vtkKdTree::GetCellLists | ( | vtkIntArray * | regions, |
vtkDataSet * | set, | ||
vtkIdList * | inRegionCells, | ||
vtkIdList * | onBoundaryCells | ||
) |
For a list of regions, get two cell lists. The first lists the IDs all cells whose centroids lie in one of the regions. The second lists the IDs of all cells that intersect the regions, but whose centroid lies in a region not on the list. The total number of cell IDs written to both lists is returned. Either list pointer passed in can be NULL, and it will be ignored. If there are multiple data sets, you must specify which data set you wish cell IDs for. The caller should delete these two lists when done. This method uses the cell lists created in CreateCellLists(). If the cell list for any of the requested regions does not exist, then this method will call CreateCellLists() to create cell lists for *every* region of the k-d tree. You must remember to DeleteCellLists() when done with all calls to this method, as cell lists can require a great deal of memory.
vtkIdType vtkKdTree::GetCellLists | ( | vtkIntArray * | regions, |
vtkIdList * | inRegionCells, | ||
vtkIdList * | onBoundaryCells | ||
) |
For a list of regions, get two cell lists. The first lists the IDs all cells whose centroids lie in one of the regions. The second lists the IDs of all cells that intersect the regions, but whose centroid lies in a region not on the list. The total number of cell IDs written to both lists is returned. Either list pointer passed in can be NULL, and it will be ignored. If there are multiple data sets, you must specify which data set you wish cell IDs for. The caller should delete these two lists when done. This method uses the cell lists created in CreateCellLists(). If the cell list for any of the requested regions does not exist, then this method will call CreateCellLists() to create cell lists for *every* region of the k-d tree. You must remember to DeleteCellLists() when done with all calls to this method, as cell lists can require a great deal of memory.
int vtkKdTree::GetRegionContainingCell | ( | vtkDataSet * | set, |
vtkIdType | cellID | ||
) |
Get the id of the region containing the cell centroid. If no DataSet is specified, assume DataSet 0. If you need the region ID for every cell, use AllGetRegionContainingCell instead. It is more efficient.
Get the id of the region containing the cell centroid. If no DataSet is specified, assume DataSet 0. If you need the region ID for every cell, use AllGetRegionContainingCell instead. It is more efficient.
Get the id of the region containing the cell centroid. If no DataSet is specified, assume DataSet 0. If you need the region ID for every cell, use AllGetRegionContainingCell instead. It is more efficient.
int* vtkKdTree::AllGetRegionContainingCell | ( | ) |
Get a list (in order by data set by cell id) of the region IDs of the region containing the centroid for each cell. This is faster than calling GetRegionContainingCell for each cell in the DataSet. vtkKdTree uses this list, so don't delete it.
Get the id of the region containing the specified location.
void vtkKdTree::BuildLocator | ( | ) | [virtual] |
Create the k-d tree decomposition of the cells of the data set or data sets. Cells are assigned to k-d tree spatial regions based on the location of their centroids.
Implements vtkLocator.
Reimplemented in vtkPKdTree.
int vtkKdTree::MinimalNumberOfConvexSubRegions | ( | vtkIntArray * | regionIdList, |
double ** | convexRegionBounds | ||
) |
Given a list of region IDs, determine the decomposition of these regions into the minimal number of convex subregions. Due to the way the k-d tree is constructed, those convex subregions will be axis-aligned boxes. Return the minimal number of such convex regions that compose the original region list. This call will set convexRegionBounds to point to a list of the bounds of these regions. Caller should free this. There will be six values for each convex subregion (xmin, xmax, ymin, ymax, zmin, zmax). If the regions in the regionIdList form a box already, a "1" is returned and the second argument contains the bounds of the box.
int vtkKdTree::DepthOrderAllRegions | ( | double * | dop, |
vtkIntArray * | orderedList | ||
) |
DO NOT CALL. Depricated in VTK 5.2. Use ViewOrderAllRegionsInDirection or ViewOrderAllRegionsFromPosition.
int vtkKdTree::DepthOrderRegions | ( | vtkIntArray * | regionIds, |
double * | dop, | ||
vtkIntArray * | orderedList | ||
) |
DO NOT CALL. Depricated in VTK 5.2. Use ViewOrderRegionsInDirection or ViewOrderRegionsFromPosition.
int vtkKdTree::ViewOrderAllRegionsInDirection | ( | const double | directionOfProjection[3], |
vtkIntArray * | orderedList | ||
) |
Given a direction of projection (typically obtained with vtkCamera::GetDirectionOfProjection()), this method, creates a list of the k-d tree region IDs in order from front to back with respect to that direction. The number of ordered regions is returned. Use this method to view order regions for cameras that use parallel projection.
int vtkKdTree::ViewOrderRegionsInDirection | ( | vtkIntArray * | regionIds, |
const double | directionOfProjection[3], | ||
vtkIntArray * | orderedList | ||
) |
Given a direction of projection and a list of k-d tree region IDs, this method, creates a list of the k-d tree region IDs in order from front to back with respect to that direction. The number of ordered regions is returned. Use this method to view order regions for cameras that use parallel projection.
int vtkKdTree::ViewOrderAllRegionsFromPosition | ( | const double | directionOfProjection[3], |
vtkIntArray * | orderedList | ||
) |
Given a camera position (typically obtained with vtkCamera::GetPosition()), this method, creates a list of the k-d tree region IDs in order from front to back with respect to that direction. The number of ordered regions is returned. Use this method to view order regions for cameras that use perspective projection.
int vtkKdTree::ViewOrderRegionsFromPosition | ( | vtkIntArray * | regionIds, |
const double | directionOfProjection[3], | ||
vtkIntArray * | orderedList | ||
) |
Given a camera position and a list of k-d tree region IDs, this method, creates a list of the k-d tree region IDs in order from front to back with respect to that direction. The number of ordered regions is returned. Use this method to view order regions for cameras that use perspective projection.
void vtkKdTree::BuildLocatorFromPoints | ( | vtkPointSet * | pointset | ) |
This is a special purpose locator that builds a k-d tree to find duplicate and near-by points. It builds the tree from one or more vtkPoints objects instead of from the cells of a vtkDataSet. This build would normally be followed by BuildMapForDuplicatePoints, FindPoint, or FindClosestPoint. Since this will build a normal k-d tree, all the region intersection queries will still work, as will most other calls except those that have "Cell" in the name. This method works most efficiently when the point arrays are float arrays.
void vtkKdTree::BuildLocatorFromPoints | ( | vtkPoints * | ptArray | ) |
This is a special purpose locator that builds a k-d tree to find duplicate and near-by points. It builds the tree from one or more vtkPoints objects instead of from the cells of a vtkDataSet. This build would normally be followed by BuildMapForDuplicatePoints, FindPoint, or FindClosestPoint. Since this will build a normal k-d tree, all the region intersection queries will still work, as will most other calls except those that have "Cell" in the name. This method works most efficiently when the point arrays are float arrays.
This is a special purpose locator that builds a k-d tree to find duplicate and near-by points. It builds the tree from one or more vtkPoints objects instead of from the cells of a vtkDataSet. This build would normally be followed by BuildMapForDuplicatePoints, FindPoint, or FindClosestPoint. Since this will build a normal k-d tree, all the region intersection queries will still work, as will most other calls except those that have "Cell" in the name. This method works most efficiently when the point arrays are float arrays.
vtkIdTypeArray* vtkKdTree::BuildMapForDuplicatePoints | ( | float | tolerance | ) |
This call returns a mapping from the original point IDs supplied to BuildLocatorFromPoints to a subset of those IDs that is unique within the specified tolerance. If points 2, 5, and 12 are the same, then IdMap[2] = IdMap[5] = IdMap[12] = 2 (or 5 or 12). "original point IDs" - For point IDs we start at 0 for the first point in the first vtkPoints object, and increase by 1 for subsequent points and subsequent vtkPoints objects. You must have called BuildLocatorFromPoints() before calling this. You are responsible for deleting the returned array.
Find the Id of the point that was previously supplied to BuildLocatorFromPoints(). Returns -1 if the point was not in the original array.
Find the Id of the point that was previously supplied to BuildLocatorFromPoints(). Returns -1 if the point was not in the original array.
Find the Id of the point that was previously supplied to BuildLocatorFromPoints() which is closest to the given point. Set the square of the distance between the two points.
Find the Id of the point that was previously supplied to BuildLocatorFromPoints() which is closest to the given point. Set the square of the distance between the two points.
vtkIdType vtkKdTree::FindClosestPointWithinRadius | ( | double | radius, |
const double | x[3], | ||
double & | dist2 | ||
) |
Given a position x and a radius r, return the id of the point closest to the point in that radius. dist2 returns the squared distance to the point.
Find the Id of the point in the given region which is closest to the given point. Return the ID of the point, and set the square of the distance of between the points.
vtkIdType vtkKdTree::FindClosestPointInRegion | ( | int | regionId, |
double | x, | ||
double | y, | ||
double | z, | ||
double & | dist2 | ||
) |
Find the Id of the point in the given region which is closest to the given point. Return the ID of the point, and set the square of the distance of between the points.
Find all points within a specified radius R of position x. The result is not sorted in any specific manner. These methods are thread safe if BuildLocator() is directly or indirectly called from a single thread first.
Find the closest N points to a position. This returns the closest N points to a position. A faster method could be created that returned N close points to a position, but necessarily the exact N closest. The returned points are sorted from closest to farthest. These methods are thread safe if BuildLocator() is directly or indirectly called from a single thread first.
vtkIdTypeArray* vtkKdTree::GetPointsInRegion | ( | int | regionId | ) |
Get a list of the original IDs of all points in a region. You must have called BuildLocatorFromPoints before calling this.
void vtkKdTree::FreeSearchStructure | ( | ) | [virtual] |
Delete the k-d tree data structure. Also delete any cell lists that were computed with CreateCellLists().
Implements vtkLocator.
void vtkKdTree::GenerateRepresentation | ( | int | level, |
vtkPolyData * | pd | ||
) | [virtual] |
Create a polydata representation of the boundaries of the k-d tree regions. If level equals GetLevel(), the leaf nodes are represented.
Implements vtkLocator.
void vtkKdTree::GenerateRepresentation | ( | int * | regionList, |
int | len, | ||
vtkPolyData * | pd | ||
) |
Generate a polygonal representation of a list of regions. Only leaf nodes have region IDs, so these will be leaf nodes.
virtual void vtkKdTree::GenerateRepresentationUsingDataBoundsOn | ( | ) | [virtual] |
The polydata representation of the k-d tree shows the boundaries of the k-d tree decomposition spatial regions. The data inside the regions may not occupy the entire space. To draw just the bounds of the data in the regions, set this variable ON.
virtual void vtkKdTree::GenerateRepresentationUsingDataBoundsOff | ( | ) | [virtual] |
The polydata representation of the k-d tree shows the boundaries of the k-d tree decomposition spatial regions. The data inside the regions may not occupy the entire space. To draw just the bounds of the data in the regions, set this variable ON.
virtual void vtkKdTree::SetGenerateRepresentationUsingDataBounds | ( | int | ) | [virtual] |
The polydata representation of the k-d tree shows the boundaries of the k-d tree decomposition spatial regions. The data inside the regions may not occupy the entire space. To draw just the bounds of the data in the regions, set this variable ON.
virtual int vtkKdTree::GetGenerateRepresentationUsingDataBounds | ( | ) | [virtual] |
The polydata representation of the k-d tree shows the boundaries of the k-d tree decomposition spatial regions. The data inside the regions may not occupy the entire space. To draw just the bounds of the data in the regions, set this variable ON.
virtual void vtkKdTree::PrintTiming | ( | ostream & | os, |
vtkIndent | indent | ||
) | [virtual] |
Print timing of k-d tree build
Reimplemented in vtkPKdTree.
virtual int vtkKdTree::NewGeometry | ( | ) | [virtual] |
Return 1 if the geometry of the input data sets has changed since the last time the k-d tree was built.
virtual int vtkKdTree::NewGeometry | ( | vtkDataSet ** | sets, |
int | numDataSets | ||
) | [virtual] |
Return 1 if the geometry of these data sets differs for the geometry of the last data sets used to build the k-d tree.
virtual void vtkKdTree::InvalidateGeometry | ( | ) | [virtual] |
Forget about the last geometry used. The next call to NewGeometry will return 1. A new k-d tree will be built the next time BuildLocator is called.
Create a copy of the binary tree representation of the k-d tree spatial partitioning provided.
void vtkKdTree::FindPointsInArea | ( | double * | area, |
vtkIdTypeArray * | ids, | ||
bool | clearArray = true |
||
) |
Fill ids with points found in area. The area is a 6-tuple containing (xmin, xmax, ymin, ymax, zmin, zmax). This method will clear the array by default. To append ids to an array, set clearArray to false.
void vtkKdTree::SetCalculator | ( | vtkKdNode * | kd | ) | [protected] |
void vtkKdTree::SetCuts | ( | vtkBSPCuts * | cuts, |
int | userDefined | ||
) | [protected] |
void vtkKdTree::UpdateBuildTime | ( | ) | [protected] |
Save enough state so NewGeometry() can work, and update the BuildTime time stamp.
Prior to dividing a region at level "level", of size "numberOfPoints", apply the tests implied by MinCells, NumberOfRegionsOrMore and NumberOfRegionsOrLess. Return 1 if it's OK to divide the region, 0 if you should not.
static void vtkKdTree::DeleteAllDescendants | ( | vtkKdNode * | nd | ) | [static, protected] |
void vtkKdTree::BuildRegionList | ( | ) | [protected] |
void vtkKdTree::SetActualLevel | ( | ) | [inline, protected] |
Definition at line 559 of file vtkKdTree.h.
Get back a list of the nodes at a specified level, nodes must be preallocated to hold 2^^(level) node structures.
static void vtkKdTree::GetLeafNodeIds | ( | vtkKdNode * | node, |
vtkIntArray * | ids | ||
) | [static, protected] |
Adds to the vtkIntArray the list of region IDs of all leaf nodes in the given node.
int vtkKdTree::GetNumberOfCells | ( | ) | [protected] |
Returns the total number of cells in all the data sets
Returns the total number of cells in data set 1 through data set 2.
void vtkKdTree::ComputeCellCenter | ( | vtkDataSet * | set, |
int | cellId, | ||
float * | center | ||
) | [protected] |
Get or compute the center of one cell. If the DataSet is NULL, the first DataSet is used. This is the point used in determining to which spatial region the cell is assigned.
void vtkKdTree::ComputeCellCenter | ( | vtkDataSet * | set, |
int | cellId, | ||
double * | center | ||
) | [protected] |
float* vtkKdTree::ComputeCellCenters | ( | ) | [protected] |
Compute and return a pointer to a list of all cell centers, in order by data set by cell Id. If a DataSet is specified cell centers for cells of that data only are returned. If no DataSet is specified, the cell centers of cells in all DataSets are returned. The caller should free the list of cell centers when done.
float* vtkKdTree::ComputeCellCenters | ( | vtkDataSet * | set | ) | [protected] |
virtual void vtkKdTree::ReportReferences | ( | vtkGarbageCollector * | ) | [protected, virtual] |
Reimplemented from vtkLocator.
void vtkKdTree::UpdateProgress | ( | double | amount | ) | [protected] |
Modelled on vtkAlgorithm::UpdateProgress(). Update the progress when building the locator. Fires vtkCommand::ProgressEvent.
virtual void vtkKdTree::SetProgress | ( | double | ) | [protected, virtual] |
Set/Get the execution progress of a process object.
virtual double vtkKdTree::GetProgress | ( | ) | [protected, virtual] |
Set/Get the execution progress of a process object.
void vtkKdTree::UpdateSubOperationProgress | ( | double | amount | ) | [protected] |
static void vtkKdTree::_SetNewBounds | ( | vtkKdNode * | kd, |
double * | b, | ||
int * | fixDim | ||
) | [static, protected] |
static void vtkKdTree::SetDataBoundsToSpatialBounds | ( | vtkKdNode * | kd | ) | [static, protected] |
static void vtkKdTree::ZeroNumberOfPoints | ( | vtkKdNode * | kd | ) | [static, protected] |
void vtkKdTree::FindPointsWithinRadius | ( | vtkKdNode * | node, |
double | R2, | ||
const double | x[3], | ||
vtkIdList * | ids | ||
) | [protected] |
void vtkKdTree::FindPointsInArea | ( | vtkKdNode * | node, |
double * | area, | ||
vtkIdTypeArray * | ids | ||
) | [protected] |
void vtkKdTree::AddAllPointsInRegion | ( | vtkKdNode * | node, |
vtkIdTypeArray * | ids | ||
) | [protected] |
void vtkKdTree::DoMedianFind | ( | vtkKdNode * | kd, |
float * | c1, | ||
int * | ids, | ||
int | d1, | ||
int | d2, | ||
int | d3 | ||
) | [protected] |
void vtkKdTree::SelfRegister | ( | vtkKdNode * | kd | ) | [protected] |
void vtkKdTree::InitializeCellLists | ( | ) | [protected] |
void vtkKdTree::GenerateRepresentationDataBounds | ( | int | level, |
vtkPolyData * | pd | ||
) | [protected] |
void vtkKdTree::_generateRepresentationDataBounds | ( | vtkKdNode * | kd, |
vtkPoints * | pts, | ||
vtkCellArray * | polys, | ||
int | level | ||
) | [protected] |
void vtkKdTree::GenerateRepresentationWholeSpace | ( | int | level, |
vtkPolyData * | pd | ||
) | [protected] |
void vtkKdTree::_generateRepresentationWholeSpace | ( | vtkKdNode * | kd, |
vtkPoints * | pts, | ||
vtkCellArray * | polys, | ||
int | level | ||
) | [protected] |
void vtkKdTree::AddPolys | ( | vtkKdNode * | kd, |
vtkPoints * | pts, | ||
vtkCellArray * | polys | ||
) | [protected] |
void vtkKdTree::_printTree | ( | int | verbose | ) | [protected] |
int vtkKdTree::SearchNeighborsForDuplicate | ( | int | regionId, |
float * | point, | ||
int ** | pointsSoFar, | ||
int * | len, | ||
float | tolerance, | ||
float | tolerance2 | ||
) | [protected] |
int vtkKdTree::SearchRegionForDuplicate | ( | float * | point, |
int * | pointsSoFar, | ||
int | len, | ||
float | tolerance2 | ||
) | [protected] |
int vtkKdTree::_FindClosestPointInRegion | ( | int | regionId, |
double | x, | ||
double | y, | ||
double | z, | ||
double & | dist2 | ||
) | [protected] |
int vtkKdTree::FindClosestPointInSphere | ( | double | x, |
double | y, | ||
double | z, | ||
double | radius, | ||
int | skipRegion, | ||
double & | dist2 | ||
) | [protected] |
int vtkKdTree::_ViewOrderRegionsInDirection | ( | vtkIntArray * | IdsOfInterest, |
const double | dop[3], | ||
vtkIntArray * | orderedList | ||
) | [protected] |
static int vtkKdTree::__ViewOrderRegionsInDirection | ( | vtkKdNode * | node, |
vtkIntArray * | list, | ||
vtkIntArray * | IdsOfInterest, | ||
const double | dir[3], | ||
int | nextId | ||
) | [static, protected] |
int vtkKdTree::_ViewOrderRegionsFromPosition | ( | vtkIntArray * | IdsOfInterest, |
const double | pos[3], | ||
vtkIntArray * | orderedList | ||
) | [protected] |
static int vtkKdTree::__ViewOrderRegionsFromPosition | ( | vtkKdNode * | node, |
vtkIntArray * | list, | ||
vtkIntArray * | IdsOfInterest, | ||
const double | pos[3], | ||
int | nextId | ||
) | [static, protected] |
static int vtkKdTree::__ConvexSubRegions | ( | int * | ids, |
int | len, | ||
vtkKdNode * | tree, | ||
vtkKdNode ** | nodes | ||
) | [static, protected] |
static int vtkKdTree::FoundId | ( | vtkIntArray * | idArray, |
int | id | ||
) | [static, protected] |
void vtkKdTree::NewParitioningRequest | ( | int | req | ) | [protected] |
void vtkKdTree::SetInputDataInfo | ( | int | i, |
int | dims[3], | ||
double | origin[3], | ||
double | spacing[3] | ||
) | [protected] |
int vtkKdTree::CheckInputDataInfo | ( | int | i, |
int | dims[3], | ||
double | origin[3], | ||
double | spacing[3] | ||
) | [protected] |
void vtkKdTree::ClearLastBuildCache | ( | ) | [protected] |
static int vtkKdTree::MidValue | ( | int | dim, |
float * | c1, | ||
int | nvals, | ||
double & | coord | ||
) | [static, protected] |
static int vtkKdTree::Select | ( | int | dim, |
float * | c1, | ||
int * | ids, | ||
int | nvals, | ||
double & | coord | ||
) | [static, protected] |
static void vtkKdTree::_Select | ( | int | dim, |
float * | X, | ||
int * | ids, | ||
int | L, | ||
int | R, | ||
int | K | ||
) | [static, protected] |
static int vtkKdTree::findRegion | ( | vtkKdNode * | node, |
float | x, | ||
float | y, | ||
float | z | ||
) | [static, protected] |
static int vtkKdTree::findRegion | ( | vtkKdNode * | node, |
double | x, | ||
double | y, | ||
double | z | ||
) | [static, protected] |
static vtkKdNode** vtkKdTree::_GetRegionsAtLevel | ( | int | level, |
vtkKdNode ** | nodes, | ||
vtkKdNode * | kd | ||
) | [static, protected] |
static void vtkKdTree::AddNewRegions | ( | vtkKdNode * | kd, |
float * | c1, | ||
int | midpt, | ||
int | dim, | ||
double | coord | ||
) | [static, protected] |
void vtkKdTree::NewPartitioningRequest | ( | int | req | ) | [protected] |
void vtkKdTree::operator= | ( | const vtkKdTree & | ) | [protected] |
vtkBSPIntersections* vtkKdTree::BSPCalculator [protected] |
Definition at line 519 of file vtkKdTree.h.
int vtkKdTree::UserDefinedCuts [protected] |
Definition at line 520 of file vtkKdTree.h.
int vtkKdTree::ValidDirections [protected] |
Definition at line 548 of file vtkKdTree.h.
vtkKdNode* vtkKdTree::Top [protected] |
Definition at line 550 of file vtkKdTree.h.
vtkKdNode** vtkKdTree::RegionList [protected] |
Definition at line 551 of file vtkKdTree.h.
vtkTimerLog* vtkKdTree::TimerLog [protected] |
Definition at line 553 of file vtkKdTree.h.
vtkDataSetCollection* vtkKdTree::DataSets [protected] |
Definition at line 597 of file vtkKdTree.h.
double vtkKdTree::ProgressScale [protected] |
Definition at line 608 of file vtkKdTree.h.
double vtkKdTree::ProgressOffset [protected] |
Definition at line 617 of file vtkKdTree.h.
int vtkKdTree::NumberOfRegionsOrLess [protected] |
Definition at line 741 of file vtkKdTree.h.
int vtkKdTree::NumberOfRegionsOrMore [protected] |
Definition at line 742 of file vtkKdTree.h.
int vtkKdTree::IncludeRegionBoundaryCells [protected] |
Definition at line 744 of file vtkKdTree.h.
double vtkKdTree::CellBoundsCache[6] [protected] |
Definition at line 745 of file vtkKdTree.h.
int vtkKdTree::GenerateRepresentationUsingDataBounds [protected] |
Definition at line 747 of file vtkKdTree.h.
struct _cellList vtkKdTree::CellList [protected] |
Definition at line 750 of file vtkKdTree.h.
int* vtkKdTree::CellRegionList [protected] |
Definition at line 756 of file vtkKdTree.h.
int vtkKdTree::MinCells [protected] |
Definition at line 758 of file vtkKdTree.h.
int vtkKdTree::NumberOfRegions [protected] |
Definition at line 759 of file vtkKdTree.h.
int vtkKdTree::Timing [protected] |
Definition at line 761 of file vtkKdTree.h.
double vtkKdTree::FudgeFactor [protected] |
Definition at line 762 of file vtkKdTree.h.
int vtkKdTree::NumberOfLocatorPoints [protected] |
Definition at line 767 of file vtkKdTree.h.
float* vtkKdTree::LocatorPoints [protected] |
Definition at line 768 of file vtkKdTree.h.
int* vtkKdTree::LocatorIds [protected] |
Definition at line 769 of file vtkKdTree.h.
int* vtkKdTree::LocatorRegionLocation [protected] |
Definition at line 770 of file vtkKdTree.h.
float vtkKdTree::MaxWidth [protected] |
Definition at line 772 of file vtkKdTree.h.
int vtkKdTree::LastNumDataSets [protected] |
Definition at line 777 of file vtkKdTree.h.
int vtkKdTree::LastDataCacheSize [protected] |
Definition at line 778 of file vtkKdTree.h.
vtkDataSet** vtkKdTree::LastInputDataSets [protected] |
Definition at line 779 of file vtkKdTree.h.
unsigned long* vtkKdTree::LastDataSetObserverTags [protected] |
Definition at line 780 of file vtkKdTree.h.
int* vtkKdTree::LastDataSetType [protected] |
Definition at line 781 of file vtkKdTree.h.
double* vtkKdTree::LastInputDataInfo [protected] |
Definition at line 782 of file vtkKdTree.h.
double* vtkKdTree::LastBounds [protected] |
Definition at line 783 of file vtkKdTree.h.
vtkIdType* vtkKdTree::LastNumPoints [protected] |
Definition at line 784 of file vtkKdTree.h.
vtkIdType* vtkKdTree::LastNumCells [protected] |
Definition at line 785 of file vtkKdTree.h.
vtkBSPCuts* vtkKdTree::Cuts [protected] |
Definition at line 787 of file vtkKdTree.h.
double vtkKdTree::Progress [protected] |
Definition at line 788 of file vtkKdTree.h.