35 Surface(gctx, other, transform),
36 m_bounds(other.m_bounds) {}
39 :
Surface(), m_bounds(nullptr) {
46 ? Vector3::UnitZ().cross(T).normalized()
47 : Vector3::UnitX().cross(T).normalized();
50 curvilinearRotation.col(0) = U;
51 curvilinearRotation.col(1) = V;
52 curvilinearRotation.col(2) =
T;
61 :
Surface(detelement), m_bounds(std::
move(pbounds)) {
67 std::shared_ptr<const PlanarBounds> pbounds)
68 :
Surface(transform), m_bounds(std::
move(pbounds)) {}
93 if (std::abs(loc3Dframe.z()) > std::abs(tolerance)) {
100 return "Acts::PlaneSurface";
105 return (*m_bounds.get());
114 std::vector<Polyhedron::FaceType> faces;
115 std::vector<Polyhedron::FaceType> triangularMesh;
116 bool exactPolyhedron =
true;
120 auto vertices2D = m_bounds->vertices(lseg);
121 vertices.reserve(vertices2D.size() + 1);
122 for (
const auto& v2D : vertices2D) {
126 bool innerExists =
false, coversFull =
false;
128 exactPolyhedron =
false;
129 auto vStore =
bounds().values();
138 if (not isEllipse or not innerExists or not coversFull) {
140 faces = facesMesh.first;
141 triangularMesh = facesMesh.second;
147 faces = facesMesh.first;
148 triangularMesh = facesMesh.second;
151 throw std::domain_error(
152 "Polyhedron repr of boundless surface not possible.");
154 return Polyhedron(vertices, faces, triangularMesh, exactPolyhedron);
160 const auto& tMatrix =
transform(gctx).matrix();
161 return Vector3(tMatrix(0, 2), tMatrix(1, 2), tMatrix(2, 2));
171 const Vector3& direction)
const {
181 const auto& gctxTransform =
transform(gctx);
185 auto status = intersection.status();
187 if (intersection.status() != Intersection3D::Status::unreachable and bcheck) {
189 const auto& tMatrix = gctxTransform.matrix();
191 const Vector3 vecLocal(intersection.position() - tMatrix.block<3, 1>(0, 3));
192 if (not insideBounds(tMatrix.block<3, 2>(0, 0).transpose() * vecLocal,
194 status = Intersection3D::Status::missed;
197 return {{
Intersection3D(intersection.position(), intersection.pathLength(),
206 return loc3DToLocBound;