ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Acts::IVisualization Class Referenceabstract

#include <acts/blob/master/Core/include/Acts/Visualization/IVisualization.hpp>

+ Inheritance diagram for Acts::IVisualization:

Public Types

using ColorType = std::array< int, 3 >
 
using FaceType = std::vector< size_t >
 The face type.
 

Public Member Functions

virtual void vertex (const Vector3D &vtx, ColorType color={120, 120, 120})=0
 
virtual void face (const std::vector< Vector3D > &vtxs, ColorType color={120, 120, 120})=0
 
virtual void faces (const std::vector< Vector3D > &vtxs, const std::vector< FaceType > &faces, ColorType color={120, 120, 120})=0
 
virtual void line (const Vector3D &a, const Vector3D &b, ColorType color={120, 120, 120})=0
 
virtual void write (std::ostream &os) const =0
 
virtual void write (const std::string &path) const =0
 
virtual void clear ()=0
 
void vertex (const Vector3F &vtx, ColorType color={120, 120, 120})
 
 
void face (const std::vector< Vector3F > &vtxs, ColorType color={120, 120, 120})
 
 
void line (const Vector3F &a, const Vector3F &b, ColorType color={120, 120, 120})
 (const Vector3F&, const Vector3F&,
 

Protected Member Functions

bool hasExtension (const std::string &path) const
 
void replaceExtension (std::string &path, const std::string &suffix) const
 

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. It also provides a ColorType typedef, but not all of the helpers actually support that.

Definition at line 25 of file IVisualization.hpp.

View newest version in sPHENIX GitHub at line 25 of file IVisualization.hpp

Member Typedef Documentation

using Acts::IVisualization::ColorType = std::array<int, 3>

The color typedef. It's an array of three numbers [0, 255] indicating RGB color values.

Definition at line 30 of file IVisualization.hpp.

View newest version in sPHENIX GitHub at line 30 of file IVisualization.hpp

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

The face type.

Definition at line 33 of file IVisualization.hpp.

View newest version in sPHENIX GitHub at line 33 of file IVisualization.hpp

Member Function Documentation

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

Remove all contents of this helper

Implemented in Acts::ObjVisualization< T >, and Acts::PlyVisualization< T >.

Referenced by Acts::VolumeVisualization::test(), Acts::PrimitivesVisualization::test(), and Acts::SurfaceVisualization::test().

+ Here is the caller graph for this function:

virtual void Acts::IVisualization::face ( const std::vector< Vector3D > &  vtxs,
ColorType  color = {120, 120, 120} 
)
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::ObjVisualization< T >, and Acts::PlyVisualization< T >.

Referenced by Acts::Frustum< value_t, DIM, SIDES >::draw(), Acts::GenericCuboidVolumeBounds::draw(), and Acts::AxisAlignedBoundingBox< entity_t, value_t, DIM >::draw().

+ Here is the caller graph for this function:

void Acts::IVisualization::face ( const std::vector< Vector3F > &  vtxs,
ColorType  color = {120, 120, 120} 
)

Definition at line 16 of file IVisualization.cpp.

View newest version in sPHENIX GitHub at line 16 of file IVisualization.cpp

References Acts::Test::transform, and v.

virtual void Acts::IVisualization::faces ( const std::vector< Vector3D > &  vtxs,
const std::vector< FaceType > &  faces,
ColorType  color = {120, 120, 120} 
)
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 presectiotions (i.e. connecting vertices)
colorThe color of the face

Implemented in Acts::ObjVisualization< T >, and Acts::PlyVisualization< T >.

bool Acts::IVisualization::hasExtension ( const std::string &  path) const
protected

Helper: check for extension

Note
this is a placeholder for std::filesystem::has_extension which needs special linking until gcc9
Parameters
paththe path to be checked

Definition at line 31 of file IVisualization.cpp.

View newest version in sPHENIX GitHub at line 31 of file IVisualization.cpp

virtual void Acts::IVisualization::line ( const Vector3D a,
const Vector3D b,
ColorType  color = {120, 120, 120} 
)
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::PlyVisualization< T >, and Acts::ObjVisualization< T >.

Referenced by dokinematics(), Acts::Ray< value_t, DIM >::draw(), ei(), getdeltat(), getpnorad1(), makebranch(), nthick(), pylogo(), and pystrf().

+ Here is the caller graph for this function:

void Acts::IVisualization::line ( const Vector3F a,
const Vector3F b,
ColorType  color = {120, 120, 120} 
)

(const Vector3F&, const Vector3F&,

Draw a line from a vertex to another

Parameters
aThe start vertex
bThe end vertex
colorThe color of the line
(const Vector3F&, const Vector3F&, ColorType)

Definition at line 24 of file IVisualization.cpp.

View newest version in sPHENIX GitHub at line 24 of file IVisualization.cpp

void Acts::IVisualization::replaceExtension ( std::string &  path,
const std::string &  suffix 
) const
protected

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
suffixthe extension to be added

Definition at line 35 of file IVisualization.cpp.

View newest version in sPHENIX GitHub at line 35 of file IVisualization.cpp

virtual void Acts::IVisualization::vertex ( const Vector3D vtx,
ColorType  color = {120, 120, 120} 
)
pure virtual

Draw a vertex at a given location and a color.

Parameters
vtxThe vertex position
colorThe color

Implemented in Acts::ObjVisualization< T >, and Acts::PlyVisualization< T >.

Referenced by gukine(), and vertex().

+ Here is the caller graph for this function:

void Acts::IVisualization::vertex ( const Vector3F vtx,
ColorType  color = {120, 120, 120} 
)

Below are helper functions, which share the same interface as the ones above, but explicitly accept float values (instead of double), converts them and calls the above methods.Draw a vertex at a given location and a color.

Parameters
vtxThe vertex position
colorThe color

Definition at line 11 of file IVisualization.cpp.

View newest version in sPHENIX GitHub at line 11 of file IVisualization.cpp

References vertex().

+ Here is the call graph for this function:

virtual void Acts::IVisualization::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::ObjVisualization< T >, and Acts::PlyVisualization< T >.

Referenced by Acts::operator<<(), Acts::VolumeVisualization::test(), Acts::EventDataVisualization::test(), Acts::PrimitivesVisualization::test(), and Acts::SurfaceVisualization::test().

+ Here is the caller graph for this function:

virtual void Acts::IVisualization::write ( const std::string &  path) const
pure virtual

Write the content of the helper to an outstream.

Parameters
pathis the file system path for writing the file
Note
wil change to std::filesystem::path once gcc9 is standard

Implemented in Acts::ObjVisualization< T >, and Acts::PlyVisualization< T >.


The documentation for this class was generated from the following files: