MCPcopy Create free account
hub / github.com/Gecode/gecode / containsCoordinateAtDepth

Method containsCoordinateAtDepth

gecode/gist/visualnode.cpp:232–246  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

230 VisualNode::changedStatus(const NodeAllocator& na) { dirtyUp(na); }
231
232 bool
233 VisualNode::containsCoordinateAtDepth(int x, int depth) {
234 BoundingBox box = getShape()->getBoundingBox();
235 if (x < box.left ||
236 x > box.right ||
237 depth >= getShape()->depth()) {
238 return false;
239 }
240 Extent theExtent;
241 if (getShape()->getExtentAtDepth(depth, theExtent)) {
242 return (theExtent.l <= x && x <= theExtent.r);
243 } else {
244 return false;
245 }
246 }
247
248 VisualNode*
249 VisualNode::findNode(const NodeAllocator& na, int x, int y) {

Callers 1

findNodeMethod · 0.80

Calls 3

getBoundingBoxMethod · 0.80
getExtentAtDepthMethod · 0.80
depthMethod · 0.45

Tested by

no test coverage detected