(xf B2Transform, p B2Vec2)
| 260 | } |
| 261 | |
| 262 | func (poly B2PolygonShape) TestPoint(xf B2Transform, p B2Vec2) bool { |
| 263 | pLocal := B2RotVec2MulT(xf.Q, B2Vec2Sub(p, xf.P)) |
| 264 | |
| 265 | for i := 0; i < poly.M_count; i++ { |
| 266 | dot := B2Vec2Dot(poly.M_normals[i], B2Vec2Sub(pLocal, poly.M_vertices[i])) |
| 267 | if dot > 0.0 { |
| 268 | return false |
| 269 | } |
| 270 | } |
| 271 | |
| 272 | return true |
| 273 | } |
| 274 | |
| 275 | func (poly B2PolygonShape) RayCast(output *B2RayCastOutput, input B2RayCastInput, xf B2Transform, childIndex int) bool { |
| 276 |
nothing calls this directly
no test coverage detected