21 namespace PlanarHelper {
32 const auto& tMatrix = transform.matrix();
33 const Vector3D pnormal = tMatrix.block<3, 1>(0, 2).transpose();
34 const Vector3D pcenter = tMatrix.block<3, 1>(0, 3).transpose();
36 double denom = direction.dot(pnormal);
39 double path = (pnormal.dot((pcenter - position))) / (denom);
43 ? Intersection::Status::onSurface
44 : Intersection::Status::reachable;
46 return Intersection{(position + path * direction), path, status};