17 namespace PlanarHelper {
30 const auto& tMatrix = transform.matrix();
31 const Vector3D pnormal = tMatrix.block<3, 1>(0, 2).transpose();
32 const Vector3D pcenter = tMatrix.block<3, 1>(0, 3).transpose();
34 double denom = direction.dot(pnormal);
37 double path = (pnormal.dot((pcenter - position))) / (denom);
41 ? Intersection3D::Status::onSurface
42 : Intersection3D::Status::reachable;
44 return Intersection3D{(position + path * direction), path, status};