ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
Acts::PlyVisualization3D< T > Class Template Reference

Helper to write out PlyVisualization3D visualization format. More...

#include <Acts/Visualization/PlyVisualization3D.hpp>

Inheritance diagram for Acts::PlyVisualization3D< T >:
[legend]
Collaboration diagram for Acts::PlyVisualization3D< T >:
[legend]

Public Types

using ValueType = T
 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

void clear () final
 Remove all contents of this helper.
void face (const std::vector< Vector3 > &vtxs, Color color={120, 120, 120}) final
 Draw a face that connects a list of vertices.
void faces (const std::vector< Vector3 > &vtxs, const std::vector< FaceType > &faces, Color color={120, 120, 120}) final
 Draw a faces that connects a list of vertices - expert only.
void line (const Vector3 &a, const Vector3 &b, Color color={120, 120, 120}) final
 Draw a line from a vertex to another.
void object (const std::string &) final
 Start a new object context.
void vertex (const Vector3 &vtx, Color color={120, 120, 120}) final
 Draw a vertex at a given location and a color.
void write (const std::filesystem::path &path) const final
 Write the content of the helper to an outstream.
void write (std::ostream &os) const final
 Write the content of the helper to an outstream.
Public Member Functions inherited from Acts::IVisualization3D
virtual ~IVisualization3D ()=default

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

template<typename T = double>
class Acts::PlyVisualization3D< T >

Helper to write out PlyVisualization3D visualization format.

Member Typedef Documentation

◆ ValueType

template<typename T = double>
using Acts::PlyVisualization3D< T >::ValueType = T

Stored value type, should be double or float.

◆ VertexType

template<typename T = double>
using Acts::PlyVisualization3D< T >::VertexType = Eigen::Matrix<ValueType, 3, 1>

Type of a vertex based on the value type.

Member Function Documentation

◆ clear()

template<typename T = double>
void Acts::PlyVisualization3D< T >::clear ( )
finalvirtual

Remove all contents of this helper.

Implements Acts::IVisualization3D.

◆ face()

template<typename T = double>
void Acts::PlyVisualization3D< T >::face ( const std::vector< Vector3 > & vtxs,
Color color = {120, 120, 120} )
finalvirtual

Draw a face that connects a list of vertices.

Note
Depending on the helper implementation, out of plane vertices might be handled differently.
Parameters
vtxsThe vertices that make up the face
colorThe color of the face

Implements Acts::IVisualization3D.

◆ faces()

template<typename T = double>
void Acts::PlyVisualization3D< T >::faces ( const std::vector< Vector3 > & vtxs,
const std::vector< FaceType > & faces,
Color color = {120, 120, 120} )
finalvirtual

Draw a faces that connects a list of vertices - expert only.

Note
Depending on the helper implementation, out of plane vertices might be handled differently.
Parameters
vtxsThe vertices that make up the faceS
facesThe face presections (i.e. connecting vertices)
colorThe color of the face

Implements Acts::IVisualization3D.

◆ line()

template<typename T = double>
void Acts::PlyVisualization3D< T >::line ( const Vector3 & a,
const Vector3 & b,
Color color = {120, 120, 120} )
finalvirtual

Draw a line from a vertex to another.

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

Implements Acts::IVisualization3D.

◆ object()

template<typename T = double>
void Acts::PlyVisualization3D< T >::object ( const std::string & name)
finalvirtual

Start a new object context.

Parameters
nameThe name of the object

Implements Acts::IVisualization3D.

◆ vertex()

template<typename T = double>
void Acts::PlyVisualization3D< T >::vertex ( const Vector3 & vtx,
Color color = {120, 120, 120} )
finalvirtual

Draw a vertex at a given location and a color.

Parameters
vtxThe vertex position
colorThe color

Implements Acts::IVisualization3D.

◆ write() [1/2]

template<typename T = double>
void Acts::PlyVisualization3D< T >::write ( const std::filesystem::path & path) const
finalvirtual

Write the content of the helper to an outstream.

Parameters
pathis the file system path for writing the file

Implements Acts::IVisualization3D.

◆ write() [2/2]

template<typename T = double>
void Acts::PlyVisualization3D< T >::write ( std::ostream & os) const
finalvirtual

Write the content of the helper to an outstream.

Parameters
osThe output stream for file

Implements Acts::IVisualization3D.