the-world-engine
Version:
three.js based, unity like game engine for browser
19 lines (15 loc) • 606 B
JavaScript
import { b2CollideEdgeAndCircle } from "../collision/b2_collide_edge.js";
import { b2EdgeShape } from "../collision/b2_edge_shape.js";
import { b2Contact } from "./b2_contact.js";
export class b2ChainAndCircleContact extends b2Contact {
static Create() {
return new b2ChainAndCircleContact;
}
static Destroy(t) {}
Evaluate(t, e, i) {
const n = b2ChainAndCircleContact.Evaluate_s_edge;
this.GetShapeA().GetChildEdge(n, this.m_indexA);
b2CollideEdgeAndCircle(t, n, e, this.GetShapeB(), i);
}
}
b2ChainAndCircleContact.Evaluate_s_edge = new b2EdgeShape;