Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Acts::Polyhedron Class Reference

#include <acts/blob/sPHENIX/Core/include/Acts/Geometry/Polyhedron.hpp>

+ Collaboration diagram for Acts::Polyhedron:

Public Types

using FaceType = std::vector< size_t >
 

Public Member Functions

 Polyhedron ()=default
 Default constructor.
 
 Polyhedron (const std::vector< Vector3 > &verticesIn, const std::vector< FaceType > &facesIn, const std::vector< FaceType > &triangularMeshIn, bool isExact=true)
 
void merge (const Polyhedron &other)
 
void move (const Transform3 &transform)
 
Extent extent (const Transform3 &transform=Transform3::Identity()) const
 

Public Attributes

std::vector< Vector3vertices
 List of 3D vertices as vectors.
 
std::vector< FaceTypefaces
 
std::vector< FaceTypetriangularMesh
 
bool exact = true
 Is this an exact representation (approximating curved spaces)
 

Detailed Description

Struct which contains a cartesian approximation for any surface type. It contains a list of cartesian vertices in the global frame, and additionally a list of lists of indices which indicate which vertices form a face. Each entry in faces is a face, which is in turn a list of vertices that need to be connected to form a face. This allows the objString method to produce a ready-to-go obj output.

Definition at line 28 of file Polyhedron.hpp.

View newest version in sPHENIX GitHub at line 28 of file Polyhedron.hpp

Member Typedef Documentation

using Acts::Polyhedron::FaceType = std::vector<size_t>

Definition at line 29 of file Polyhedron.hpp.

View newest version in sPHENIX GitHub at line 29 of file Polyhedron.hpp

Constructor & Destructor Documentation

Acts::Polyhedron::Polyhedron ( )
default

Default constructor.

Acts::Polyhedron::Polyhedron ( const std::vector< Vector3 > &  verticesIn,
const std::vector< FaceType > &  facesIn,
const std::vector< FaceType > &  triangularMeshIn,
bool  isExact = true 
)
inline

Default constructor from a vector of vertices and a vector of faces

Parameters
verticesInThe 3D global vertices that make up the object
facesInList of lists of indices for faces.
triangularMeshInList of lists of indices for a triangular mesh
isExactA dedicated flag if this is exact or not
Note
This creates copies of the input vectors

Definition at line 40 of file Polyhedron.hpp.

View newest version in sPHENIX GitHub at line 40 of file Polyhedron.hpp

Member Function Documentation

Acts::Extent Polyhedron::extent ( const Transform3 transform = Transform3::Identity()) const

Maximum extent of the polyhedron in space

Parameters
transformAn (optional) transform to apply to the vertices for estimation the extent with respect to a given coordinate frame
Returns
ranges that describe the space taken by this surface

Definition at line 43 of file Polyhedron.cpp.

View newest version in sPHENIX GitHub at line 43 of file Polyhedron.cpp

References Acts::binPhi, Acts::binR, Acts::binZ, closest(), dist(), Acts::UnitConstants::e, Acts::Range1D< Type >::expandMin(), Acts::Extent::extend(), f, Acts::detail::VerticesHelper::isInsidePolygon(), Acts::IntegrationTest::L, Acts::Extent::medium(), Acts::UnitConstants::min, norm, Acts::detail::VerticesHelper::onHyperPlane(), Acts::Test::origin(), Acts::Extent::range(), Acts::Range1D< Type >::set(), Acts::Range1D< Type >::setMin(), Acts::Test::transform, testSigmaEff::v, and ActsExamples::HepMC3Event::vertices().

Referenced by Acts::Test::BOOST_AUTO_TEST_CASE(), and Acts::SurfaceBinningMatcher::operator()().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Polyhedron::merge ( const Polyhedron other)

Merge another Polyhedron into this one

Parameters
otheris the source representation

Add the new faces with offsets

Definition at line 20 of file Polyhedron.cpp.

View newest version in sPHENIX GitHub at line 20 of file Polyhedron.cpp

References faces, join(), Acts::Test::transform, triangularMesh, vertices, and ambiguity_solver_full_chain::x.

Referenced by Acts::Test::BOOST_AUTO_TEST_CASE().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Polyhedron::move ( const Transform3 transform)

Move the polyhedron with a Transfrom3D

Parameters
transformThe additional transform applied

Definition at line 38 of file Polyhedron.cpp.

View newest version in sPHENIX GitHub at line 38 of file Polyhedron.cpp

References testSigmaEff::v, and ActsExamples::HepMC3Event::vertices().

Referenced by Acts::GeometryView3D::drawSurface().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

bool Acts::Polyhedron::exact = true

Is this an exact representation (approximating curved spaces)

Definition at line 62 of file Polyhedron.hpp.

View newest version in sPHENIX GitHub at line 62 of file Polyhedron.hpp

std::vector<FaceType> Acts::Polyhedron::faces

List of faces connecting the vertices. each face is a list of vertices v corresponding to the vertex vector above

Definition at line 54 of file Polyhedron.hpp.

View newest version in sPHENIX GitHub at line 54 of file Polyhedron.hpp

Referenced by Acts::Test::BOOST_AUTO_TEST_CASE(), Acts::GeometryView3D::drawPolyhedron(), and merge().

std::vector<FaceType> Acts::Polyhedron::triangularMesh

List of faces connecting the vertices. each face is a list of vertices v

  • in this case restricted to a triangular representation

Definition at line 59 of file Polyhedron.hpp.

View newest version in sPHENIX GitHub at line 59 of file Polyhedron.hpp

Referenced by Acts::Test::BOOST_AUTO_TEST_CASE(), Acts::GeometryView3D::drawPolyhedron(), and merge().

std::vector<Vector3> Acts::Polyhedron::vertices

List of 3D vertices as vectors.

Definition at line 49 of file Polyhedron.hpp.

View newest version in sPHENIX GitHub at line 49 of file Polyhedron.hpp

Referenced by Acts::Test::BOOST_AUTO_TEST_CASE(), Acts::Svg::SurfaceConverter::convert(), Acts::GeometryView3D::drawPolyhedron(), and merge().


The documentation for this class was generated from the following files: