本文整理汇总了C++中GEdge::setColor方法的典型用法代码示例。如果您正苦于以下问题:C++ GEdge::setColor方法的具体用法?C++ GEdge::setColor怎么用?C++ GEdge::setColor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GEdge
的用法示例。
在下文中一共展示了GEdge::setColor方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: importGEOInternals
int GModel::importGEOInternals()
{
if(Tree_Nbr(_geo_internals->Points)) {
List_T *points = Tree2List(_geo_internals->Points);
for(int i = 0; i < List_Nbr(points); i++){
Vertex *p;
List_Read(points, i, &p);
GVertex *v = getVertexByTag(p->Num);
if(!v){
v = new gmshVertex(this, p);
add(v);
}
if(!p->Visible) v->setVisibility(0);
}
List_Delete(points);
}
if(Tree_Nbr(_geo_internals->Curves)) {
List_T *curves = Tree2List(_geo_internals->Curves);
for(int i = 0; i < List_Nbr(curves); i++){
Curve *c;
List_Read(curves, i, &c);
if(c->Num >= 0){
GEdge *e = getEdgeByTag(c->Num);
if(!e && c->Typ == MSH_SEGM_COMPOUND){
std::vector<GEdge*> comp;
for(unsigned int j = 0; j < c->compound.size(); j++){
GEdge *ge = getEdgeByTag(c->compound[j]);
if(ge) comp.push_back(ge);
}
e = new GEdgeCompound(this, c->Num, comp);
e->meshAttributes.method = c->Method;
e->meshAttributes.nbPointsTransfinite = c->nbPointsTransfinite;
e->meshAttributes.typeTransfinite = c->typeTransfinite;
e->meshAttributes.coeffTransfinite = c->coeffTransfinite;
e->meshAttributes.extrude = c->Extrude;
e->meshAttributes.reverseMesh = c->ReverseMesh;
add(e);
}
else if(!e && c->beg && c->end){
e = new gmshEdge(this, c,
getVertexByTag(c->beg->Num),
getVertexByTag(c->end->Num));
add(e);
}
else if(!e){
e = new gmshEdge(this, c, 0, 0);
add(e);
}
if(!c->Visible) e->setVisibility(0);
if(c->Color.type) e->setColor(c->Color.mesh);
if(c->degenerated) {
e->setTooSmall(true);
}
}
}
List_Delete(curves);
}
if(Tree_Nbr(_geo_internals->Surfaces)) {
List_T *surfaces = Tree2List(_geo_internals->Surfaces);
for(int i = 0; i < List_Nbr(surfaces); i++){
Surface *s;
List_Read(surfaces, i, &s);
GFace *f = getFaceByTag(s->Num);
if(!f && s->Typ == MSH_SURF_COMPOUND){
std::list<GFace*> comp;
for(unsigned int j = 0; j < s->compound.size(); j++){
GFace *gf = getFaceByTag(s->compound[j]);
if(gf)
comp.push_back(gf);
}
std::list<GEdge*> b[4];
for(int j = 0; j < 4; j++){
for(unsigned int k = 0; k < s->compoundBoundary[j].size(); k++){
GEdge *ge = getEdgeByTag(s->compoundBoundary[j][k]);
if(ge) b[j].push_back(ge);
}
}
int param = CTX::instance()->mesh.remeshParam;
GFaceCompound::typeOfCompound typ = GFaceCompound::HARMONIC_CIRCLE;
if (param == 1) typ = GFaceCompound::CONFORMAL_SPECTRAL;
if (param == 2) typ = GFaceCompound::RADIAL_BASIS;
if (param == 3) typ = GFaceCompound::HARMONIC_PLANE;
if (param == 4) typ = GFaceCompound::CONVEX_CIRCLE;
if (param == 5) typ = GFaceCompound::CONVEX_PLANE;
if (param == 6) typ = GFaceCompound::HARMONIC_SQUARE;
if (param == 7) typ = GFaceCompound::CONFORMAL_FE;
int algo = CTX::instance()->mesh.remeshAlgo;
f = new GFaceCompound(this, s->Num, comp, b[0], b[1], b[2], b[3], typ, algo);
f->meshAttributes.recombine = s->Recombine;
f->meshAttributes.recombineAngle = s->RecombineAngle;
f->meshAttributes.method = s->Method;
f->meshAttributes.extrude = s->Extrude;
// transfinite import Added by Trevor Strickler. This helps when experimenting
// to create compounds from transfinite surfs. Not having it does not break
// anything Gmsh *officially* does right now, but maybe it was left out by mistake??? and could
//.........这里部分代码省略.........