Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Acts::IVisualization3D Class Referenceabstract

#include <acts/blob/sPHENIX/Core/include/Acts/Visualization/IVisualization3D.hpp>

+ Inheritance diagram for Acts::IVisualization3D:

Public Types

using FaceType = std::vector< size_t >
 

Public Member Functions

virtual void vertex (const Vector3 &vtx, ColorRGB color={120, 120, 120})=0
 
virtual void face (const std::vector< Vector3 > &vtxs, ColorRGB color={120, 120, 120})=0
 
virtual void faces (const std::vector< Vector3 > &vtxs, const std::vector< FaceType > &faces, ColorRGB color={120, 120, 120})=0
 
virtual void line (const Vector3 &a, const Vector3 &b, ColorRGB 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
 

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.

Definition at line 25 of file IVisualization3D.hpp.

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

Member Typedef Documentation

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

Definition at line 27 of file IVisualization3D.hpp.

View newest version in sPHENIX GitHub at line 27 of file IVisualization3D.hpp

Member Function Documentation

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

Remove all contents of this helper

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

Referenced by Acts::VolumeView3DTest::run(), Acts::PrimitivesView3DTest::run(), and Acts::SurfaceView3DTest::run().

+ Here is the caller graph for this function:

virtual void Acts::IVisualization3D::face ( const std::vector< Vector3 > &  vtxs,
ColorRGB  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::ObjVisualization3D< T >, and Acts::PlyVisualization3D< 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:

virtual void Acts::IVisualization3D::faces ( const std::vector< Vector3 > &  vtxs,
const std::vector< FaceType > &  faces,
ColorRGB  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 presections (i.e. connecting vertices)
colorThe color of the face

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

bool Acts::IVisualization3D::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 11 of file IVisualization3D.cpp.

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

virtual void Acts::IVisualization3D::line ( const Vector3 a,
const Vector3 b,
ColorRGB  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::ObjVisualization3D< T >, and Acts::PlyVisualization3D< T >.

Referenced by item.Item::__eq__(), item.Item::__hash__(), and Acts::Ray< value_t, DIM >::draw().

+ Here is the caller graph for this function:

void Acts::IVisualization3D::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 15 of file IVisualization3D.cpp.

View newest version in sPHENIX GitHub at line 15 of file IVisualization3D.cpp

virtual void Acts::IVisualization3D::vertex ( const Vector3 vtx,
ColorRGB  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::ObjVisualization3D< T >, and Acts::PlyVisualization3D< T >.

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< T >, and Acts::PlyVisualization3D< T >.

Referenced by Acts::operator<<(), Acts::VolumeView3DTest::run(), Acts::TrackingGeometryView3DTest::run(), Acts::PrimitivesView3DTest::run(), Acts::SurfaceView3DTest::run(), Acts::EventDataView3DTest::testBoundTrackParameters(), Acts::EventDataView3DTest::testMeasurement(), and Acts::EventDataView3DTest::testMultiTrajectory().

+ Here is the caller graph for this function:

virtual void Acts::IVisualization3D::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
will change to std::filesystem::path once gcc9 is standard

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


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