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

Method Distance2ToBucket

Common/DataModel/vtkCellLocator.cxx:1038–1050  ·  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

1036// routine can make is 25% slower!!!!
1037//
1038double vtkCellLocator::Distance2ToBucket(const double x[3], int nei[3])
1039{
1040 double bounds[6];
1041
1042 bounds[0] = nei[0] * this->H[0] + this->Bounds[0];
1043 bounds[1] = (nei[0] + 1) * this->H[0] + this->Bounds[0];
1044 bounds[2] = nei[1] * this->H[1] + this->Bounds[2];
1045 bounds[3] = (nei[1] + 1) * this->H[1] + this->Bounds[2];
1046 bounds[4] = nei[2] * this->H[2] + this->Bounds[4];
1047 bounds[5] = (nei[2] + 1) * this->H[2] + this->Bounds[4];
1048
1049 return this->Distance2ToBounds(x, bounds);
1050}
1051
1052//------------------------------------------------------------------------------
1053// Calculate the distance between the point x and the specified bounds

Callers 1

Calls 1

Distance2ToBoundsMethod · 0.95

Tested by

no test coverage detected