| 337 | } |
| 338 | |
| 339 | std::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 | |
| 352 | bool Spine::update(double deltaTime) { |
| 353 | if (isUpdating()) { |
no test coverage detected