intersectsWithVector3 method

bool intersectsWithVector3 (
  1. Vector3 other
)

Return if this intersects with other

Implementation

bool intersectsWithVector3(Vector3 other) {
  _vector
    ..setFrom(other)
    ..sub(_center)
    ..setValues(_vector.dot(axis0), _vector.dot(axis1), _vector.dot(axis2));

  _aabb3.setCenterAndHalfExtents(_zeroVector, _halfExtents);

  return _aabb3.intersectsWithVector3(_vector);
}