ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Acts::Polyhedron Class Reference

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

+ Collaboration diagram for Acts::Polyhedron:

Public Types

using FaceType = std::vector< size_t >
 
using ColorType = std::array< int, 3 >
 

Public Member Functions

 Polyhedron ()=default
 Default constructor.
 
 Polyhedron (const std::vector< Vector3D > &verticesIn, const std::vector< FaceType > &facesIn, const std::vector< FaceType > &triangularMeshIn, bool radialCheck=false)
 
void merge (const Polyhedron &other)
 
void move (const Transform3D &transform)
 
template<typename helper_t >
void draw (helper_t &helper, bool triangulate=false, const ColorType &color={120, 120, 120}) const
 
Extent extent (const Transform3D &transform=Transform3D::Identity()) const
 

Public Attributes

std::vector< Vector3Dvertices
 List of 3D vertices as vectors.
 
std::vector< FaceTypefaces
 
std::vector< FaceTypetriangularMesh
 

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 31 of file Polyhedron.hpp.

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

Member Typedef Documentation

using Acts::Polyhedron::ColorType = std::array<int, 3>

Definition at line 33 of file Polyhedron.hpp.

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

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

Definition at line 32 of file Polyhedron.hpp.

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

Constructor & Destructor Documentation

Acts::Polyhedron::Polyhedron ( )
default

Default constructor.

Acts::Polyhedron::Polyhedron ( const std::vector< Vector3D > &  verticesIn,
const std::vector< FaceType > &  facesIn,
const std::vector< FaceType > &  triangularMeshIn,
bool  radialCheck = false 
)
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
radialCheckA dedicated check for radial extent done
Note
This creates copies of the input vectors

Definition at line 44 of file Polyhedron.hpp.

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

Member Function Documentation

template<typename helper_t >
void Acts::Polyhedron::draw ( helper_t &  helper,
bool  triangulate = false,
const ColorType color = {120, 120, 120} 
) const
inline

Draw method for polyhedrons

Template Parameters
helper_tThe draw helper
Parameters
helperThe draw helper object (visitor pattern)
triangulateForce the faces to be a triangular mesh
colorThe color for drawing this object

Definition at line 83 of file Polyhedron.hpp.

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

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

+ Here is the caller graph for this function:

Acts::Extent Acts::Polyhedron::extent ( const Transform3D transform = Transform3D::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 36 of file Polyhedron.cpp.

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

References kdfinder::abs(), Acts::binR, Acts::binZ, Acts::Extent::check(), e, f, Acts::detail::VerticesHelper::isInsidePolygon(), L, max, Acts::Extent::medium(), min, norm, Acts::Test::origin(), Acts::Extent::range(), Acts::Extent::ranges, and Acts::s_onSurfaceTolerance.

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 Acts::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 13 of file Polyhedron.cpp.

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

References faces, Acts::Test::transform, triangularMesh, vertices, and x.

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

+ Here is the caller graph for this function:

void Acts::Polyhedron::move ( const Transform3D transform)

Move the polyhedron with a Transfrom3D

Parameters
transformThe additional transform applied

Definition at line 31 of file Polyhedron.cpp.

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

References v.

Referenced by pygaga(), pyptfs(), pyrget(), pyrset(), rluget(), and rluset().

+ Here is the caller graph for this function:

Member Data Documentation

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 58 of file Polyhedron.hpp.

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

Referenced by Acts::Test::BOOST_AUTO_TEST_CASE(), Acts::ProtoLayer::measure(), 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 63 of file Polyhedron.hpp.

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

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

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

List of 3D vertices as vectors.

Definition at line 53 of file Polyhedron.hpp.

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

Referenced by Acts::Test::BOOST_AUTO_TEST_CASE(), Acts::ProtoLayer::measure(), merge(), and Acts::PlaneSurface::polyhedronRepresentation().


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