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

Method HasPoint

Common/DataModel/vtkAMRBox.cxx:200–211  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

198
199//------------------------------------------------------------------------------
200bool vtkAMRBox::HasPoint(const vtkAMRBox& box, const double origin[3], const double spacing[3],
201 double x, double y, double z)
202{
203 assert("pre: AMR Box instance is invalid" && !box.IsInvalid());
204
205 double bb[6];
206 vtkAMRBox::GetBounds(box, origin, spacing, bb);
207 double min[3] = { bb[0], bb[2], bb[4] };
208 double max[3] = { bb[1], bb[3], bb[5] };
209
210 return min[0] <= x && x <= max[0] && min[1] <= y && y <= max[1] && min[2] <= z && z <= max[2];
211}
212
213//------------------------------------------------------------------------------
214bool vtkAMRBox::operator==(const vtkAMRBox& other) const

Callers

nothing calls this directly

Calls 2

GetBoundsFunction · 0.70
assertFunction · 0.50

Tested by

no test coverage detected