File IVisualization3D.hpp¶
-
namespace Acts
Note
This file is foreseen for the
Geometry
module to replaceExtent
Note
this is foreseen for the ‘Geometry’ module
Functions
-
inline std::ostream &operator<<(std::ostream &os, const IVisualization3D &hlp)¶
Overload of the << operator to facilitate writing to streams.
- Parameters
os – The output stream
hlp – The helper instance
-
class IVisualization3D
- #include <Acts/Visualization/IVisualization3D.hpp>
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.
Subclassed by Acts::ObjVisualization3D< T >, Acts::PlyVisualization3D< T >
Public Types
-
using FaceType = std::vector<size_t>
Public Functions
-
virtual void clear() = 0
Remove all contents of this helper.
-
virtual void face(const std::vector<Vector3> &vtxs, ColorRGB color = {120, 120, 120}) = 0
Draw a face that connects a list of vertices.
Note
Depending on the helper implementation, out of plane vertices might be handled differently.
- Parameters
vtxs – The vertices that make up the face
color – The color of the face
-
virtual void faces(const std::vector<Vector3> &vtxs, const std::vector<FaceType> &faces, ColorRGB color = {120, 120, 120}) = 0
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
vtxs – The vertices that make up the faceS
faces – The face presectiotions (i.e. connecting vertices)
color – The color of the face
-
virtual void line(const Vector3 &a, const Vector3 &b, ColorRGB color = {120, 120, 120}) = 0
Draw a line from a vertex to another.
- Parameters
a – The start vertex
b – The end vertex
color – The color of the line
-
virtual void vertex(const Vector3 &vtx, ColorRGB color = {120, 120, 120}) = 0
Draw a vertex at a given location and a color.
- Parameters
vtx – The vertex position
color – The color
-
virtual void write(std::ostream &os) const = 0
Write the content of the helper to an outstream.
- Parameters
os – The output stream for file
-
virtual void write(const std::string &path) const = 0
Write the content of the helper to an outstream.
Note
wil change to std::filesystem::path once gcc9 is standard
- Parameters
path – is the file system path for writing the file
Protected Functions
-
bool hasExtension(const std::string &path) const¶
Helper: check for extension.
Note
this is a placeholder for std::filesystem::has_extension which needs special linking until gcc9
- Parameters
path – the path to be checked
-
void replaceExtension(std::string &path, const std::string &suffix) const¶
Helper: replace the extension.
Note
this is a placeholder for std::filesystem::replace_extension which needs special linking until gcc9
- Parameters
path – [in,out] the path to be changed
suffix – the extension to be added
-
using FaceType = std::vector<size_t>
-
inline std::ostream &operator<<(std::ostream &os, const IVisualization3D &hlp)¶