Template Class Ray¶
Defined in File Ray.hpp
Class Documentation¶
-
template<typename
value_t
, size_tDIM
>
classActs
::
Ray
¶ Class which models a ray.
It is defined by a starting point and a direction.
- Template Parameters
value_t
: The floating point type to useDIM
: The number of dimensions in which this ray is defined (2 or 3)
Public Types
-
using
vertex_array_type
= Eigen::Array<value_t, DIM, 1>¶ Vertex array type corresponding to the vertex type.
-
using
VertexType
= ActsVector<value_t, DIM>¶ Vertex type based on the value type and dimension.
Public Functions
-
Ray
(const VertexType &origin, const VertexType &dir)¶ Constructor from an origin point and a direction.
- Parameters
origin
: The origin of the raydir
: The direction of the ray
-
const VertexType &
dir
() const¶ Getter for the direction.
- Return
The direction
-
template<size_t
D
= DIM, std::enable_if_t<D == 3, int> = 0>
voiddraw
(IVisualization3D &helper, value_type far_distance = 10) const¶ Helper to draw this ray using a given visualization helper.
- Parameters
helper
: The visualization helperfar_distance
: The “length” of the drawn line representing the ray
-
const vertex_array_type &
idir
() const¶ Getter for the element wise inverse of the direction.
- Return
The element wise inverse.
-
const VertexType &
origin
() const¶ Getter for the origin.
- Return
The origin
-
std::ostream &
toStream
(std::ostream &os) const¶ Write information on this instance to an outstream.
- Return
The out stream given as a nargument
- Parameters
os
: The out stream
-
Ray<value_t, DIM>
transformed
(const transform_type &trf) const¶ Transforms this ray using a given transform and returns a new instance.
- Return
Copy of this ray with the transform applied
- Parameters
trf
: The transform to apply