TestPoint = function(transform, p) {
var center = box2d.b2Mul_X_V2(transform, this.m_p, box2d.b2CircleShape.prototype.TestPoint.s_center);
var d = box2d.b2Sub_V2_V2(p, center, box2d.b2CircleShape.prototype.TestPoint.s_d);
return box2d.b2Dot_V2_V2(d, d) <= box2d.b2Sq(this.m_radius);
}
ComputeDistance = function(xf, p, normal, childIndex) {
var center = box2d.b2Mul_X_V2(xf, this.m_p, box2d.b2CircleShape.prototype.ComputeDistance.s_center);
var d = box2d.b2Sub_V2_V2(p, center, normal);
return normal.Normalize() - this.m_radius;
}
Comments