MCPcopy Create free account
hub / github.com/Snapchat/Valdi / contains

Method contains

snap_drawing/src/snap_drawing/cpp/Utils/BoundingBoxHierarchy.cpp:21–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19}
20
21bool BoundingBoxHierarchy::contains(const Rect& box) {
22 if (_rTree == nullptr) {
23 SkRTreeFactory factory;
24 _rTree = factory();
25 _rTree->insert(_frames.data(), static_cast<int>(_frames.size()));
26 }
27
28 _rTree->search(box.getSkValue(), &_rTreeOutput);
29 if (_rTreeOutput.empty()) {
30 return false;
31 } else {
32 _rTreeOutput.clear();
33 return true;
34 }
35}
36
37} // namespace snap::drawing

Callers

nothing calls this directly

Calls 6

getSkValueMethod · 0.80
insertMethod · 0.65
clearMethod · 0.65
dataMethod · 0.45
sizeMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected