本文整理汇总了C++中oofegGraphicContext::getStandardSparseProfileColor方法的典型用法代码示例。如果您正苦于以下问题:C++ oofegGraphicContext::getStandardSparseProfileColor方法的具体用法?C++ oofegGraphicContext::getStandardSparseProfileColor怎么用?C++ oofegGraphicContext::getStandardSparseProfileColor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类oofegGraphicContext
的用法示例。
在下文中一共展示了oofegGraphicContext::getStandardSparseProfileColor方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: drawScalar
void
Quad10_2D_SUPG :: drawScalar(oofegGraphicContext &gc, TimeStep *tStep)
{
int i, indx, result = 0;
WCRec p [ 3 ];
GraphicObj *tr;
FloatArray v1, v2, v3;
double s [ 3 ];
if ( !gc.testElementGraphicActivity(this) ) {
return;
}
EASValsSetLayer(OOFEG_VARPLOT_PATTERN_LAYER);
// if ((gc.giveIntVarMode() == ISM_local) && (gc.giveIntVarType() == IST_VOFFraction)) {
if ( ( gc.giveIntVarType() == IST_VOFFraction ) && ( gc.giveIntVarMode() == ISM_local ) ) {
Polygon matvolpoly;
//this->formMaterialVolumePoly(matvolpoly, NULL, temp_normal, temp_p, false);
EASValsSetColor( gc.getStandardSparseProfileColor() );
//GraphicObj *go = matvolpoly.draw(gc,true,OOFEG_VARPLOT_PATTERN_LAYER);
matvolpoly.draw(gc, true, OOFEG_VARPLOT_PATTERN_LAYER);
return;
}
if ( gc.giveIntVarMode() == ISM_recovered ) {
result += this->giveInternalStateAtNode(v1, gc.giveIntVarType(), gc.giveIntVarMode(), 1, tStep);
result += this->giveInternalStateAtNode(v2, gc.giveIntVarType(), gc.giveIntVarMode(), 2, tStep);
result += this->giveInternalStateAtNode(v3, gc.giveIntVarType(), gc.giveIntVarMode(), 3, tStep);
} else if ( gc.giveIntVarMode() == ISM_local ) {
GaussPoint *gp = integrationRulesArray [ 0 ]->getIntegrationPoint(0);
result += giveIPValue(v1, gp, gc.giveIntVarType(), tStep);
v2 = v1;
v3 = v1;
result *= 3;
}
if ( result != 3 ) {
return;
}
indx = gc.giveIntVarIndx();
s [ 0 ] = v1.at(indx);
s [ 1 ] = v2.at(indx);
s [ 2 ] = v3.at(indx);
EASValsSetLayer(OOFEG_VARPLOT_PATTERN_LAYER);
if ( gc.getScalarAlgo() == SA_ISO_SURF ) {
for ( i = 0; i < 3; i++ ) {
p [ i ].x = ( FPNum ) this->giveNode(i + 1)->giveCoordinate(1);
p [ i ].y = ( FPNum ) this->giveNode(i + 1)->giveCoordinate(2);
p [ i ].z = 0.;
}
//EASValsSetColor(gc.getYieldPlotColor(ratio));
gc.updateFringeTableMinMax(s, 3);
tr = CreateTriangleWD3D(p, s [ 0 ], s [ 1 ], s [ 2 ]);
EGWithMaskChangeAttributes(LAYER_MASK, tr);
EMAddGraphicsToModel(ESIModel(), tr);
} else if ( ( gc.getScalarAlgo() == SA_ZPROFILE ) || ( gc.getScalarAlgo() == SA_COLORZPROFILE ) ) {
double landScale = gc.getLandScale();
for ( i = 0; i < 3; i++ ) {
p [ i ].x = ( FPNum ) this->giveNode(i + 1)->giveCoordinate(1);
p [ i ].y = ( FPNum ) this->giveNode(i + 1)->giveCoordinate(2);
p [ i ].z = s [ i ] * landScale;
}
if ( gc.getScalarAlgo() == SA_ZPROFILE ) {
EASValsSetColor( gc.getDeformedElementColor() );
EASValsSetLineWidth(OOFEG_DEFORMED_GEOMETRY_WIDTH);
EASValsSetFillStyle(FILL_SOLID);
tr = CreateTriangle3D(p);
EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | FILL_MASK | LAYER_MASK, tr);
} else {
gc.updateFringeTableMinMax(s, 3);
EASValsSetFillStyle(FILL_SOLID);
tr = CreateTriangleWD3D(p, s [ 0 ], s [ 1 ], s [ 2 ]);
EGWithMaskChangeAttributes(FILL_MASK | LAYER_MASK, tr);
}
EMAddGraphicsToModel(ESIModel(), tr);
}
}