44
44
drawContext *ctx = (drawContext*)context;
47
glRasterPos3d(p[0], p[1], p[2]);
48
ctx->drawString("(X0, Y0, Z0)");
47
ctx->drawString("(X0, Y0, Z0)", p[0], p[1], p[2]);
50
49
getPoint(getNbU() - 1, 0, p);
51
glRasterPos3d(p[0], p[1], p[2]);
52
ctx->drawString("(X1, Y1, Z1)");
50
ctx->drawString("(X1, Y1, Z1)", p[0], p[1], p[2]);
55
53
getPoint(0, getNbV() - 1, p);
56
glRasterPos3d(p[0], p[1], p[2]);
57
ctx->drawString("(X2, Y2, Z2)");
54
ctx->drawString("(X2, Y2, Z2)", p[0], p[1], p[2]);
60
57
if(CutGridOptions_Number[11].def){
220
217
double u = getNbU() > 1 ? (double)iU / (double)(getNbU() - 1.) : 0.;
221
218
double v = getNbV() > 1 ? (double)iV / (double)(getNbV() - 1.) : 0.;
222
X[0] = CutGridOptions_Number[0].def +
219
X[0] = CutGridOptions_Number[0].def +
223
220
u * (CutGridOptions_Number[3].def-CutGridOptions_Number[0].def) +
224
221
v * (CutGridOptions_Number[6].def-CutGridOptions_Number[0].def);
225
X[1] = CutGridOptions_Number[1].def +
222
X[1] = CutGridOptions_Number[1].def +
226
223
u * (CutGridOptions_Number[4].def-CutGridOptions_Number[1].def) +
227
224
v * (CutGridOptions_Number[7].def-CutGridOptions_Number[1].def);
228
X[2] = CutGridOptions_Number[2].def +
225
X[2] = CutGridOptions_Number[2].def +
229
226
u * (CutGridOptions_Number[5].def-CutGridOptions_Number[2].def) +
230
227
v * (CutGridOptions_Number[8].def-CutGridOptions_Number[2].def);
233
void GMSH_CutGridPlugin::addInView(int numsteps, int connect, int nbcomp,
234
double ***pnts, double ***vals,
235
std::vector<double> &P, int *nP,
236
std::vector<double> &L, int *nL,
230
void GMSH_CutGridPlugin::addInView(int numsteps, int connect, int nbcomp,
231
double ***pnts, double ***vals,
232
std::vector<double> &P, int *nP,
233
std::vector<double> &L, int *nL,
237
234
std::vector<double> &Q, int *nQ)
239
236
if(!connect || (getNbU() == 1 && getNbV() == 1)){ // generate points
241
238
for(int i = 0; i < getNbU(); ++i){
242
239
for(int j = 0; j < getNbV(); ++j){
243
240
P.push_back(pnts[i][j][0]);
337
334
getPoint(i, j, pnts[i][j]);
342
339
for(int i = 0; i < getNbU(); i++)
343
340
for(int j = 0; j < getNbV(); j++)
344
341
o.searchScalar(pnts[i][j][0], pnts[i][j][1], pnts[i][j][2], vals[i][j]);
345
addInView(numsteps, connect, 1, pnts, vals, data2->SP, &data2->NbSP,
342
addInView(numsteps, connect, 1, pnts, vals, data2->SP, &data2->NbSP,
346
343
data2->SL, &data2->NbSL, data2->SQ, &data2->NbSQ);
358
355
for(int i = 0; i < getNbU(); i++)
359
356
for(int j = 0; j < getNbV(); j++)
360
357
o.searchTensor(pnts[i][j][0], pnts[i][j][1], pnts[i][j][2], vals[i][j]);
361
addInView(numsteps, connect, 9, pnts, vals, data2->TP, &data2->NbTP,
358
addInView(numsteps, connect, 9, pnts, vals, data2->TP, &data2->NbTP,
362
359
data2->TL, &data2->NbTL, data2->TQ, &data2->NbTQ);