gmsh-TingyuanDoc  0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
PViewOptions.h
Go to the documentation of this file.
1 // Gmsh - Copyright (C) 1997-2022 C. Geuzaine, J.-F. Remacle
2 //
3 // See the LICENSE.txt file in the Gmsh root directory for license information.
4 // Please report all issues on https://gitlab.onelab.info/gmsh/gmsh/issues.
5 
6 #ifndef PVIEW_OPTIONS_H
7 #define PVIEW_OPTIONS_H
8 
9 #include <string>
10 #include "ColorTable.h"
11 #include "SBoundingBox3d.h"
12 
13 class mathEvaluator;
14 
15 // The display options of a post-processing view.
16 class PViewOptions {
17 public:
18  enum PlotType { Plot3D = 1, Plot2DSpace = 2, Plot2DTime = 3, Plot2D = 4 };
19  enum IntervalsType { Iso = 1, Continuous = 2, Discrete = 3, Numeric = 4 };
20  enum VectorType {
21  Segment = 1,
22  Arrow = 2,
23  Pyramid = 3,
24  Arrow3D = 4,
25  Displacement = 5
26  };
27  enum TensorType {
28  VonMises = 1,
32  Ellipse = 5,
33  Ellipsoid = 6,
34  Frame = 7
35  };
36  enum GlyphLocation { COG = 1, Vertex = 2 };
37  enum RangeType { Default = 1, Custom = 2, PerTimeStep = 3 };
39 
41  double position[2], size[2];
42  std::string format;
44  double axesTics[3];
45  std::string axesFormat[3], axesLabel[3];
46  double axesPosition[6];
50  double offset[3], raise[3], transform[3][3], displacementFactor, normalRaise;
51  double explode;
53  double normals, tangents;
61  int timeStep;
62  double currentTime;
71  int useStipple, stipple[10][2];
72  std::string stippleString[10];
76  std::string genRaiseX, genRaiseY, genRaiseZ;
79  double targetError;
80  int clip; // status of clip planes (bit array)
82  int sampling;
84  int closed;
85  struct {
86  unsigned int point, line, triangle, quadrangle;
88  unsigned int tangents, normals;
89  unsigned int text2d, text3d, axes, background2d;
90  } color;
91 
92 private:
93  // static reference that contains default values
95 
96 public:
97  PViewOptions();
98  ~PViewOptions();
99  static PViewOptions *reference();
100  // return a floating point value in [min, max] corresponding to the
101  // integer iso in [0, numIso - 1]
102  double getScaleValue(int iso, int numIso, double min, double max);
103  // return an integer in [0, numIso - 1] corresponding to the
104  // floating point value val in [min, max]
105  int getScaleIndex(double val, int numIso, double min, double max,
106  bool forceLinear = false);
107  // get color for val in [min, max] (only use numColors if > 0
108  // instead of all available colors)
109  unsigned int getColor(double val, double min, double max,
110  bool forceLinear = false, int numColors = -1);
111  // get i-th color amongst nb (i in [0, nb - 1])
112  unsigned int getColor(int i, int nb);
113  // create math evaluator for general raise option
114  void createGeneralRaise();
115  // return true if one should not draw elements with type type
116  bool skipElement(int type);
117 };
118 
119 #endif
PViewOptions::Arrow3D
@ Arrow3D
Definition: PViewOptions.h:24
PViewOptions::timeStep
int timeStep
Definition: PViewOptions.h:61
PViewOptions::tangents
double tangents
Definition: PViewOptions.h:53
PViewOptions::externalMin
double externalMin
Definition: PViewOptions.h:47
PViewOptions::lineWidth
double lineWidth
Definition: PViewOptions.h:69
PViewOptions::ScaleType
ScaleType
Definition: PViewOptions.h:38
PViewOptions::tensorType
int tensorType
Definition: PViewOptions.h:60
PViewOptions::EigenVectors
@ EigenVectors
Definition: PViewOptions.h:31
PViewOptions::Plot2DSpace
@ Plot2DSpace
Definition: PViewOptions.h:18
PViewOptions::colorTable
GmshColorTable colorTable
Definition: PViewOptions.h:70
PViewOptions::drawTriangles
int drawTriangles
Definition: PViewOptions.h:64
PViewOptions::genRaiseZ
std::string genRaiseZ
Definition: PViewOptions.h:76
PViewOptions::lightLines
int lightLines
Definition: PViewOptions.h:55
PViewOptions::stippleString
std::string stippleString[10]
Definition: PViewOptions.h:72
mathEvaluator
Definition: mathEvaluator.h:37
PViewOptions::useGenRaise
int useGenRaise
Definition: PViewOptions.h:74
PViewOptions::drawScalars
int drawScalars
Definition: PViewOptions.h:67
PViewOptions::_reference
static PViewOptions * _reference
Definition: PViewOptions.h:94
PViewOptions::genRaiseFactor
double genRaiseFactor
Definition: PViewOptions.h:75
PViewOptions::trihedron
unsigned int trihedron
Definition: PViewOptions.h:87
PViewOptions::normalRaise
double normalRaise
Definition: PViewOptions.h:50
PViewOptions::Default
@ Default
Definition: PViewOptions.h:37
PViewOptions::skipElement
bool skipElement(int type)
Definition: PViewOptions.cpp:139
PViewOptions::sampling
int sampling
Definition: PViewOptions.h:82
PViewOptions::tmpMax
double tmpMax
Definition: PViewOptions.h:47
PViewOptions::RangeType
RangeType
Definition: PViewOptions.h:37
PViewOptions::text2d
unsigned int text2d
Definition: PViewOptions.h:89
Vertex
Definition: Geo.h:29
PViewOptions::useStipple
int useStipple
Definition: PViewOptions.h:71
PViewOptions::color
struct PViewOptions::@32 color
PViewOptions::stipple
int stipple[10][2]
Definition: PViewOptions.h:71
PViewOptions::size
double size[2]
Definition: PViewOptions.h:41
PViewOptions::axesPosition
double axesPosition[6]
Definition: PViewOptions.h:46
PViewOptions::currentTime
double currentTime
Definition: PViewOptions.h:62
PViewOptions::pyramid
unsigned int pyramid
Definition: PViewOptions.h:87
PViewOptions::axesTics
double axesTics[3]
Definition: PViewOptions.h:44
PViewOptions::showScale
int showScale
Definition: PViewOptions.h:58
PViewOptions::tetrahedron
unsigned int tetrahedron
Definition: PViewOptions.h:87
PViewOptions::closed
int closed
Definition: PViewOptions.h:84
PViewOptions::quadrangle
unsigned int quadrangle
Definition: PViewOptions.h:86
PViewOptions::TensorType
TensorType
Definition: PViewOptions.h:27
PViewOptions::VectorType
VectorType
Definition: PViewOptions.h:20
PViewOptions::displacementFactor
double displacementFactor
Definition: PViewOptions.h:50
PViewOptions::angleSmoothNormals
double angleSmoothNormals
Definition: PViewOptions.h:56
PViewOptions::MaxEigenValue
@ MaxEigenValue
Definition: PViewOptions.h:29
PViewOptions::nbIso
int nbIso
Definition: PViewOptions.h:54
PViewOptions::group
std::string group
Definition: PViewOptions.h:83
ColorTable.h
PViewOptions::Iso
@ Iso
Definition: PViewOptions.h:19
PViewOptions::glyphLocation
int glyphLocation
Definition: PViewOptions.h:60
PViewOptions::smoothNormals
int smoothNormals
Definition: PViewOptions.h:55
PViewOptions::line
unsigned int line
Definition: PViewOptions.h:86
PViewOptions::abscissaRangeType
int abscissaRangeType
Definition: PViewOptions.h:59
PViewOptions::customMax
double customMax
Definition: PViewOptions.h:47
PViewOptions::externalViewIndex
int externalViewIndex
Definition: PViewOptions.h:73
PViewOptions::tmpBBox
SBoundingBox3d tmpBBox
Definition: PViewOptions.h:49
PViewOptions::showElement
int showElement
Definition: PViewOptions.h:58
PViewOptions::drawTrihedra
int drawTrihedra
Definition: PViewOptions.h:65
PViewOptions::Numeric
@ Numeric
Definition: PViewOptions.h:19
PViewOptions::customAbscissaMax
double customAbscissaMax
Definition: PViewOptions.h:48
PViewOptions::drawPolyhedra
int drawPolyhedra
Definition: PViewOptions.h:66
PViewOptions::pointType
int pointType
Definition: PViewOptions.h:68
PViewOptions::fakeTransparency
int fakeTransparency
Definition: PViewOptions.h:57
PViewOptions::Ellipse
@ Ellipse
Definition: PViewOptions.h:32
PViewOptions::transform
double transform[3][3]
Definition: PViewOptions.h:50
PViewOptions::arrowSizeMax
double arrowSizeMax
Definition: PViewOptions.h:52
PViewOptions::createGeneralRaise
void createGeneralRaise()
Definition: PViewOptions.cpp:120
SBoundingBox3d.h
PViewOptions::COG
@ COG
Definition: PViewOptions.h:36
PViewOptions::drawQuadrangles
int drawQuadrangles
Definition: PViewOptions.h:64
PViewOptions::hexahedron
unsigned int hexahedron
Definition: PViewOptions.h:87
PViewOptions::genRaiseEvaluator
mathEvaluator * genRaiseEvaluator
Definition: PViewOptions.h:77
PViewOptions::drawTetrahedra
int drawTetrahedra
Definition: PViewOptions.h:65
PViewOptions::rangeType
int rangeType
Definition: PViewOptions.h:59
PViewOptions::background2d
unsigned int background2d
Definition: PViewOptions.h:89
PViewOptions::drawLines
int drawLines
Definition: PViewOptions.h:64
PViewOptions::intervalsType
int intervalsType
Definition: PViewOptions.h:54
PViewOptions::IntervalsType
IntervalsType
Definition: PViewOptions.h:19
PViewOptions::PViewOptions
PViewOptions()
Definition: PViewOptions.cpp:13
PViewOptions::forceNumComponents
int forceNumComponents
Definition: PViewOptions.h:81
PViewOptions::prism
unsigned int prism
Definition: PViewOptions.h:87
PViewOptions::saturateValues
int saturateValues
Definition: PViewOptions.h:57
PViewOptions::Frame
@ Frame
Definition: PViewOptions.h:34
PViewOptions::format
std::string format
Definition: PViewOptions.h:42
PViewOptions::PlotType
PlotType
Definition: PViewOptions.h:18
PViewOptions::MinEigenValue
@ MinEigenValue
Definition: PViewOptions.h:30
PViewOptions::~PViewOptions
~PViewOptions()
Definition: PViewOptions.cpp:20
PViewOptions::VonMises
@ VonMises
Definition: PViewOptions.h:28
PViewOptions::attributes
std::string attributes
Definition: PViewOptions.h:83
PViewOptions::maxRecursionLevel
int maxRecursionLevel
Definition: PViewOptions.h:78
PViewOptions::Arrow
@ Arrow
Definition: PViewOptions.h:22
PViewOptions::targetError
double targetError
Definition: PViewOptions.h:79
PViewOptions::Plot2D
@ Plot2D
Definition: PViewOptions.h:18
PViewOptions::Displacement
@ Displacement
Definition: PViewOptions.h:25
Segment
Definition: DivideAndConquer.h:55
PViewOptions::drawHexahedra
int drawHexahedra
Definition: PViewOptions.h:65
PViewOptions::tangents
unsigned int tangents
Definition: PViewOptions.h:88
PViewOptions::customMin
double customMin
Definition: PViewOptions.h:47
PViewOptions::showTime
int showTime
Definition: PViewOptions.h:58
PViewOptions::genRaiseY
std::string genRaiseY
Definition: PViewOptions.h:76
PViewOptions::genRaiseX
std::string genRaiseX
Definition: PViewOptions.h:76
PViewOptions::scaleType
int scaleType
Definition: PViewOptions.h:59
PViewOptions::Plot2DTime
@ Plot2DTime
Definition: PViewOptions.h:18
PViewOptions::type
int type
Definition: PViewOptions.h:40
PViewOptions::reference
static PViewOptions * reference()
Definition: PViewOptions.cpp:27
PViewOptions::Linear
@ Linear
Definition: PViewOptions.h:38
PViewOptions::Ellipsoid
@ Ellipsoid
Definition: PViewOptions.h:33
PViewOptions::adaptVisualizationGrid
int adaptVisualizationGrid
Definition: PViewOptions.h:78
PViewOptions::PerTimeStep
@ PerTimeStep
Definition: PViewOptions.h:37
PViewOptions::normals
double normals
Definition: PViewOptions.h:53
PViewOptions::autoPosition
int autoPosition
Definition: PViewOptions.h:40
PViewOptions::externalMax
double externalMax
Definition: PViewOptions.h:47
PViewOptions::Discrete
@ Discrete
Definition: PViewOptions.h:19
PViewOptions::axesFormat
std::string axesFormat[3]
Definition: PViewOptions.h:45
PViewOptions::customAbscissaMin
double customAbscissaMin
Definition: PViewOptions.h:48
PViewOptions::getScaleIndex
int getScaleIndex(double val, int numIso, double min, double max, bool forceLinear=false)
Definition: PViewOptions.cpp:64
PViewOptions::triangle
unsigned int triangle
Definition: PViewOptions.h:86
PViewOptions::boundary
int boundary
Definition: PViewOptions.h:68
PViewOptions::axesMikado
int axesMikado
Definition: PViewOptions.h:43
PViewOptions::lineType
int lineType
Definition: PViewOptions.h:68
GmshColorTable
Definition: ColorTable.h:16
PViewOptions::drawPoints
int drawPoints
Definition: PViewOptions.h:64
PViewOptions
Definition: PViewOptions.h:16
PViewOptions::doubleClickedCommand
std::string doubleClickedCommand
Definition: PViewOptions.h:83
PViewOptions::vectorType
int vectorType
Definition: PViewOptions.h:60
PViewOptions::componentMap
int componentMap[9]
Definition: PViewOptions.h:81
PViewOptions::drawTensors
int drawTensors
Definition: PViewOptions.h:67
PViewOptions::drawPyramids
int drawPyramids
Definition: PViewOptions.h:65
PViewOptions::clip
int clip
Definition: PViewOptions.h:80
PViewOptions::axes
int axes
Definition: PViewOptions.h:43
PViewOptions::Continuous
@ Continuous
Definition: PViewOptions.h:19
PViewOptions::text3d
unsigned int text3d
Definition: PViewOptions.h:89
PViewOptions::getScaleValue
double getScaleValue(int iso, int numIso, double min, double max)
Definition: PViewOptions.cpp:33
PViewOptions::axesAutoPosition
int axesAutoPosition
Definition: PViewOptions.h:43
PViewOptions::Logarithmic
@ Logarithmic
Definition: PViewOptions.h:38
PViewOptions::tmpMin
double tmpMin
Definition: PViewOptions.h:47
PViewOptions::Custom
@ Custom
Definition: PViewOptions.h:37
PViewOptions::drawPrisms
int drawPrisms
Definition: PViewOptions.h:65
PViewOptions::position
double position[2]
Definition: PViewOptions.h:41
PViewOptions::viewIndexForGenRaise
int viewIndexForGenRaise
Definition: PViewOptions.h:73
PViewOptions::drawStrings
int drawStrings
Definition: PViewOptions.h:63
PViewOptions::drawPolygons
int drawPolygons
Definition: PViewOptions.h:64
PViewOptions::pointSize
double pointSize
Definition: PViewOptions.h:69
PViewOptions::axesLabel
std::string axesLabel[3]
Definition: PViewOptions.h:45
PViewOptions::offset
double offset[3]
Definition: PViewOptions.h:50
PViewOptions::getColor
unsigned int getColor(double val, double min, double max, bool forceLinear=false, int numColors=-1)
Definition: PViewOptions.cpp:86
PViewOptions::DoubleLogarithmic
@ DoubleLogarithmic
Definition: PViewOptions.h:38
PViewOptions::light
int light
Definition: PViewOptions.h:55
SBoundingBox3d
Definition: SBoundingBox3d.h:21
PViewOptions::Pyramid
@ Pyramid
Definition: PViewOptions.h:23
PViewOptions::drawSkinOnly
int drawSkinOnly
Definition: PViewOptions.h:68
PViewOptions::visible
int visible
Definition: PViewOptions.h:54
PViewOptions::GlyphLocation
GlyphLocation
Definition: PViewOptions.h:36
PViewOptions::drawVectors
int drawVectors
Definition: PViewOptions.h:67
PViewOptions::centerGlyphs
int centerGlyphs
Definition: PViewOptions.h:60
PViewOptions::explode
double explode
Definition: PViewOptions.h:51
PViewOptions::Plot3D
@ Plot3D
Definition: PViewOptions.h:18
PViewOptions::point
unsigned int point
Definition: PViewOptions.h:86
PViewOptions::lightTwoSide
int lightTwoSide
Definition: PViewOptions.h:55
PViewOptions::arrowSizeMin
double arrowSizeMin
Definition: PViewOptions.h:52