本文整理汇总了C++中oofegGraphicContext::getElementColor方法的典型用法代码示例。如果您正苦于以下问题:C++ oofegGraphicContext::getElementColor方法的具体用法?C++ oofegGraphicContext::getElementColor怎么用?C++ oofegGraphicContext::getElementColor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类oofegGraphicContext
的用法示例。
在下文中一共展示了oofegGraphicContext::getElementColor方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: drawRawGeometry
void
TR_SHELL02 :: drawRawGeometry(oofegGraphicContext &gc, TimeStep *tStep)
{
WCRec p [ 3 ];
GraphicObj *go;
if ( !gc.testElementGraphicActivity(this) ) {
return;
}
if ( this->giveMaterial()->isActivated(tStep) ) {
EASValsSetLineWidth(OOFEG_RAW_GEOMETRY_WIDTH);
EASValsSetColor( gc.getElementColor() );
EASValsSetEdgeColor( gc.getElementEdgeColor() );
EASValsSetEdgeFlag(true);
EASValsSetFillStyle(FILL_SOLID);
EASValsSetLayer(OOFEG_RAW_GEOMETRY_LAYER);
p [ 0 ].x = ( FPNum ) this->giveNode(1)->giveCoordinate(1);
p [ 0 ].y = ( FPNum ) this->giveNode(1)->giveCoordinate(2);
p [ 0 ].z = ( FPNum ) this->giveNode(1)->giveCoordinate(3);
p [ 1 ].x = ( FPNum ) this->giveNode(2)->giveCoordinate(1);
p [ 1 ].y = ( FPNum ) this->giveNode(2)->giveCoordinate(2);
p [ 1 ].z = ( FPNum ) this->giveNode(2)->giveCoordinate(3);
p [ 2 ].x = ( FPNum ) this->giveNode(3)->giveCoordinate(1);
p [ 2 ].y = ( FPNum ) this->giveNode(3)->giveCoordinate(2);
p [ 2 ].z = ( FPNum ) this->giveNode(3)->giveCoordinate(3);
go = CreateTriangle3D(p);
EGWithMaskChangeAttributes(WIDTH_MASK | FILL_MASK | COLOR_MASK | EDGE_COLOR_MASK | EDGE_FLAG_MASK | LAYER_MASK, go);
EGAttachObject(go, ( EObjectP ) this);
EMAddGraphicsToModel(ESIModel(), go);
}
}
示例2: drawRawGeometry
void InterfaceElem2dQuad :: drawRawGeometry(oofegGraphicContext &gc, TimeStep *tStep)
{
GraphicObj *go;
// if (!go) { // create new one
WCRec p [ 2 ]; /* poin */
if ( !gc.testElementGraphicActivity(this) ) {
return;
}
EASValsSetLineWidth(OOFEG_RAW_GEOMETRY_WIDTH);
EASValsSetColor( gc.getElementColor() );
EASValsSetLayer(OOFEG_RAW_GEOMETRY_LAYER);
p [ 0 ].x = ( FPNum ) this->giveNode(1)->giveCoordinate(1);
p [ 0 ].y = ( FPNum ) this->giveNode(1)->giveCoordinate(2);
p [ 0 ].z = 0.0;
p [ 1 ].x = ( FPNum ) this->giveNode(3)->giveCoordinate(1);
p [ 1 ].y = ( FPNum ) this->giveNode(3)->giveCoordinate(2);
p [ 1 ].z = 0.0;
go = CreateLine3D(p);
EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | LAYER_MASK, go);
EGAttachObject(go, ( EObjectP ) this);
EMAddGraphicsToModel(ESIModel(), go);
p [ 0 ].x = ( FPNum ) this->giveNode(3)->giveCoordinate(1);
p [ 0 ].y = ( FPNum ) this->giveNode(3)->giveCoordinate(2);
p [ 0 ].z = 0.0;
p [ 1 ].x = ( FPNum ) this->giveNode(2)->giveCoordinate(1);
p [ 1 ].y = ( FPNum ) this->giveNode(2)->giveCoordinate(2);
p [ 1 ].z = 0.0;
go = CreateLine3D(p);
EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | LAYER_MASK, go);
EGAttachObject(go, ( EObjectP ) this);
EMAddGraphicsToModel(ESIModel(), go);
}
示例3: drawRawGeometry
void QTrPlaneStrain :: drawRawGeometry(oofegGraphicContext &gc)
{
WCRec p [ 3 ];
GraphicObj *go;
if ( !gc.testElementGraphicActivity(this) ) {
return;
}
EASValsSetLineWidth(OOFEG_RAW_GEOMETRY_WIDTH);
EASValsSetColor( gc.getElementColor() );
EASValsSetEdgeColor( gc.getElementEdgeColor() );
EASValsSetEdgeFlag(true);
EASValsSetLayer(OOFEG_RAW_GEOMETRY_LAYER);
p [ 0 ].x = ( FPNum ) this->giveNode(1)->giveCoordinate(1);
p [ 0 ].y = ( FPNum ) this->giveNode(1)->giveCoordinate(2);
p [ 0 ].z = 0.;
p [ 1 ].x = ( FPNum ) this->giveNode(2)->giveCoordinate(1);
p [ 1 ].y = ( FPNum ) this->giveNode(2)->giveCoordinate(2);
p [ 1 ].z = 0.;
p [ 2 ].x = ( FPNum ) this->giveNode(3)->giveCoordinate(1);
p [ 2 ].y = ( FPNum ) this->giveNode(3)->giveCoordinate(2);
p [ 2 ].z = 0.;
go = CreateTriangle3D(p);
EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | EDGE_COLOR_MASK | EDGE_FLAG_MASK | LAYER_MASK, go);
EGAttachObject(go, ( EObjectP ) this);
EMAddGraphicsToModel(ESIModel(), go);
}
示例4: drawRawGeometry
void Brick1_ht :: drawRawGeometry(oofegGraphicContext &gc)
{
WCRec p [ 8 ];
GraphicObj *go;
if ( !gc.testElementGraphicActivity(this) ) {
return;
}
EASValsSetLineWidth(OOFEG_RAW_GEOMETRY_WIDTH);
EASValsSetColor( gc.getElementColor() );
EASValsSetEdgeColor( gc.getElementEdgeColor() );
EASValsSetEdgeFlag(true);
EASValsSetLayer(OOFEG_RAW_GEOMETRY_LAYER);
EASValsSetFillStyle(FILL_SOLID);
for ( int i = 0; i < 8; i++ ) {
p [ i ].x = ( FPNum ) this->giveNode(i + 1)->giveCoordinate(1);
p [ i ].y = ( FPNum ) this->giveNode(i + 1)->giveCoordinate(2);
p [ i ].z = ( FPNum ) this->giveNode(i + 1)->giveCoordinate(3);
}
go = CreateHexahedron(p);
EGWithMaskChangeAttributes(WIDTH_MASK | FILL_MASK | COLOR_MASK | EDGE_COLOR_MASK | EDGE_FLAG_MASK | LAYER_MASK, go);
EGAttachObject(go, ( EObjectP ) this);
EMAddGraphicsToModel(ESIModel(), go);
}
示例5: drawRawGeometry
void CohesiveSurface3d :: drawRawGeometry(oofegGraphicContext &gc, TimeStep *tStep)
{
if ( !gc.testElementGraphicActivity(this) ) {
return;
}
//WCRec p[4];
GraphicObj *go;
Particle *nodeA = ( Particle * ) this->giveNode(1);
Particle *nodeB = ( Particle * ) this->giveNode(2);
//double rA = nodeA -> giveRadius();
//double rB = nodeB -> giveRadius();
//double r = (rA+rB)/4.;
EASValsSetLineWidth(OOFEG_RAW_GEOMETRY_WIDTH);
EASValsSetColor( gc.getElementColor() );
EASValsSetEdgeColor( gc.getElementEdgeColor() );
EASValsSetEdgeFlag(true);
EASValsSetLayer(OOFEG_RAW_GEOMETRY_LAYER);
WCRec pl [ 2 ];
// determine coordinates of the particles connected by this element
pl [ 0 ].x = ( FPNum ) nodeA->giveCoordinate(1);
pl [ 0 ].y = ( FPNum ) nodeA->giveCoordinate(2);
pl [ 0 ].z = ( FPNum ) nodeA->giveCoordinate(3);
pl [ 1 ].x = ( FPNum ) nodeB->giveCoordinate(1);
pl [ 1 ].y = ( FPNum ) nodeB->giveCoordinate(2);
pl [ 1 ].z = ( FPNum ) nodeB->giveCoordinate(3);
if ( giveNumberOfNodes() == 3 ) {
// the second particle should be shifted (periodic arrangement)
Particle *nodeC = ( Particle * ) this->giveNode(3);
pl [ 1 ].x += kx * ( nodeC->giveCoordinate(1) );
pl [ 1 ].y += ky * ( nodeC->giveCoordinate(2) );
pl [ 1 ].z += kz * ( nodeC->giveCoordinate(3) );
}
// plot a line segment connecting the particles
go = CreateLine3D(pl);
EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | LAYER_MASK, go);
EGAttachObject(go, ( EObjectP ) this);
EMAddGraphicsToModel(ESIModel(), go);
}
示例6: drawRawGeometry
void Truss2d :: drawRawGeometry(oofegGraphicContext &gc)
{
int c1, c2;
resolveCoordIndices(c1, c2);
GraphicObj *go;
// if (!go) { // create new one
WCRec p [ 2 ]; /* point */
if ( !gc.testElementGraphicActivity(this) ) {
return;
}
EASValsSetLineWidth(OOFEG_RAW_GEOMETRY_WIDTH);
EASValsSetColor( gc.getElementColor() );
EASValsSetLayer(OOFEG_RAW_GEOMETRY_LAYER);
if ( cs_mode == 0 ) {
p [ 0 ].x = ( FPNum ) this->giveNode(1)->giveCoordinate(c1);
p [ 0 ].y = 0.;
p [ 0 ].z = ( FPNum ) this->giveNode(1)->giveCoordinate(c2);
p [ 1 ].x = ( FPNum ) this->giveNode(2)->giveCoordinate(c1);
p [ 1 ].y = 0.;
p [ 1 ].z = ( FPNum ) this->giveNode(2)->giveCoordinate(c2);
} else if ( cs_mode == 1 ) {
p [ 0 ].x = ( FPNum ) this->giveNode(1)->giveCoordinate(c1);
p [ 0 ].y = ( FPNum ) this->giveNode(1)->giveCoordinate(c2);
p [ 0 ].z = 0.;
p [ 1 ].x = ( FPNum ) this->giveNode(2)->giveCoordinate(c1);
p [ 1 ].y = ( FPNum ) this->giveNode(2)->giveCoordinate(c2);
p [ 1 ].z = 0.;
} else if ( cs_mode == 2 ) {
p [ 0 ].x = 0.;
p [ 0 ].y = ( FPNum ) this->giveNode(1)->giveCoordinate(c1);
p [ 0 ].z = ( FPNum ) this->giveNode(1)->giveCoordinate(c2);
p [ 1 ].x = 0.;
p [ 1 ].y = ( FPNum ) this->giveNode(2)->giveCoordinate(c1);
p [ 1 ].z = ( FPNum ) this->giveNode(2)->giveCoordinate(c2);
}
go = CreateLine3D(p);
EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | LAYER_MASK, go);
EGAttachObject(go, ( EObjectP ) this);
EMAddGraphicsToModel(ESIModel(), go);
}
示例7: drawRawGeometry
void LumpedMassElement :: drawRawGeometry(oofegGraphicContext &gc)
{
GraphicObj *go;
WCRec p [ 1 ]; /* point */
if ( !gc.testElementGraphicActivity(this) ) {
return;
}
EASValsSetColor( gc.getElementColor() );
EASValsSetLayer(OOFEG_RAW_GEOMETRY_LAYER);
EASValsSetMType(SQUARE_MARKER);
EASValsSetMSize(8);
p [ 0 ].x = ( FPNum ) this->giveNode(1)->giveCoordinate(1);
p [ 0 ].y = ( FPNum ) this->giveNode(1)->giveCoordinate(2);
p [ 0 ].z = ( FPNum ) this->giveNode(1)->giveCoordinate(3);
go = CreateMarker3D(p);
EGWithMaskChangeAttributes(COLOR_MASK | LAYER_MASK | MTYPE_MASK | MSIZE_MASK, go);
EGAttachObject(go, ( EObjectP ) this);
EMAddGraphicsToModel(ESIModel(), go);
}
示例8: drawRawGeometry
void IntElPoint :: drawRawGeometry(oofegGraphicContext &gc, TimeStep *tStep)
{
GraphicObj *go;
// if (!go) { // create new one
WCRec p [ 1 ]; /* poin */
if ( !gc.testElementGraphicActivity(this) ) {
return;
}
EASValsSetColor( gc.getElementColor() );
EASValsSetLayer(OOFEG_RAW_GEOMETRY_LAYER);
EASValsSetLineWidth(OOFEG_DEFORMED_GEOMETRY_WIDTH);
EASValsSetColor( gc.getDeformedElementColor() );
p [ 0 ].x = ( FPNum ) ( this->giveNode(1)->giveCoordinate(1) );
p [ 0 ].y = ( FPNum ) ( this->giveNode(1)->giveCoordinate(2) );
p [ 0 ].z = ( FPNum ) ( this->giveNode(1)->giveCoordinate(3) );
EASValsSetMType(CIRCLE_MARKER);
go = CreateMarker3D(p);
EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | LAYER_MASK, go);
EMAddGraphicsToModel(ESIModel(), go);
}