31 void SetPlane(
const double fx,
const double fy,
const double fz,
32 const double x0,
const double y0,
const double z0)
override;
33 void SetPlane(
const double fx,
const double fy,
const double fz,
34 const double x0,
const double y0,
const double z0,
35 const double hx,
const double hy,
const double hz)
override;
40 void SetXaxisTitle(
const std::string& xtitle) { m_xaxisTitle = xtitle; }
41 void SetYaxisTitle(
const std::string& ytitle) { m_yaxisTitle = ytitle; }
57 void SetColor(
int matID,
int colorID) { m_colorMap[matID] = colorID; }
59 m_colorMap_fill[matID] = colorID;
67 m_plotMeshBorders =
true;
76 m_disabledMaterial[materialID] =
true;
81 bool m_fillMesh =
false;
84 bool m_drawViewRegion =
false;
85 std::vector<double> m_viewRegionX;
86 std::vector<double> m_viewRegionY;
93 bool m_plotMeshBorders =
false;
96 TGaxis* m_xaxis =
nullptr;
97 TGaxis* m_yaxis =
nullptr;
98 std::string m_xaxisTitle =
"";
99 std::string m_yaxisTitle =
"";
100 bool m_drawAxes =
false;
103 std::map<int, int> m_colorMap;
104 std::map<int, int> m_colorMap_fill;
107 std::map<int, bool> m_disabledMaterial;
113 bool GetPlotLimits();
116 bool InView(
const double x,
const double y)
const;
118 bool LinesCrossed(
double x1,
double y1,
double x2,
double y2,
double u1,
119 double v1,
double u2,
double v2,
double& xc,
121 bool IntersectPlaneArea(
double& xmin,
double& ymin,
122 double& xmax,
double& ymax);
123 bool OnLine(
double x1,
double y1,
double x2,
double y2,
double u,
125 void RemoveCrossings(std::vector<double>& x, std::vector<double>& y);
126 bool PlaneCut(
double x1,
double y1,
double z1,
double x2,
double y2,
127 double z2, TMatrixD& xMat);
128 void ClipToView(std::vector<double>& px, std::vector<double>& py,
129 std::vector<double>& cx, std::vector<double>& cy);
130 bool IsInPolygon(
double x,
double y,
const std::vector<double>& px,
131 const std::vector<double>& py,
bool& edge)
const;
Base class for components based on finite-element field maps.
Base class for visualization classes.
Visualize drift lines and tracks.
Draw the mesh of a field-map component.
bool GetDrawViewRegion(void) const
void CreateDefaultAxes()
Create a default set of custom-made axes.
void SetYaxisTitle(const std::string &ytitle)
void SetFillMeshWithBorders()
Show filled mesh elements.
void SetViewDrift(ViewDrift *vd)
Set the optional associated ViewDrift.
void SetFillColor(int matID, int colorID)
void SetXaxisTitle(const std::string &xtitle)
void DisableMaterial(int materialID)
Disable a material so that its mesh cells are not drawn.
void SetPlane(const double fx, const double fy, const double fz, const double x0, const double y0, const double z0) override
bool Plot()
Plot method to be called by user.
void SetDrawViewRegion(bool do_draw)
Display intersection of projection plane with viewing area.
void SetComponent(ComponentFieldMap *cmp)
Set the component from which to retrieve the mesh and field.
~ViewFEMesh()=default
Destructor.
void SetColor(int matID, int colorID)
void SetXaxis(TGaxis *ax)
void SetYaxis(TGaxis *ay)
void SetFillMesh(const bool f)
Element fill switch; 2D only, set false for wireframe mesh.