Skip to content
Snippets Groups Projects
Select Git revision
  • a36eef78824ebfcf6c100f877cdf0f7b7d5ba6de
  • master default protected
  • overlaps_tags_and_distributed_export
  • patches-4.14
  • steplayer
  • 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
  • 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

GmshSocket.h

Blame
  • GEdgeLoop.h 1.17 KiB
    // Gmsh - Copyright (C) 1997-2019 C. Geuzaine, J.-F. Remacle
    //
    // See the LICENSE.txt file for license information. Please report all
    // issues on https://gitlab.onelab.info/gmsh/gmsh/issues.
    
    #ifndef GEDGE_LOOP_H
    #define GEDGE_LOOP_H
    
    #include "GEdge.h"
    
    class GEdgeSigned {
    public:
      int _sign;
      GEdge *ge;
      GEdgeSigned(int i, GEdge *g) : _sign(i), ge(g) {}
      GVertex *getBeginVertex() const
      {
        return (_sign == 1) ? ge->getBeginVertex() : ge->getEndVertex();
      }
      GVertex *getEndVertex() const
      {
        return (_sign != 1) ? ge->getBeginVertex() : ge->getEndVertex();
      }
      void print() const;
      int getSign() const { return _sign; }
    };
    
    class GEdgeLoop {
    private:
      std::list<GEdgeSigned> loop;
    
    public:
      typedef std::list<GEdgeSigned>::iterator iter;
      typedef std::list<GEdgeSigned>::const_iterator citer;
      GEdgeLoop(const std::vector<GEdge *> &);
      inline iter begin() { return loop.begin(); }
      inline iter end() { return loop.end(); }
      inline citer begin() const { return loop.begin(); }
      inline citer end() const { return loop.end(); }
      inline void erase(iter it) { loop.erase(it); }
      int count(GEdge *) const;
      int count() const { return (int)loop.size(); }
    };
    
    #endif