36 void SetArea(
const double xmin,
const double ymin,
const double xmax,
39 virtual void SetArea(
const double xmin,
const double ymin,
const double zmin,
40 const double xmax,
const double ymax,
const double zmax);
52 virtual void SetPlane(
const double fx,
const double fy,
const double fz,
53 const double x0,
const double y0,
const double z0);
55 virtual void SetPlane(
const double fx,
const double fy,
const double fz,
56 const double x0,
const double y0,
const double z0,
57 const double hx,
const double hy,
const double hz);
59 void Rotate(
const double angle);
96 std::array<std::array<double, 3>, 3>
m_proj{{
97 {{1, 0, 0}}, {{0, 1, 0}}, {{0, 0, 0}}
99 std::array<double, 4>
m_plane{{0, 0, 1, 0}};
101 std::array<std::array<double, 3>, 3>
m_prmat{{
102 {{1, 0, 0}}, {{0, 1, 0}}, {{0, 0, 1}}
109 void ToPlane(
const T x,
const T y,
const T z, T& xp, T& yp)
const {
115 bool InBox(
const std::array<T, 3>& x)
const {
123 void Clip(
const std::array<float, 3>& x0,
124 const std::array<float, 3>& x1, std::array<float, 3>& xc)
const;
126 void DrawLine(
const std::vector<std::array<float, 3> >& xl,
127 const short col,
const short lw);
137 double& xmax,
double& ymax)
const;
139 double& xmax,
double& ymax)
const;
141 double& xmax,
double& ymax)
const;
143 std::array<double, 3>& bbmax,
144 double& xmin,
double& ymin,
145 double& xmax,
double& ymax)
const;
148 void SetRange(TPad* pad,
const double x0,
const double y0,
149 const double x1,
const double y1);
152 TPad* m_pad =
nullptr;
153 std::unique_ptr<TCanvas> m_canvas;
Abstract base class for components.
Base class for visualization classes.
std::array< double, 4 > m_plane
void EnableDebugging(const bool on=true)
Switch on/off debugging output.
std::array< std::array< double, 3 >, 3 > m_prmat
void Clip(const std::array< float, 3 > &x0, const std::array< float, 3 > &x1, std::array< float, 3 > &xc) const
bool InBox(const std::array< T, 3 > &x) const
void DrawLine(const std::vector< std::array< float, 3 > > &xl, const short col, const short lw)
void SetCanvas(TPad *pad)
Set the canvas to be painted on.
static std::string FindUnusedHistogramName(const std::string &s)
Find an unused histogram name.
void SetPlaneYZ()
Set the viewing plane to y-z.
static std::string FindUnusedCanvasName(const std::string &s)
Find an unused canvas name.
std::array< std::array< double, 3 >, 3 > m_proj
TPad * GetCanvas()
Retrieve the canvas.
void SetRange(TPad *pad, const double x0, const double y0, const double x1, const double y1)
void SetPlaneXZ()
Set the viewing plane to x-z.
bool PlotLimits(Sensor *sensor, double &xmin, double &ymin, double &xmax, double &ymax) const
void SetPlaneXY()
Set the viewing plane to x-y.
virtual ~ViewBase()=default
Destructor.
void ToPlane(const T x, const T y, const T z, T &xp, T &yp) const
void SetCanvas()
Unset an external canvas.
std::string PlaneDescription()
bool PlotLimitsFromUserBox(double &xmin, double &ymin, double &xmax, double &ymax) const
static std::string FindUnusedFunctionName(const std::string &s)
Find an unused function name.
void Rotate(const double angle)
Rotate the viewing plane (angle in radian).
ViewBase()=delete
Default constructor.
void UpdateProjectionMatrix()
virtual void SetPlane(const double fx, const double fy, const double fz, const double x0, const double y0, const double z0)