ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
Acts::IVisualization3D Class Referenceabstract

Partially abstract base class which provides an interface to visualization helper classes. More...

#include <Acts/Visualization/IVisualization3D.hpp>

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

Public Types

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

Public Member Functions

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

Static Public Attributes

static constexpr Color s_defaultColor = {120, 120, 120}
 Default color used for visualization when no color is specified.

Detailed Description

Partially abstract base class which provides an interface to visualization helper classes.

It provides a number of methods that all the helpers need to conform to.

Member Typedef Documentation

◆ FaceType

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

Type alias for face definition as vertex indices.

Constructor & Destructor Documentation

◆ ~IVisualization3D()

virtual Acts::IVisualization3D::~IVisualization3D ( )
virtualdefault

Member Function Documentation

◆ clear()

virtual void Acts::IVisualization3D::clear ( )
pure virtual

Remove all contents of this helper.

Implemented in Acts::ObjVisualization3D, and Acts::PlyVisualization3D< T >.

◆ face()

virtual void Acts::IVisualization3D::face ( const std::vector< Vector3 > & vtxs,
Color color = s_defaultColor )
pure virtual

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

Implemented in Acts::ObjVisualization3D, and Acts::PlyVisualization3D< T >.

◆ faces()

virtual void Acts::IVisualization3D::faces ( const std::vector< Vector3 > & vtxs,
const std::vector< FaceType > & faces,
Color color = s_defaultColor )
pure virtual

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

Implemented in Acts::ObjVisualization3D, and Acts::PlyVisualization3D< T >.

◆ line()

virtual void Acts::IVisualization3D::line ( const Vector3 & a,
const Vector3 & b,
Color color = s_defaultColor )
pure virtual

Draw a line from a vertex to another.

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

Implemented in Acts::ObjVisualization3D, and Acts::PlyVisualization3D< T >.

◆ object()

virtual void Acts::IVisualization3D::object ( const std::string & name)
pure virtual

Start a new object context.

Parameters
nameThe name of the object

Implemented in Acts::ObjVisualization3D, and Acts::PlyVisualization3D< T >.

◆ vertex()

virtual void Acts::IVisualization3D::vertex ( const Vector3 & vtx,
Color color = s_defaultColor )
pure virtual

Draw a vertex at a given location and a color.

Parameters
vtxThe vertex position
colorThe color

Implemented in Acts::ObjVisualization3D, and Acts::PlyVisualization3D< T >.

◆ write() [1/2]

virtual void Acts::IVisualization3D::write ( const std::filesystem::path & path) const
pure virtual

Write the content of the helper to an outstream.

Parameters
pathis the file system path for writing the file

Implemented in Acts::ObjVisualization3D, and Acts::PlyVisualization3D< T >.

◆ write() [2/2]

virtual void Acts::IVisualization3D::write ( std::ostream & os) const
pure virtual

Write the content of the helper to an outstream.

Parameters
osThe output stream for file

Implemented in Acts::ObjVisualization3D, and Acts::PlyVisualization3D< T >.

Member Data Documentation

◆ s_defaultColor

Color Acts::IVisualization3D::s_defaultColor = {120, 120, 120}
staticconstexpr

Default color used for visualization when no color is specified.