Skip to content
Snippets Groups Projects
Select Git revision
  • 048d4cd9bdaecf0bbf1df8a495a725d8808ad0d7
  • master default protected
  • bl
  • pluginMeshQuality
  • fixBugsAmaury
  • hierarchical-basis
  • alphashapes
  • relaying
  • new_export_boris
  • oras_vs_osm
  • reassign_partitions
  • distributed_fwi
  • rename-classes
  • fix/fortran-api-example-t4
  • robust_partitions
  • reducing_files
  • fix_overlaps
  • 3115-issue-fix
  • 3023-Fillet2D-Update
  • convert_fdivs
  • tmp_jcjc24
  • gmsh_4_14_0
  • gmsh_4_13_1
  • gmsh_4_13_0
  • gmsh_4_12_2
  • gmsh_4_12_1
  • gmsh_4_12_0
  • gmsh_4_11_1
  • 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
41 results

GModelIO_P3D.cpp

Blame
  • Mesh.cpp 25.46 KiB
    // $Id: Mesh.cpp,v 1.49 2002-05-18 07:18:02 geuzaine Exp $
    //
    // Copyright (C) 1997 - 2002 C. Geuzaine, J.-F. Remacle
    //
    // This program is free software; you can redistribute it and/or modify
    // it under the terms of the GNU General Public License as published by
    // the Free Software Foundation; either version 2 of the License, or
    // (at your option) any later version.
    //
    // This program is distributed in the hope that it will be useful,
    // but WITHOUT ANY WARRANTY; without even the implied warranty of
    // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    // GNU General Public License for more details.
    //
    // You should have received a copy of the GNU General Public License
    // along with this program; if not, write to the Free Software
    // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    
    #include "Gmsh.h"
    #include "GmshUI.h"
    #include "Geo.h"
    #include "CAD.h"
    #include "Mesh.h"
    #include "Draw.h"
    #include "Context.h"
    #include "MinMax.h"
    #include "gl2ps.h"
    #include "Verif.h"
    #include "Numeric.h"
    
    extern Mesh      *THEM;
    extern Context_T  CTX;
    
    void draw_polygon_2d (double r, double g, double b, int n, 
                          double *x, double *y, double *z){
      int i ;
    
      CalculateMinMax(THEM->Points,NULL);
      InitOpengl();
      InitPosition();
    
      glDisable(GL_DEPTH_TEST);
      glDrawBuffer(GL_FRONT);
      glColor3f(r,g,b);
      glBegin(GL_LINE_STRIP);
      for(i=0 ; i<n ; i++)
        if(z)glVertex3d(x[i], y[i],z[i]);
        else  glVertex2d(x[i], y[i]);
      glEnd();
      glFlush();
      glDrawBuffer(GL_BACK);
      glEnable(GL_DEPTH_TEST);
    
    }
    
    static int iColor;
    static DrawingColor theColor;
    
    void ColorSwitch(int i){
      glColor4ubv((GLubyte*)&CTX.color.mesh.carousel[i%10]);
    }
    
    static int DrawVertexSupp ;
    
    void Draw_Mesh (Mesh *M) {
      int i;
    
      if(!CTX.moving_light) InitRenderModel();
    
      if(CTX.mesh.shade)