LCOV - code coverage report
Current view: top level - geom/facetbool/cgm - FBRetriangulate.hpp (source / functions) Hit Total Coverage
Test: coverage_sk.info Lines: 0 2 0.0 %
Date: 2020-06-30 00:58:45 Functions: 0 1 0.0 %
Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : /*
       2                 :            :  *
       3                 :            :  *
       4                 :            :  * Copyright (C) 2004 Sandia Corporation.  Under the terms of Contract DE-AC04-94AL85000
       5                 :            :  * with Sandia Corporation, the U.S. Government retains certain rights in this software.
       6                 :            :  *
       7                 :            :  * This file is part of facetbool--contact via [email protected]
       8                 :            :  *
       9                 :            :  * This library is free software; you can redistribute it and/or
      10                 :            :  * modify it under the terms of the GNU Lesser General Public
      11                 :            :  * License as published by the Free Software Foundation; either
      12                 :            :  * version 2.1 of the License, or (at your option) any later version.
      13                 :            :  *
      14                 :            :  * This library is distributed in the hope that it will be useful,
      15                 :            :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      16                 :            :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      17                 :            :  * Lesser General Public License for more details.
      18                 :            :  *
      19                 :            :  * You should have received a copy of the GNU Lesser General Public
      20                 :            :  * License along with this library; if not, write to the Free Software
      21                 :            :  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
      22                 :            :  *
      23                 :            :  *
      24                 :            :  *
      25                 :            :  */
      26                 :            : 
      27                 :            : #ifndef _FACETEDBOOLEANRETRIANGULATE
      28                 :            : #define _FACETEDBOOLEANRETRIANGULATE
      29                 :            : #include <math.h>
      30                 :            : #include <vector>
      31                 :            : #include "FBDefines.hpp"
      32                 :            : #include "FBStructs.hpp"
      33                 :            : #include "CubitDefines.h"
      34                 :            : 
      35                 :            : class FBRetriangulate {
      36                 :            : 
      37                 :            : public:
      38                 :            :   FBRetriangulate(std::vector<FB_Coord *>& my_verts,
      39                 :            :                   std::vector<FB_Triangle *>& my_tris,
      40                 :            :                   std::vector<int>& my_newfacets,
      41                 :            :                   std::vector<int>& my_newfacetsindex);
      42                 :            : 
      43                 :            :   FBRetriangulate(std::vector<FB_Coord *>& my_verts,
      44                 :            :                   std::vector<FB_Triangle *>& my_tris,
      45                 :            :                   std::vector<int>& my_newfacets);
      46                 :            : 
      47                 :            :   ~FBRetriangulate();
      48                 :            :   CubitStatus retriangulate_this_tri(int sequence, std::vector<FB_Edge*> &orphaned_edges);
      49                 :            :   
      50                 :            : private:
      51                 :            :   std::vector<FB_Coord *> verts;
      52                 :            :   std::vector<FB_Triangle *> *tris;
      53                 :            :   std::vector<int> *newfacets;
      54                 :            :   std::vector<int> *newfacetsindex;  
      55                 :            :   int p_dir, s_dir;
      56                 :            :   enum WindingType { CCW = 0, CW = 1 };
      57                 :            :   WindingType winding;
      58                 :            :   FB_Triangle *my_tri;
      59                 :            :   std::vector<VertexStuff* > vertstufflist;
      60                 :            :   void make_vert_list();
      61                 :            :   CubitStatus add_bdry_edges(std::vector<FB_Edge*> &orphaned_edges);
      62                 :          0 :   inline double get_dist(double x0, double y0, double z0,
      63                 :            :                                  double x1, double y1, double z1) {
      64                 :          0 :     return sqrt( (x1-x0)*(x1-x0) + (y1-y0)*(y1-y0) + (z1-z0)*(z1-z0) );
      65                 :            :   };
      66                 :            :   CubitStatus remove_min_max();
      67                 :            :   void add_edge_up(int v0, int seq);
      68                 :            :   void add_edge_down(int v0, int seq);
      69                 :            :   bool test_for_crossing(int v0, int v1, int v2, int v3);
      70                 :            :   void add_tri_edge(int v0, int v1, int v0_type, int v1_type);
      71                 :            :   bool get_a_chain(std::vector<int> *chainlist);
      72                 :            :   void sort_vertstufflist_edges();
      73                 :            :   void get_next_vert_in_chain(int& vthis, int& vprev, int direction);
      74                 :            :   void add_this_bdry_edge(int v0, int v1, int v0_type, int v1_type); 
      75                 :            :   void classify_edges();
      76                 :            :   void get_edge_indices(int v0, int v1, int v2, int parent, 
      77                 :            :                         int &e0index, int &e1index, int &e2index);
      78                 :            :                           
      79                 :            : };
      80                 :            : 
      81                 :            : #endif

Generated by: LCOV version 1.11