ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
|
#include <acts/blob/master/Core/include/Acts/Utilities/Frustum.hpp>
Public Types | |
using | value_type = value_t |
Re expose the value type. | |
using | VertexType = ActsVector< value_t, DIM > |
Vertex type based on the value type and dimension. | |
using | vertex_array_type = Eigen::Array< value_t, DIM, 1 > |
Vertex array type corresponding to the vertex type. | |
using | transform_type = Eigen::Transform< value_t, DIM, Eigen::Affine > |
Associated transform type. | |
Public Member Functions | |
template<size_t D = DIM, std::enable_if_t< D==2, int > = 0> | |
Frustum (const VertexType &origin, const VertexType &dir, value_type opening_angle) | |
template<size_t D = DIM, std::enable_if_t< D==3, int > = 0> | |
Frustum (const VertexType &origin, const VertexType &dir, value_type opening_angle) | |
template<size_t D = DIM, std::enable_if_t< D==3, int > = 0> | |
void | draw (IVisualization &helper, value_type far_distance=10) const |
template<size_t D = DIM, std::enable_if_t< D==2, int > = 0> | |
std::ostream & | svg (std::ostream &os, value_type w, value_type h, value_type far_distance=1, value_type unit=20.) const |
const VertexType & | origin () const |
const VertexType & | dir () const |
const std::array< VertexType, SIDES+1 > & | normals () const |
Frustum< value_t, DIM, SIDES > | transformed (const transform_type &trf) const |
Static Public Attributes | |
static constexpr size_t | dim = DIM |
Re expose the number of dimensions. | |
static constexpr size_t | sides = SIDES |
Re expose the number of sides. | |
Private Types | |
using | translation_t = Eigen::Translation< value_t, DIM > |
Private Member Functions | |
Frustum (const VertexType &origin, std::array< VertexType, SIDES+1 > normals) | |
Private Attributes | |
VertexType | m_origin |
std::array< VertexType, SIDES+1 > | m_normals |
Static Private Attributes | |
static constexpr size_t | n_normals = SIDES + 1 |
Class representing a frustum shape. The frustum is defined using an origin, a direction and an opening angle. These parameters are then used to calculate a number of side planes, each having a position and a normal vector. The "near plane" is assumed to coincide with the origin point, and the normal with the "direction" of the frustum. No far plane is defined.
value_t | The floating point value to use |
DIM | The number of dimensions of ambient space |
SIDES | The number of sides (= side planes) the frustum has (exactly 2 in 2D, minimum 3 in 3D) |
Definition at line 28 of file Frustum.hpp.
View newest version in sPHENIX GitHub at line 28 of file Frustum.hpp
using Acts::Frustum< value_t, DIM, SIDES >::transform_type = Eigen::Transform<value_t, DIM, Eigen::Affine> |
Associated transform type.
Definition at line 41 of file Frustum.hpp.
View newest version in sPHENIX GitHub at line 41 of file Frustum.hpp
|
private |
Definition at line 29 of file Frustum.hpp.
View newest version in sPHENIX GitHub at line 29 of file Frustum.hpp
using Acts::Frustum< value_t, DIM, SIDES >::value_type = value_t |
Re expose the value type.
Definition at line 35 of file Frustum.hpp.
View newest version in sPHENIX GitHub at line 35 of file Frustum.hpp
using Acts::Frustum< value_t, DIM, SIDES >::vertex_array_type = Eigen::Array<value_t, DIM, 1> |
Vertex array type corresponding to the vertex type.
Definition at line 39 of file Frustum.hpp.
View newest version in sPHENIX GitHub at line 39 of file Frustum.hpp
using Acts::Frustum< value_t, DIM, SIDES >::VertexType = ActsVector<value_t, DIM> |
Vertex type based on the value type and dimension.
Definition at line 37 of file Frustum.hpp.
View newest version in sPHENIX GitHub at line 37 of file Frustum.hpp
Acts::Frustum< value_t, DIM, SIDES >::Frustum | ( | const VertexType & | origin, |
const VertexType & | dir, | ||
value_type | opening_angle | ||
) |
Constructor for the 2D case.
origin | The origin of the frustum |
dir | The direction of the frustum |
opening_angle | The opening angle |
opening_angle
is defined as the angle between opposing side planes. The opening angle needs to be < pi. Definition at line 13 of file Frustum.ipp.
View newest version in sPHENIX GitHub at line 13 of file Frustum.ipp
References angle, Acts::Frustum< value_t, DIM, SIDES >::m_normals, M_PI, and Acts::VectorHelpers::phi().
Acts::Frustum< value_t, DIM, SIDES >::Frustum | ( | const VertexType & | origin, |
const VertexType & | dir, | ||
value_type | opening_angle | ||
) |
Constructor for the 3D case.
origin | The origin of the frustum |
dir | The direction of the frustum |
opening_angle | The opening angle |
opening_angle
is defined as the angle between opposing side planes. The opening angle needs to be < pi.
|
inlineprivate |
Definition at line 109 of file Frustum.hpp.
View newest version in sPHENIX GitHub at line 109 of file Frustum.hpp
|
inline |
Getter for the direction of the frustum
Definition at line 94 of file Frustum.hpp.
View newest version in sPHENIX GitHub at line 94 of file Frustum.hpp
References Acts::Frustum< value_t, DIM, SIDES >::m_normals.
void Acts::Frustum< value_t, DIM, SIDES >::draw | ( | IVisualization & | helper, |
value_type | far_distance = 10 |
||
) | const |
Draw a representation of this frustum using a visualization helper
helper | The visualization helper |
far_distance | The distance to the virtual "far plane" at which point the side planes terminate visually. |
Definition at line 78 of file Frustum.ipp.
View newest version in sPHENIX GitHub at line 78 of file Frustum.ipp
References Acts::VectorHelpers::cross(), d1, d2, Acts::IVisualization::face(), m, n1, and norm.
Referenced by Acts::Test::BOOST_AUTO_TEST_CASE().
|
inline |
Getter for the normal vectors of the planes defining this frustum.
number of sides
- 1
Definition at line 100 of file Frustum.hpp.
View newest version in sPHENIX GitHub at line 100 of file Frustum.hpp
References Acts::Frustum< value_t, DIM, SIDES >::m_normals.
Referenced by Acts::AxisAlignedBoundingBox< entity_t, value_t, DIM >::intersect().
|
inline |
Getter for the oriogin of the frustum
Definition at line 90 of file Frustum.hpp.
View newest version in sPHENIX GitHub at line 90 of file Frustum.hpp
References Acts::Frustum< value_t, DIM, SIDES >::m_origin.
Referenced by Acts::AxisAlignedBoundingBox< entity_t, value_t, DIM >::intersect().
std::ostream & Acts::Frustum< value_t, DIM, SIDES >::svg | ( | std::ostream & | os, |
value_type | w, | ||
value_type | h, | ||
value_type | far_distance = 1 , |
||
value_type | unit = 20. |
||
) | const |
Draw a representation of this frustum as an SVG string to an outstream
os | The out stream to write to |
w | The width of the output SVG |
h | The height of the output SVG |
far_distance | The distance to the virtual "far line" at which point the side lines terminate visually. |
unit | Multiplicative factor to apply to internal distances |
Definition at line 130 of file Frustum.ipp.
View newest version in sPHENIX GitHub at line 130 of file Frustum.ipp
References kdfinder::abs(), color(), Acts::VectorHelpers::cross(), d1, d2, den, e, f, left, num, r, right, width, x, and y.
Acts::Frustum< value_t, DIM, SIDES > Acts::Frustum< value_t, DIM, SIDES >::transformed | ( | const transform_type & | trf | ) | const |
Transforms this frustum using a given transform and returns a new instance
trf | The transform to apply |
trf
applied. Definition at line 219 of file Frustum.ipp.
View newest version in sPHENIX GitHub at line 219 of file Frustum.ipp
|
static |
Re expose the number of dimensions.
Definition at line 44 of file Frustum.hpp.
View newest version in sPHENIX GitHub at line 44 of file Frustum.hpp
|
private |
Definition at line 114 of file Frustum.hpp.
View newest version in sPHENIX GitHub at line 114 of file Frustum.hpp
Referenced by Acts::Frustum< value_t, DIM, SIDES >::dir(), Acts::Frustum< value_t, DIM, SIDES >::Frustum(), and Acts::Frustum< value_t, DIM, SIDES >::normals().
|
private |
Definition at line 112 of file Frustum.hpp.
View newest version in sPHENIX GitHub at line 112 of file Frustum.hpp
Referenced by Acts::Frustum< value_t, DIM, SIDES >::origin().
|
staticprivate |
Definition at line 31 of file Frustum.hpp.
View newest version in sPHENIX GitHub at line 31 of file Frustum.hpp
|
static |
Re expose the number of sides.
Definition at line 46 of file Frustum.hpp.
View newest version in sPHENIX GitHub at line 46 of file Frustum.hpp