ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
Acts::Polyhedron Class Reference

Struct which contains a cartesian approximation for any surface type. More...

#include <Acts/Geometry/Polyhedron.hpp>

Collaboration diagram for Acts::Polyhedron:
[legend]

Public Types

using FaceType = std::vector<std::size_t>
 Type alias for face definition as vertex indices.

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)
 Default constructor from a vector of vertices and a vector of faces.
Extent extent (const Transform3 &transform=Transform3::Identity()) const
 Maximum extent of the polyhedron in space.
void merge (const Polyhedron &other)
 Merge another Polyhedron into this one.
void move (const Transform3 &transform)
 Move the polyhedron with a Transfrom3D.
void visualize (IVisualization3D &helper, const ViewConfig &viewConfig={}) const
 Visualize the polyhedron using a visualization helper.

Public Attributes

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

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.

Member Typedef Documentation

◆ FaceType

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

Type alias for face definition as vertex indices.

Constructor & Destructor Documentation

◆ Polyhedron() [1/2]

Acts::Polyhedron::Polyhedron ( )
default

Default constructor.

◆ Polyhedron() [2/2]

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

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

Member Function Documentation

◆ extent()

Extent Acts::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

◆ merge()

void Acts::Polyhedron::merge ( const Polyhedron & other)

Merge another Polyhedron into this one.

Parameters
otheris the source representation

◆ move()

void Acts::Polyhedron::move ( const Transform3 & transform)

Move the polyhedron with a Transfrom3D.

Parameters
transformThe additional transform applied

◆ visualize()

void Acts::Polyhedron::visualize ( IVisualization3D & helper,
const ViewConfig & viewConfig = {} ) const

Visualize the polyhedron using a visualization helper.

Parameters
helperThe visualization interface to use for rendering
viewConfigConfiguration options for visualization appearance

Member Data Documentation

◆ exact

bool Acts::Polyhedron::exact = true

Is this an exact representation (approximating curved spaces).

◆ faces

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

◆ triangularMesh

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

◆ vertices

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

List of 3D vertices as vectors.