ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Acts::ObjVisualization< T > Class Template Reference

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

+ Inheritance diagram for Acts::ObjVisualization< T >:
+ Collaboration diagram for Acts::ObjVisualization< T >:

Public Types

using ValueType = T
 Stored value type, should be double or float.
 
using VertexType = ActsVector< ValueType, 3 >
 Type of a vertex based on the value type.
 
using LineType = std::pair< size_t, size_t >
 Type of a line.
 
- Public Types inherited from Acts::IVisualization
using ColorType = std::array< int, 3 >
 
using FaceType = std::vector< size_t >
 The face type.
 

Public Member Functions

void vertex (const Vector3D &vtx, IVisualization::ColorType color={0, 0, 0}) final
 
 
void line (const Vector3D &a, const Vector3D &b, IVisualization::ColorType color={0, 0, 0}) final
 
 
void face (const std::vector< Vector3D > &vtxs, IVisualization::ColorType color={0, 0, 0}) final
 
 
void faces (const std::vector< Vector3D > &vtxs, const std::vector< FaceType > &faces, ColorType color={0, 0, 0}) final
 
 
void write (const std::string &path) const final
 
 
void write (std::ostream &os) const final
 
 
void write (std::ostream &os, std::ostream &mos) const
 
void clear () final
 
 
- Public Member Functions inherited from Acts::IVisualization
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&,
 

Private Attributes

std::vector< VertexTypem_vertices
 
std::vector< FaceTypem_faces
 
std::vector< LineTypem_lines
 
std::map< size_t,
IVisualization::ColorType
m_lineColors
 Map of colors to be written at given index position.
 
std::map< size_t,
IVisualization::ColorType
m_vertexColors
 
std::map< size_t,
IVisualization::ColorType
m_faceColors
 

Additional Inherited Members

- Protected Member Functions inherited from Acts::IVisualization
bool hasExtension (const std::string &path) const
 
void replaceExtension (std::string &path, const std::string &suffix) const
 

Detailed Description

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

This helper produces output in the OBJ format. Note that colors are not supported in this implementation.

Definition at line 27 of file ObjVisualization.hpp.

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

Member Typedef Documentation

template<typename T = double>
using Acts::ObjVisualization< T >::LineType = std::pair<size_t, size_t>

Type of a line.

Definition at line 39 of file ObjVisualization.hpp.

View newest version in sPHENIX GitHub at line 39 of file ObjVisualization.hpp

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

Stored value type, should be double or float.

Definition at line 33 of file ObjVisualization.hpp.

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

template<typename T = double>
using Acts::ObjVisualization< T >::VertexType = ActsVector<ValueType, 3>

Type of a vertex based on the value type.

Definition at line 36 of file ObjVisualization.hpp.

View newest version in sPHENIX GitHub at line 36 of file ObjVisualization.hpp

Member Function Documentation

template<typename T >
void Acts::ObjVisualization< T >::clear ( )
finalvirtual

Remove all contents of this helper

Implements Acts::IVisualization.

Definition at line 167 of file ObjVisualization.ipp.

View newest version in sPHENIX GitHub at line 167 of file ObjVisualization.ipp

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

Definition at line 29 of file ObjVisualization.ipp.

View newest version in sPHENIX GitHub at line 29 of file ObjVisualization.ipp

References color().

+ Here is the call graph for this function:

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

Implements Acts::IVisualization.

Definition at line 44 of file ObjVisualization.ipp.

View newest version in sPHENIX GitHub at line 44 of file ObjVisualization.ipp

References color(), and Acts::Test::transform.

+ Here is the call graph for this function:

template<typename T >
void Acts::ObjVisualization< T >::line ( const Vector3D a,
const Vector3D b,
IVisualization::ColorType  color = {0, 0, 0} 
)
finalvirtual

Draw a line from a vertex to another

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

Implements Acts::IVisualization.

Definition at line 17 of file ObjVisualization.ipp.

View newest version in sPHENIX GitHub at line 17 of file ObjVisualization.ipp

References color().

Referenced by Acts::Test::ObjTestWriter::writeSectorLinesObj().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<typename T >
void Acts::ObjVisualization< T >::vertex ( const Vector3D vtx,
IVisualization::ColorType  color = {0, 0, 0} 
)
finalvirtual

Draw a vertex at a given location and a color.

Parameters
vtxThe vertex position
colorThe color

Implements Acts::IVisualization.

Definition at line 10 of file ObjVisualization.ipp.

View newest version in sPHENIX GitHub at line 10 of file ObjVisualization.ipp

References color().

+ Here is the call graph for this function:

template<typename T >
void Acts::ObjVisualization< T >::write ( const std::string &  path) const
finalvirtual

Write the content of the helper to an outstream.

Parameters
osThe output stream for file

Implements Acts::IVisualization.

Definition at line 74 of file ObjVisualization.hpp.

View newest version in sPHENIX GitHub at line 74 of file ObjVisualization.hpp

Referenced by Acts::Test::BOOST_AUTO_TEST_CASE(), Acts::Test::ObjTestWriter::writeObj(), Acts::Test::ObjTestWriter::writeSectorLinesObj(), and Acts::Test::ObjTestWriter::writeSectorPlanesObj().

+ Here is the caller graph for this function:

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

Write the content of the helper to an outstream.

Parameters
osThe output stream for file

Implements Acts::IVisualization.

Definition at line 92 of file ObjVisualization.hpp.

View newest version in sPHENIX GitHub at line 92 of file ObjVisualization.hpp

template<typename T >
void Acts::ObjVisualization< T >::write ( std::ostream &  os,
std::ostream &  mos 
) const

Write the object and the material file

Parameters
osthe output stream for the object
mosthe output stream for the auxiliary material file

Definition at line 98 of file ObjVisualization.hpp.

View newest version in sPHENIX GitHub at line 98 of file ObjVisualization.hpp

Member Data Documentation

template<typename T = double>
std::map<size_t, IVisualization::ColorType> Acts::ObjVisualization< T >::m_faceColors
private

Definition at line 79 of file ObjVisualization.hpp.

View newest version in sPHENIX GitHub at line 79 of file ObjVisualization.hpp

template<typename T = double>
std::vector<FaceType> Acts::ObjVisualization< T >::m_faces
private

Definition at line 74 of file ObjVisualization.hpp.

View newest version in sPHENIX GitHub at line 74 of file ObjVisualization.hpp

template<typename T = double>
std::map<size_t, IVisualization::ColorType> Acts::ObjVisualization< T >::m_lineColors
private

Map of colors to be written at given index position.

Definition at line 77 of file ObjVisualization.hpp.

View newest version in sPHENIX GitHub at line 77 of file ObjVisualization.hpp

template<typename T = double>
std::vector<LineType> Acts::ObjVisualization< T >::m_lines
private

Definition at line 75 of file ObjVisualization.hpp.

View newest version in sPHENIX GitHub at line 75 of file ObjVisualization.hpp

template<typename T = double>
std::map<size_t, IVisualization::ColorType> Acts::ObjVisualization< T >::m_vertexColors
private

Definition at line 78 of file ObjVisualization.hpp.

View newest version in sPHENIX GitHub at line 78 of file ObjVisualization.hpp

template<typename T = double>
std::vector<VertexType> Acts::ObjVisualization< T >::m_vertices
private

Definition at line 73 of file ObjVisualization.hpp.

View newest version in sPHENIX GitHub at line 73 of file ObjVisualization.hpp


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