本文整理汇总了C++中oofegGraphicContext::getNodeColor方法的典型用法代码示例。如果您正苦于以下问题:C++ oofegGraphicContext::getNodeColor方法的具体用法?C++ oofegGraphicContext::getNodeColor怎么用?C++ oofegGraphicContext::getNodeColor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类oofegGraphicContext
的用法示例。
在下文中一共展示了oofegGraphicContext::getNodeColor方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: drawDeformedGeometry
void CohesiveSurface3d :: drawDeformedGeometry(oofegGraphicContext &gc, TimeStep *tStep, UnknownType type)
{
GraphicObj *go1, *go2;
if ( !gc.testElementGraphicActivity(this) ) {
return;
}
double defScale = gc.getDefScale();
WCRec p [ 2 ];
EASValsSetLineWidth(OOFEG_DEFORMED_GEOMETRY_WIDTH);
EASValsSetColor( gc.getDeformedElementColor() );
EASValsSetLayer(OOFEG_DEFORMED_GEOMETRY_LAYER);
// get the displaced particle coordinates
Particle *nodeA = ( Particle * ) giveNode(1);
Particle *nodeB = ( Particle * ) giveNode(2);
p [ 0 ].x = nodeA->giveUpdatedCoordinate(1, tStep, defScale);
p [ 0 ].y = nodeA->giveUpdatedCoordinate(2, tStep, defScale);
p [ 0 ].z = nodeA->giveUpdatedCoordinate(3, tStep, defScale);
p [ 1 ].x = nodeB->giveUpdatedCoordinate(1, tStep, defScale);
p [ 1 ].y = nodeB->giveUpdatedCoordinate(2, tStep, defScale);
p [ 1 ].z = nodeB->giveUpdatedCoordinate(3, tStep, defScale);
// plot the displaced particles
EASValsSetMType(FILLED_CIRCLE_MARKER);
EASValsSetColor( gc.getNodeColor() );
EASValsSetMSize(6);
// plot the first particle
go1 = CreateMarker3D(p);
EGWithMaskChangeAttributes(COLOR_MASK | LAYER_MASK | MTYPE_MASK | MSIZE_MASK, go1);
EMAddGraphicsToModel(ESIModel(), go1);
// take into account periodic conditions
if ( giveNumberOfNodes() == 3 ) {
Node *nodeC = ( Particle * ) giveNode(3);
p [ 1 ].x += kxa + kxa * defScale * ( nodeC->giveDofWithID(D_u)->giveUnknown(VM_Total, tStep) ) + kyb * defScale * ( nodeC->giveDofWithID(R_u)->giveUnknown(VM_Total, tStep) );
p [ 1 ].y += kyb + kyb * defScale * ( nodeC->giveDofWithID(D_v)->giveUnknown(VM_Total, tStep) ) + kzc * defScale * ( nodeC->giveDofWithID(R_v)->giveUnknown(VM_Total, tStep) );
p [ 1 ].z += kzc + kzc * defScale * ( nodeC->giveDofWithID(D_w)->giveUnknown(VM_Total, tStep) ) + kxa * defScale * ( nodeC->giveDofWithID(R_w)->giveUnknown(VM_Total, tStep) );
EASValsSetMType(CIRCLE_MARKER);
}
// plot the second particle
go2 = CreateMarker3D(p + 1);
EGWithMaskChangeAttributes(COLOR_MASK | LAYER_MASK | MTYPE_MASK | MSIZE_MASK, go2);
EMAddGraphicsToModel(ESIModel(), go2);
}