MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / intersectsWithPoly

Method intersectsWithPoly

source/game/StarDamage.cpp:104–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102}
103
104bool DamageSource::intersectsWithPoly(WorldGeometry const& geometry, PolyF const& targetPoly) const {
105 if (auto poly = damageArea.ptr<PolyF>())
106 return geometry.polyIntersectsPoly(*poly, targetPoly);
107 else if (auto line = damageArea.ptr<Line2F>())
108 return geometry.lineIntersectsPoly(*line, targetPoly);
109 else
110 return false;
111}
112
113Vec2F DamageSource::knockbackMomentum(WorldGeometry const& worldGeometry, Vec2F const& targetCenter) const {
114 if (auto v = knockback.ptr<Vec2F>()) {

Callers 6

queryHitMethod · 0.80
queryHitMethod · 0.80
queryHitMethod · 0.80
queryShieldHitMethod · 0.80
queryHitMethod · 0.80
queryHitMethod · 0.80

Calls 2

polyIntersectsPolyMethod · 0.80
lineIntersectsPolyMethod · 0.80

Tested by

no test coverage detected