208 if ( !
gc.testElementGraphicActivity(
this) ) {
213 EASValsSetColor(
gc.getElementColor() );
214 EASValsSetEdgeColor(
gc.getElementEdgeColor() );
215 EASValsSetEdgeFlag(
true);
217 EASValsSetFillStyle(FILL_HOLLOW);
218 p [ 0 ].x = ( FPNum ) this->
giveNode(1)->giveCoordinate(1);
219 p [ 0 ].y = ( FPNum ) this->
giveNode(1)->giveCoordinate(2);
221 p [ 1 ].x = ( FPNum ) this->
giveNode(2)->giveCoordinate(1);
222 p [ 1 ].y = ( FPNum ) this->
giveNode(2)->giveCoordinate(2);
224 p [ 2 ].x = ( FPNum ) this->
giveNode(3)->giveCoordinate(1);
225 p [ 2 ].y = ( FPNum ) this->
giveNode(3)->giveCoordinate(2);
227 p [ 3 ].x = ( FPNum ) this->
giveNode(4)->giveCoordinate(1);
228 p [ 3 ].y = ( FPNum ) this->
giveNode(4)->giveCoordinate(2);
231 go = CreateQuad3D(p);
232 EGWithMaskChangeAttributes(WIDTH_MASK | FILL_MASK | COLOR_MASK | EDGE_COLOR_MASK | EDGE_FLAG_MASK | LAYER_MASK, go);
233 EGAttachObject(go, ( EObjectP )
this);
234 EMAddGraphicsToModel(ESIModel(), go);
242 double defScale =
gc.getDefScale();
244 if ( !
gc.testElementGraphicActivity(
this) ) {
249 EASValsSetColor(
gc.getDeformedElementColor() );
250 EASValsSetEdgeColor(
gc.getElementEdgeColor() );
251 EASValsSetEdgeFlag(
true);
253 EASValsSetFillStyle(FILL_HOLLOW);
254 p [ 0 ].x = ( FPNum ) this->
giveNode(1)->giveUpdatedCoordinate(1, tStep, defScale);
255 p [ 0 ].y = ( FPNum ) this->
giveNode(1)->giveUpdatedCoordinate(2, tStep, defScale);
257 p [ 1 ].x = ( FPNum ) this->
giveNode(2)->giveUpdatedCoordinate(1, tStep, defScale);
258 p [ 1 ].y = ( FPNum ) this->
giveNode(2)->giveUpdatedCoordinate(2, tStep, defScale);
260 p [ 2 ].x = ( FPNum ) this->
giveNode(3)->giveUpdatedCoordinate(1, tStep, defScale);
261 p [ 2 ].y = ( FPNum ) this->
giveNode(3)->giveUpdatedCoordinate(2, tStep, defScale);
263 p [ 3 ].x = ( FPNum ) this->
giveNode(4)->giveUpdatedCoordinate(1, tStep, defScale);
264 p [ 3 ].y = ( FPNum ) this->
giveNode(4)->giveUpdatedCoordinate(2, tStep, defScale);
267 go = CreateQuad3D(p);
268 EGWithMaskChangeAttributes(WIDTH_MASK | FILL_MASK | COLOR_MASK | EDGE_COLOR_MASK | EDGE_FLAG_MASK | LAYER_MASK, go);
269 EMAddGraphicsToModel(ESIModel(), go);
276 int i, indx, result = 0;
280 double s [ 4 ], defScale;
282 if ( !
gc.testElementGraphicActivity(
this) ) {
288 for ( i = 1; i <= 4; i++ ) {
296 indx =
gc.giveIntVarIndx();
298 for ( i = 1; i <= 4; i++ ) {
299 s [ i - 1 ] = v [ i - 1 ].
at(indx);
303 for ( i = 0; i < 4; i++ ) {
304 if (
gc.getInternalVarsDefGeoFlag() ) {
306 defScale =
gc.getDefScale();
307 p [ i ].x = ( FPNum ) this->
giveNode(i + 1)->giveUpdatedCoordinate(1, tStep, defScale);
308 p [ i ].y = ( FPNum ) this->
giveNode(i + 1)->giveUpdatedCoordinate(2, tStep, defScale);
311 p [ i ].x = ( FPNum ) this->
giveNode(i + 1)->giveCoordinate(1);
312 p [ i ].y = ( FPNum ) this->
giveNode(i + 1)->giveCoordinate(2);
318 gc.updateFringeTableMinMax(s, 4);
319 tr = CreateQuadWD3D(p, s [ 0 ], s [ 1 ], s [ 2 ], s [ 3 ]);
320 EGWithMaskChangeAttributes(LAYER_MASK, tr);
321 EMAddGraphicsToModel(ESIModel(), tr);
357 for ( i = 0; i < 4; i++ ) {
358 if (
gc.getInternalVarsDefGeoFlag() ) {
360 defScale =
gc.getDefScale();
361 pp [ i ].x = ( FPNum ) this->
giveNode(i + 1)->giveUpdatedCoordinate(1, tStep, defScale);
362 pp [ i ].y = ( FPNum ) this->
giveNode(i + 1)->giveUpdatedCoordinate(2, tStep, defScale);
365 pp [ i ].x = ( FPNum ) this->
giveNode(i + 1)->giveCoordinate(1);
366 pp [ i ].y = ( FPNum ) this->
giveNode(i + 1)->giveCoordinate(2);
371 for ( i = 0; i < 3; i++ ) {
372 pp [ i + 4 ].x = 0.5 * ( pp [ i ].x + pp [ i + 1 ].x );
373 pp [ i + 4 ].y = 0.5 * ( pp [ i ].y + pp [ i + 1 ].y );
374 pp [ i + 4 ].z = 0.5 * ( pp [ i ].z + pp [ i + 1 ].z );
377 pp [ 7 ].x = 0.5 * ( pp [ 3 ].x + pp [ 0 ].x );
378 pp [ 7 ].y = 0.5 * ( pp [ 3 ].y + pp [ 0 ].y );
379 pp [ 7 ].z = 0.5 * ( pp [ 3 ].z + pp [ 0 ].z );
381 pp [ 8 ].x = 0.25 * ( pp [ 0 ].x + pp [ 1 ].x + pp [ 2 ].x + pp [ 3 ].x );
382 pp [ 8 ].y = 0.25 * ( pp [ 0 ].y + pp [ 1 ].y + pp [ 2 ].y + pp [ 3 ].y );
383 pp [ 8 ].z = 0.25 * ( pp [ 0 ].z + pp [ 1 ].z + pp [ 2 ].z + pp [ 3 ].z );
386 const FloatArray &gpCoords = gp->giveNaturalCoordinates();
387 if ( ( gpCoords.
at(1) > 0. ) && ( gpCoords.
at(2) > 0. ) ) {
392 }
else if ( ( gpCoords.
at(1) < 0. ) && ( gpCoords.
at(2) > 0. ) ) {
397 }
else if ( ( gpCoords.
at(1) < 0. ) && ( gpCoords.
at(2) < 0. ) ) {
409 if (
giveIPValue(v [ 0 ], gp,
gc.giveIntVarType(), tStep) == 0 ) {
413 indx =
gc.giveIntVarIndx();
415 for ( i = 1; i <= 4; i++ ) {
416 s [ i - 1 ] = v [ 0 ].
at(indx);
419 for ( i = 0; i < 4; i++ ) {
420 p [ i ].x = pp [ ind.
at(i + 1) ].x;
421 p [ i ].y = pp [ ind.
at(i + 1) ].y;
422 p [ i ].z = pp [ ind.
at(i + 1) ].z;
425 gc.updateFringeTableMinMax(s, 4);
426 tr = CreateQuadWD3D(p, s [ 0 ], s [ 1 ], s [ 2 ], s [ 3 ]);
427 EGWithMaskChangeAttributes(LAYER_MASK, tr);
428 EMAddGraphicsToModel(ESIModel(), tr);
oofem::oofegGraphicContext gc[OOFEG_LAST_LAYER]
#define OOFEG_VARPLOT_PATTERN_LAYER
#define OOFEG_DEFORMED_GEOMETRY_LAYER
#define OOFEG_DEFORMED_GEOMETRY_WIDTH
#define OOFEG_RAW_GEOMETRY_WIDTH
#define OOFEG_RAW_GEOMETRY_LAYER