containsPoint method
dynamic
containsPoint(
- dynamic point
Implementation
containsPoint(point) {
v1.subVectors(point, center);
rotation.extractBasis(xAxis, yAxis, zAxis);
// project v1 onto each axis and check if these points lie inside the OBB
return Math.abs(v1.dot(xAxis)) <= halfSize.x &&
Math.abs(v1.dot(yAxis)) <= halfSize.y &&
Math.abs(v1.dot(zAxis)) <= halfSize.z;
}