Skip to content
Snippets Groups Projects
Select Git revision
  • 0cadbb0a65214c9bfbf418f87c716b7827526359
  • master default protected
  • alphashapes
  • quadMeshingTools
  • cygwin_conv_path
  • macos_arm64
  • add-transfiniteautomatic-to-geo
  • patch_releases_4_10
  • HierarchicalHDiv
  • isuruf-master-patch-63355
  • hyperbolic
  • hexdom
  • hxt_update
  • jf
  • 1618-pythonocc-and-gmsh-api-integration
  • octreeSizeField
  • hexbl
  • alignIrregularVertices
  • getEdges
  • patch_releases_4_8
  • isuruf-master-patch-51992
  • gmsh_4_11_0
  • gmsh_4_10_5
  • gmsh_4_10_4
  • gmsh_4_10_3
  • gmsh_4_10_2
  • gmsh_4_10_1
  • gmsh_4_10_0
  • gmsh_4_9_5
  • gmsh_4_9_4
  • gmsh_4_9_3
  • gmsh_4_9_2
  • gmsh_4_9_1
  • gmsh_4_9_0
  • gmsh_4_8_4
  • gmsh_4_8_3
  • gmsh_4_8_2
  • gmsh_4_8_1
  • gmsh_4_8_0
  • gmsh_4_7_1
  • gmsh_4_7_0
41 results

linearSystem.h

Blame
  • Forked from gmsh / gmsh
    Source project has a limited visibility.
    drawGeom.cpp 17.43 KiB
    // Gmsh - Copyright (C) 1997-2009 C. Geuzaine, J.-F. Remacle
    //
    // See the LICENSE.txt file for license information. Please report all
    // bugs and problems to <gmsh@geuz.org>.
    
    #include "drawContext.h"
    #include "Context.h"
    #include "gl2ps.h"
    #include "VertexArray.h"
    #include "GModel.h"
    #include "SBoundingBox3d.h"
    #include "GmshMessage.h"
    
    class drawGVertex {
     private :
      drawContext *_ctx;
     public :
      drawGVertex(drawContext *ctx) : _ctx(ctx){}
      void operator () (GVertex *v)
      {
        if(!v->getVisibility()) return;
        if(v->geomType() == GEntity::BoundaryLayerPoint) return;
    
        bool select = (_ctx->render_mode == drawContext::GMSH_SELECT && 
                       v->model() == GModel::current());
        if(select) {
          glPushName(0);
          glPushName(v->tag());
        }
        
        if(v->getSelection()) {
          glPointSize((float)CTX::instance()->geom.selectedPointSize);
          gl2psPointSize((float)(CTX::instance()->geom.selectedPointSize * 
                                 CTX::instance()->print.epsPointSizeFactor));
          glColor4ubv((GLubyte *) & CTX::instance()->color.geom.selection);
        }
        else {
          glPointSize((float)CTX::instance()->geom.pointSize);
          gl2psPointSize((float)(CTX::instance()->geom.pointSize *
                                 CTX::instance()->print.epsPointSizeFactor));
          glColor4ubv((GLubyte *) & CTX::instance()->color.geom.point);
        }
        
        if(CTX::instance()->geom.highlightOrphans){
          std::list<GEdge*> edges = v->edges();
          if(edges.size() == 0)
            glColor4ubv((GLubyte *) & CTX::instance()->color.geom.highlight[0]);
          else if(edges.size() == 1)
            glColor4ubv((GLubyte *) & CTX::instance()->color.geom.highlight[1]);
        }
    
        double x = v->x(), y = v->y(), z = v->z();
        _ctx->transform(x, y, z);
    
        if(CTX::instance()->geom.points) {
          if(CTX::instance()->geom.pointType > 0) {
            if(v->getSelection())
              _ctx->drawSphere(CTX::instance()->geom.selectedPointSize, x, y, z, 
                               CTX::instance()->geom.light);
            else
              _ctx->drawSphere(CTX::instance()->geom.pointSize, x, y, z, 
                               CTX::instance()->geom.light);
          }
          else {
            glBegin(GL_POINTS);
            glVertex3d(x, y, z);
            glEnd();
          }
        }