MCPcopy Create free account
hub / github.com/IppClub/Dora-SSR / intersectsSegment

Method intersectsSegment

Source/Node/Spine.cpp:339–350  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

337}
338
339std::string Spine::intersectsSegment(float x1, float y1, float x2, float y2) const {
340 AssertIf(_flags.isOn(Node::Cleanup), "can not operate on an invalid Spine");
341 if (!_bounds || !isHitTestEnabled()) return Slice::Empty;
342 if (_bounds->aabbIntersectsSegment(x1, y1, x2, y2)) {
343 if (auto attachment = _bounds->intersectsSegment(x1, y1, x2, y2)) {
344 return std::string(
345 attachment->getName().buffer(),
346 attachment->getName().length());
347 }
348 }
349 return Slice::Empty;
350}
351
352bool Spine::update(double deltaTime) {
353 if (isUpdating()) {

Callers 4

Spine_intersectsSegmentFunction · 0.45
spine_intersects_segmentFunction · 0.45

Calls 6

stringFunction · 0.85
isOnMethod · 0.80
aabbIntersectsSegmentMethod · 0.80
bufferMethod · 0.80
getNameMethod · 0.65
lengthMethod · 0.45

Tested by

no test coverage detected