MCPcopy Create free account
hub / github.com/Kitware/VTK / Distance2ToBucket

Method Distance2ToBucket

Common/DataModel/vtkStaticPointLocator.cxx:112–124  ·  view source on GitHub ↗

------------------------------------------------------------------------------ Calculate the distance between the point x to the bucket "nei". WARNING!!!!! Be very careful altering this routine. Simple changes to this routine can make is 25% slower!!!!

Source from the content-addressed store, hash-verified

110// routine can make is 25% slower!!!!
111//
112double vtkBucketList::Distance2ToBucket(const double x[3], const int nei[3])
113{
114 double bounds[6];
115
116 bounds[0] = nei[0] * this->hX + this->bX;
117 bounds[1] = (nei[0] + 1) * this->hX + this->bX;
118 bounds[2] = nei[1] * this->hY + this->bY;
119 bounds[3] = (nei[1] + 1) * this->hY + this->bY;
120 bounds[4] = nei[2] * this->hZ + this->bZ;
121 bounds[5] = (nei[2] + 1) * this->hZ + this->bZ;
122
123 return this->Distance2ToBounds(x, bounds);
124}
125
126//------------------------------------------------------------------------------
127// Calculate the distance between the point x and the specified bounds

Callers 1

Calls 1

Distance2ToBoundsMethod · 0.95

Tested by

no test coverage detected