gmsh-TingyuanDoc
0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
|
Go to the documentation of this file.
7 #include "GmshConfig.h"
11 #if defined(HAVE_OPENGL)
35 #if defined(HAVE_OPENGL)
41 return (
double)((align << 16) | (font << 8) | (fontsize));
46 #if defined(HAVE_OPENGL)
59 glVertex3d(X - d, Y, Z);
60 glVertex3d(X + d, Y, Z);
61 glVertex3d(X, Y - d, Z);
62 glVertex3d(X, Y + d, Z);
63 glVertex3d(X, Y, Z - d);
64 glVertex3d(X, Y, Z + d);
69 glGetDoublev(GL_PROJECTION_MATRIX,
projection);
70 glGetDoublev(GL_MODELVIEW_MATRIX, modelview);
72 glMatrixMode(GL_PROJECTION);
76 glMatrixMode(GL_MODELVIEW);
82 glVertex2d(X - 10, Y);
83 glVertex2d(X + 10, Y);
84 glVertex2d(X, Y - 10);
85 glVertex2d(X, Y + 10);
88 glMatrixMode(GL_PROJECTION);
90 glMatrixMode(GL_MODELVIEW);
91 glLoadMatrixd(modelview);
97 double *opt,
double step,
double min,
112 const std::string &value,
162 const std::string &value)
168 const std::string &value)
174 const std::string &value)
181 return "Plugin(Annotate) adds the text string `Text', "
182 "in font `Font' and size `FontSize', in the view "
183 "`View'. The string is aligned according to `Align'.\n\n"
184 "If `ThreeD' is equal to 1, the plugin inserts "
185 "the string in model coordinates at the position "
186 "(`X',`Y',`Z'). If `ThreeD' is equal to 0, the plugin "
187 "inserts the string in screen coordinates at "
188 "the position (`X',`Y').\n\n"
189 "If `View' < 0, the plugin is run on the current view.\n\n"
190 "Plugin(Annotate) is executed in-place for list-based "
191 "datasets or creates a new list-based view for other datasets.";
236 data2->
T3D.push_back(X);
237 data2->
T3D.push_back(Y);
238 data2->
T3D.push_back(Z);
239 data2->
T3D.push_back(style);
240 data2->
T3D.push_back(data2->
T3C.size());
241 for(std::size_t i = 0; i < text.size(); i++) data2->
T3C.push_back(text[i]);
242 data2->
T3C.push_back(
'\0');
246 data2->
T2D.push_back(X);
247 data2->
T2D.push_back(Y);
248 data2->
T2D.push_back(style);
249 data2->
T2D.push_back(data2->
T2C.size());
250 for(std::size_t i = 0; i < text.size(); i++) data2->
T2C.push_back(text[i]);
251 data2->
T2C.push_back(
'\0');
int fix2dCoordinates(double *x, double *y)
virtual int getFontAlign(const char *alignstr)
std::vector< double > T3D
virtual int getNumTimeSteps()=0
static double callbackX(int, int, double)
StringXString * getOptionStr(int iopt)
static void(* draw)(void *)
StringXNumber * getOption(int iopt)
void drawString(const std::string &s, double x, double y, double z, const std::string &font_name, int font_enum, int font_size, int align, int line_num=0)
StringXString AnnotateOptions_String[]
static double projection(SPoint3 &p1, SPoint3 &p2, SPoint3 &q, SPoint3 &result)
static double callback(int num, int action, double value, double *opt, double step, double min, double max)
virtual void setFileName(const std::string &val)
static drawContextGlobal * global()
static std::string callbackFont(int, int, const std::string &)
virtual double getTime(int step)
virtual int getFontIndex(const char *fontname)
PViewData * getData(bool useAdaptiveIfAvailable=false)
bool finalize(bool computeMinMax=true, const std::string &interpolationScheme="")
virtual void setName(const std::string &val)
StringXNumber AnnotateOptions_Number[]
std::vector< double > T2D
static double callback3D(int, int, double)
static void setDrawFunction(void(*fct)(void *))
virtual PView * getView(int index, PView *view)
std::vector< double > Time
int getNbOptionsStr() const
static std::string callbackText(int, int, const std::string &)
static double callbackY(int, int, double)
static double callbackFontSize(int, int, double)
static std::string callbackStr(int num, int action, const std::string &value, std::string &opt)
virtual std::string getName()
std::string getHelp() const
static std::string callbackAlign(int, int, const std::string &)
static double callbackZ(int, int, double)
virtual PViewDataList * getDataList(PView *view, bool showError=true)
GMSH_Plugin * GMSH_RegisterAnnotatePlugin()