Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
PlyVisualization3D.hpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file PlyVisualization3D.hpp
1
// This file is part of the Acts project.
2
//
3
// Copyright (C) 2019 CERN for the benefit of the Acts project
4
//
5
// This Source Code Form is subject to the terms of the Mozilla Public
6
// License, v. 2.0. If a copy of the MPL was not distributed with this
7
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
8
9
#pragma once
10
11
#include "
Acts/Definitions/Algebra.hpp
"
12
#include "
Acts/Visualization/IVisualization3D.hpp
"
13
#include "
Acts/Visualization/ViewConfig.hpp
"
14
15
#include <array>
16
#include <fstream>
17
#include <string>
18
#include <utility>
19
#include <vector>
20
21
namespace
Acts {
22
23
template
<
typename
T =
double
>
24
26
class
PlyVisualization3D
:
public
IVisualization3D
{
27
public
:
28
static_assert(std::is_same_v<T, double> || std::is_same_v<T, float>,
29
"Use either double or float"
);
30
32
using
ValueType
=
T
;
33
35
using
VertexType
= Eigen::Matrix<ValueType, 3, 1>;
36
38
void
vertex
(
const
Vector3
& vtx,
ColorRGB
color
= {120, 120, 120})
final
;
39
41
void
face
(
const
std::vector<Vector3>& vtxs,
42
ColorRGB
color
= {120, 120, 120})
final
;
43
45
void
faces
(
const
std::vector<Vector3>& vtxs,
46
const
std::vector<FaceType>&
faces
,
47
ColorRGB
color
= {120, 120, 120})
final
;
48
50
void
line
(
const
Vector3
&
a
,
const
Vector3
&
b
,
51
ColorRGB
color
= {120, 120, 120})
final
;
52
54
void
write
(
const
std::string
&
path
)
const
final
;
55
57
void
write
(std::ostream&
os
)
const
final
;
58
60
void
clear
() final;
61
62
private
:
63
std::vector<std::pair<
VertexType
,
ColorRGB
>>
m_vertices
;
64
std::vector<
FaceType
>
m_faces
;
65
std::vector<std::pair<std::pair<
size_t
,
size_t
>,
ColorRGB
>>
m_edges
;
66
};
67
68
#ifndef DOXYGEN
69
#include "
detail/PlyVisualization3D.ipp
"
70
#endif
71
72
}
// namespace Acts
acts
blob
sPHENIX
Core
include
Acts
Visualization
PlyVisualization3D.hpp
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:35
using
1.8.2 with
sPHENIX GitHub integration