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

This helper produces output for Python visualization. More...

#include <Acts/Visualization/VisualizationBuffer.hpp>

Inheritance diagram for Acts::VisualizationBuffer:
[legend]
Collaboration diagram for Acts::VisualizationBuffer:
[legend]

Public Types

using LineType = std::pair<std::size_t, std::size_t>
 Type of a line.
using ValueType = double
 Stored value type, should be double or float.
using VertexType = Eigen::Matrix<ValueType, 3, 1>
 Type of a vertex based on the value type.
Public Types inherited from Acts::IVisualization3D
using FaceType = std::vector<std::size_t>
 Type alias for face definition as vertex indices.

Public Member Functions

 VisualizationBuffer (unsigned int, double)
 Constructor.
void clear () override
 Remove all contents of this helper.
void face (const std::vector< Vector3 > &, Color) override
 This implementation does not support face.
const std::vector< Color > & faceColors () const
 Vector that contains the colors of a set of faces forming a surface.
void faces (const std::vector< Vector3 > &vtxs, const std::vector< FaceType > &, Color color=s_defaultColor) override
void line (const Vector3 &a, const Vector3 &b, Color color=s_defaultColor) override
 Draw a line from a vertex to another.
void line (const Vector3 &a, const Vector3 &b, const double lineThickness, Color color=s_defaultColor)
 Draw a line from a vertex to another.
const std::vector< Color > & lineColors () const
 Vector that contains the colors of a set of line segments forming a line.
const std::vector< double > & lineThickness () const
 Vector that contains the line thickness of a set of line segments forming a line.
void object (const std::string &) override
const std::vector< std::vector< Vector3 > > & segments () const
 Two vertices that form a line segment are collected in a vector All of these vectors are again stored as a vector which can be understood as the whole line.
const std::vector< std::vector< Vector3 > > & surfaces () const
 All vertices that make up a surface are collected in a vector All of these vectors are again stored as a vector which can be understood as a vector of surfaces.
void vertex (const Vector3 &vtx, Color color=s_defaultColor) override
 Draw a vertex at a given location and a color.
const std::vector< Color > & vertexColors () const
 Vector that contains the colors of vertices.
const std::vector< Vector3 > & vertices3D () const
void write (const std::filesystem::path &) const override
void write (std::ostream &) const override
void write (std::ostream &, std::ostream &) const
 Write the object and the material file.

Additional Inherited Members

Static Public Attributes inherited from Acts::IVisualization3D
static constexpr Color s_defaultColor = {120, 120, 120}
 Default color used for visualization when no color is specified.

Detailed Description

This helper produces output for Python visualization.

Note that colors are not supported in this implementation.

Member Function Documentation

◆ clear()

void Acts::VisualizationBuffer::clear ( )
overridevirtual

Remove all contents of this helper.

Implements Acts::IVisualization3D.

◆ face()

void Acts::VisualizationBuffer::face ( const std::vector< Vector3 > & ,
Color  )
overridevirtual

This implementation does not support face.

Implements Acts::IVisualization3D.

◆ faceColors()

const std::vector< Color > & Acts::VisualizationBuffer::faceColors ( ) const

Vector that contains the colors of a set of faces forming a surface.

Returns
vector of Color objects belonging to a face

◆ faces()

void Acts::VisualizationBuffer::faces ( const std::vector< Vector3 > & vtxs,
const std::vector< FaceType > & ,
Color color = s_defaultColor )
overridevirtual
Parameters
vtxsThe vertices that make up the faceS
colorThe color of the face

Implements Acts::IVisualization3D.

◆ line() [1/2]

void Acts::VisualizationBuffer::line ( const Vector3 & a,
const Vector3 & b,
Color color = s_defaultColor )
overridevirtual

Draw a line from a vertex to another.

Parameters
aThe start vertex
bThe end vertex
colorThe color of the line

Implements Acts::IVisualization3D.

◆ line() [2/2]

void Acts::VisualizationBuffer::line ( const Vector3 & a,
const Vector3 & b,
const double lineThickness,
Color color = s_defaultColor )

Draw a line from a vertex to another.

Parameters
aThe start vertex
bThe end vertex
colorThe color of the line
lineThicknessoptional parameter to define the thickness of the line

◆ lineColors()

const std::vector< Color > & Acts::VisualizationBuffer::lineColors ( ) const

Vector that contains the colors of a set of line segments forming a line.

Returns
vector of Color objects belonging to a line segment

◆ lineThickness()

const std::vector< double > & Acts::VisualizationBuffer::lineThickness ( ) const

Vector that contains the line thickness of a set of line segments forming a line.

Returns
vector of doubles that define the line thckness of a line segment

◆ object()

void Acts::VisualizationBuffer::object ( const std::string & )
overridevirtual
Note
Start a new object context with a name

Implements Acts::IVisualization3D.

◆ segments()

const std::vector< std::vector< Vector3 > > & Acts::VisualizationBuffer::segments ( ) const

Two vertices that form a line segment are collected in a vector All of these vectors are again stored as a vector which can be understood as the whole line.

Returns
vector of line segments

◆ surfaces()

const std::vector< std::vector< Vector3 > > & Acts::VisualizationBuffer::surfaces ( ) const

All vertices that make up a surface are collected in a vector All of these vectors are again stored as a vector which can be understood as a vector of surfaces.

Returns
vector of surfaces

◆ vertex()

void Acts::VisualizationBuffer::vertex ( const Vector3 & vtx,
Color color = s_defaultColor )
overridevirtual

Draw a vertex at a given location and a color.

Parameters
vtxThe vertex position
colorThe color

Implements Acts::IVisualization3D.

◆ vertexColors()

const std::vector< Color > & Acts::VisualizationBuffer::vertexColors ( ) const

Vector that contains the colors of vertices.

Returns
vector of Color objects belonging to a vertex

◆ vertices3D()

const std::vector< Vector3 > & Acts::VisualizationBuffer::vertices3D ( ) const
Returns
vector of 3D vertices

◆ write() [1/3]

void Acts::VisualizationBuffer::write ( const std::filesystem::path & ) const
overridevirtual
Note
This implementation does not support write

Implements Acts::IVisualization3D.

◆ write() [2/3]

void Acts::VisualizationBuffer::write ( std::ostream & ) const
overridevirtual
Note
This implementation does not support write

Implements Acts::IVisualization3D.

◆ write() [3/3]

void Acts::VisualizationBuffer::write ( std::ostream & ,
std::ostream &  ) const

Write the object and the material file.

Note
Not supported in this implementation