Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RFC_Window_overlay.h
Go to the documentation of this file.
1 /* *******************************************************************
2  * Rocstar Simulation Suite *
3  * Copyright@2015, Illinois Rocstar LLC. All rights reserved. *
4  * *
5  * Illinois Rocstar LLC *
6  * Champaign, IL *
7  * www.illinoisrocstar.com *
8  * sales@illinoisrocstar.com *
9  * *
10  * License: See LICENSE file in top level of distribution package or *
11  * http://opensource.org/licenses/NCSA *
12  *********************************************************************/
13 /* *******************************************************************
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, *
15  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES *
16  * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND *
17  * NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR *
18  * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *
19  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, *
20  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE *
21  * USE OR OTHER DEALINGS WITH THE SOFTWARE. *
22  *********************************************************************/
23 // $Id: RFC_Window_overlay.h,v 1.22 2008/12/06 08:43:27 mtcampbe Exp $
24 
25 //===============================================================
26 // This file defines RFC_Pane_overlay and RFC_Window_overlay based on
27 // RFC_Pane_base and RFC_Window_base respectively.
28 // Author: Xiangmin Jiao
29 // Creation date: Dec. 21, 2001
30 //===============================================================
31 
32 #ifndef RFC_WINDOW_H
33 #define RFC_WINDOW_H
34 
35 #include "RFC_Window_base.h"
36 #include "HDS_overlay.h"
38 #include <map>
39 #include <list>
40 #include "In_place_list_n.h"
41 #include <cmath>
42 #include "commpi.h"
43 
44 #ifndef HUGE_VALF
45 #define HUGE_VALF 1e+36F
46 #endif
47 
49 
50 class INode;
51 template <class Tag> class HDS_accessor;
54 
55 // RFC_Pane_overlay is based on RFC_Pane_base with the extension of
56 // a halfedge structure for storing element connectivity and
57 // extra attribute for storing normals of all vertices.
59 public:
65  typedef HDS_overlay HDS;
66  typedef CGAL::Halfedge_data_structure_decorator< HDS> HDS_decorator;
67  typedef CGAL::Polyhedron_incremental_builder_3<HDS> HDS_builder;
68 
69  friend class RFC_Window_overlay;
70 
71  RFC_Pane_overlay( COM::Pane *b, int color);
72  virtual ~RFC_Pane_overlay() {}
73 
75  const RFC_Window_overlay *window() const { return _window; }
76 
77  HDS &hds() { return _hds; }
78  const HDS &hds() const { return _hds; }
79 
80  // Functions for supporting the DCEL data structure
81  int get_index( const Vertex *v) const
82  { return v - (const Vertex*)&*_hds.vertices_begin(); }
83  int get_index( const Halfedge *h) const
84  { return h - (const Halfedge*)&*_hds.halfedges_begin(); }
85  int get_index( const Facet *f) const
86  { return f - (const Facet*)&*_hds.facets_begin(); }
87 
88  int get_lid( const Vertex *v) const
89  { return v - (const Vertex*)&*_hds.vertices_begin() + 1; }
90  int get_lid( const Facet *f) const
91  { return f - (const Facet*)&*_hds.facets_begin() + 1; }
92 
94  { RFC_assertion(i>0); return &_hds.vertices_begin()[ i-1]; }
95  const Vertex *get_vertex_from_id( int i) const
96  { RFC_assertion(i>0); return &_hds.vertices_begin()[ i-1]; }
97 
98  // If a vertex is a border vertex, it can have instances in multiple
99  // panes. The instance in the pane with smallest id is the primary copy.
100  bool is_primary( const Vertex *v) const {
101  return !v->halfedge()->is_border() ||
103  }
104 
105  // Get the primary copy of v.
106  const Vertex *get_primary( const Vertex *v) const {
107  RFC_assertion( v->halfedge());
108  // Precondition: v is a border vertex and v is not an isolated node
109  if ( !v->halfedge()->is_border()) return v;
110  else return _primaries[get_border_index(v->halfedge())];
111  }
113  { return const_cast<Vertex*>( get_primary( (const Vertex*)v)); }
114 
115  const Point_3 &get_point( int id) const
116  { return Base::get_point(id); }
117  const Point_3 &get_point( const Vertex *v) const
118  { return Base::get_point( get_index(v),0); }
119 
120  const Halfedge *get_counterpart( const Halfedge *h) const {
121  if ( !h->is_border()) return h;
122  RFC_assertion( h->vertex()->pane()==this);
123  return _cntrs[get_border_index(h)];
124  }
125 
127  { return const_cast<Halfedge*>( get_counterpart( (const Halfedge*)h)); }
128 
133  bool is_physical_border( const Halfedge *h) const {
134  if ( !h->is_border()) return false;
135 
136  RFC_assertion( h->vertex()->pane()==this);
137  return _cntrs[ get_border_index(h)] == h;
138  }
139 
140  // Obtaining the normal direction of a vertex
142  { RFC_assertion(v>0); return _nrmls[v-1]; }
143  const Vector_3& get_normal( int v) const
144  { RFC_assertion(v>0); return _nrmls[v-1]; }
145  void set_normal( int v, const Vector_3 &vec)
146  { RFC_assertion(v>0); _nrmls[v-1] = vec; }
147 
148  // Get the normal of a vertex.
151  { return get_normal( h, get_vertex_from_id(i)); }
153 
154  const Vector_3 &get_normal( const Halfedge *h, const Vertex *v) const;
155  const Vector_3 &get_normal( const Halfedge *h, int i) const
156  { return get_normal( h, get_vertex_from_id(i)); }
157  const Vector_3 &get_tangent( const Halfedge *h, const Vertex *v) const;
158 
159  void add_tangent( Halfedge *h, const Vector_3 &v) {
160  int &ind = _f_t_index[ get_index(h)];
161  if ( ind < 0) { ind = _f_tngts.size(); _f_tngts.push_back( v); }
162  else _f_tngts[ind] += v;
163  }
164 
165  INode *get_inode( const Vertex *v) const
166  { RFC_assertion( is_primary(v)); return _v_nodes[ get_index(v)]; }
167  void set_inode( Vertex *v, INode *i)
168  { RFC_assertion( is_primary(v)); _v_nodes[ get_index(v)] = i; }
170  { return _e_node_list[ get_index(h)]; }
171  const INode_list &get_inode_list( const Halfedge *h) const
172  { return _e_node_list[ get_index(h)]; }
173 
174  INode *get_buffered_inode( Halfedge *h, int tag) const {
175  int i=get_index(h);
176  if ( _e_marks[i] == tag) return _e_node_buf[i];
177  else return NULL;
178  }
179  void set_buffered_inode( Halfedge *h, int tag, INode *inode) {
180  int i=get_index(h);
181  _e_marks[i] = tag;
182  _e_node_buf[i] = inode;
183  }
184 
185  void mark( Halfedge *h) { _e_marks[get_index(h)] = true; }
186  void unmark( Halfedge *h) { _e_marks[get_index(h)] = false; }
187  bool marked( const Halfedge *h) const { return _e_marks[get_index(h)]; }
188 
189  bool is_on_feature( const Vertex *v) const { return _is_on_f[ get_index(v)]; }
190  bool is_feature_0( const Vertex *v) const { return _is_f_0[ get_index(v)]; }
191  bool is_feature_1( const Halfedge *h) const { return _is_f_1[get_index(h)]; }
192 
193  // ===========================
194  // Routines for building the subdivision
195  const int &size_of_subfaces() const { return _size_of_subfaces; }
197 
199  void allocate_subnodes( int num_sn) {
200  _subnode_parents.resize( num_sn);
201  _subnode_nat_coors.resize( num_sn);
202  _subnode_counterparts.resize( num_sn);
203  }
204 
206  void allocate_subfaces( const std::vector< int> &cnts) {
207  int nf = size_of_faces(); RFC_assertion( nf == int(cnts.size()));
208  _subface_offsets.resize( nf+1);
209  _subface_offsets[0] = 0;
210  for ( int i=1; i<=nf; ++i) {
211  _subface_offsets[i] = _subface_offsets[i-1]+cnts[i-1];
212  }
213 
214  int nsf=_subface_offsets[nf];
215  _subfaces.resize( nsf);
216  _subface_parents.resize( nsf);
217  _subface_counterparts.resize( nsf);
218  }
219 
221  void insert_subface( int idx, int plid, const int *lids,
222  const Edge_ID *eids, const Point_2 *nc,
223  int rp_id, int cnt, const int *rids);
224 
225 protected:
226  //=========================================================
227  // The following functions are for constructing the internal
228  // data structure of RFC_Pane.
229  //=========================================================
230  // Construct the HDS data structure.
231  void build_hds();
232 
233  // Evaluating normals for all vertices within a pane.
234  void evaluate_normals();
235 
236  // Determing counterparts of local border halfedges.
237  void determine_counterparts();
238 
239  void unmark_alledges( );
240 
241  //=========== Functions for supporting feature detection
242  void mark_ridge( Halfedge *h);
243 
244  const float &get_cos_face_angle( const Halfedge *h) const
245  { return _fd_1[ get_index( h)>>1]; }
247  { return _fd_1[ get_index( h)>>1]; }
249  { _fd_1.clear(); _fd_1.resize( _hds.size_of_halfedges()>>1, HUGE_VALF); }
250 
251  const float& get_angle_defect( const Vertex *v) const
252  { return _ad_0[ get_index( v)]; }
254  { return _ad_0[ get_index( v)]; }
256  { _ad_0.clear(); _ad_0.resize( _hds.size_of_vertices(), HUGE_VALF); }
257 
258  const float& get_cos_edge_angle( const Vertex *v) const
259  { return _ea_0[ get_index( v)]; }
261  { return _ea_0[ get_index( v)]; }
263  { _ea_0[ get_index( v)] = HUGE_VALF; }
265  { _ea_0.clear(); _ea_0.resize( _hds.size_of_vertices(), HUGE_VALF); }
266 
267  void set_strong_edge( Halfedge *h) { _is_f_1[ get_index(h)] = true; }
268  void unset_strong_edge( Halfedge *h) { _is_f_1[ get_index(h)] = false; }
269  void set_feature_0( Vertex *v) { _is_f_0[ get_index(v)] = true; }
270  void unset_feature_0( Vertex *v) { _is_f_0[ get_index(v)] = false; }
271  void set_on_feature( Vertex *v) { _is_on_f[ get_index(v)] = true; }
272  void unset_on_feature( Vertex *v) { _is_on_f[ get_index(v)] = false; }
273 
274  //=========== Functions for supporting the overlay algorithm
275  void create_overlay_data();
276  void delete_overlay_data();
277 
278  void construct_bvpair2edge();
279  int get_border_index( const Halfedge *h) const {
280  const Halfedge *t = &*hds().border_halfedges_begin();
281  int i = h - t; RFC_assertion(i>=0 && (i&1)==1);
282  return i>>1;
283  }
284 
285 protected:
286  // Data member
288  RFC_Window_overlay *_window; // Point to parent window.
289 
290  std::map< std::pair<int,int>, Halfedge*> _bv2edges;
291  std::vector<Halfedge*> _cntrs; // Counterparts
292  std::vector<Vertex*> _primaries; // Primaries of border vertices
293 
294  // Extra attributes for the normals of the vertices.
295  std::vector<Vector_3> _nrmls; // Normals.
296 
297  std::vector<Vector_3> _f_nrmls; // Normals for vertices on 1-features
298  // Each entry coorresponds to a halfedge
299  // on 1-features, storing the
300  // normal/binormal of its destination.
301  std::vector< int> _f_n_index;// Indices for the halfedges in _f_nrmls.
302 
303 
304  std::vector< Vector_3> _f_tngts;
305  std::vector< int> _f_t_index; // Map fron halfedges to indices of _f_b_index
306 
307  // Extra data members for features
308  std::vector< float> _ad_0; // Angle defect at vertices
309  std::vector< float> _ea_0; // Edge angle at vertices
310  std::vector< float> _fd_1; // Face angle at edges
311 
312  std::vector< bool> _is_f_0;
313  std::vector< bool> _is_on_f;
314  std::vector< bool> _is_f_1;
315 
316  // Data for supporting overlay algorithm.
317  std::vector<INode*> _v_nodes; // INodes at vertices
318  std::vector<INode*> _e_node_buf; // INode buffer for edges
319  std::vector<INode_list> _e_node_list; // INodes on edges
320  std::vector<int> _e_marks; // Marks for edges
321 
323  std::vector< const INode*> _subnodes;
325 };
326 
328 class RFC_Window_overlay : public RFC_Window_derived<RFC_Pane_overlay> {
329 public:
335 
336  RFC_Window_overlay( COM::Window *b, int color, const char *pre=NULL);
337  virtual ~RFC_Window_overlay();
338 
342  bool is_same_node( Vertex *v1, Vertex *v2);
343  void create_overlay_data();
344  void delete_overlay_data();
345 
346  void determine_counterparts();
347  void unmark_alledges();
348 
349  const Halfedge *get_an_unmarked_halfedge() const;
356 public:
357  void evaluate_normals();
358 
360 
361  void print_features();
362 protected:
363  void reduce_normals_to_all( MPI_Op);
364 
366  { return h->destination()->point()-h->origin()->point(); }
369 public:
373  class Feature_0 {
374  public:
375  Feature_0() : _v(0) {}
376  explicit Feature_0( Vertex *v) : _v(v) {}
377  const Point_3 &point() const { return _v->point(); }
378  Vertex *vertex() { return _v; }
379  const Vertex *vertex() const { return _v; }
380 // bool operator<( const Feature_0 &f) {
381  bool operator<( const Feature_0 &f) const {
382  return _v->point()<f._v->point();
383  }
384  private:
386  };
387  struct Feature_1 : public std::list<Halfedge*> {
388  typedef std::list<Halfedge*> Base;
390  template <class Iter>
391  Feature_1( Iter it1, Iter it2) : Base(it1, it2) {}
393  };
394  typedef std::list< Feature_0> Feature_list_0;
395  typedef std::list< Feature_1> Feature_list_1;
396 
397  void detect_features();
398  bool snap_on_features() const { return _snap_on_features; }
401  const Feature_list_0 &flist_0() const { return _f_list_0; }
402  const Feature_list_1 &flist_1() const { return _f_list_1; }
408 protected:
409  float comp_angle_defect( Vertex *v);
410  float cos_face_angle( Halfedge *h, Halfedge *hopp);
411  float cos_edge_angle( const Halfedge *h1, const Halfedge *h2);
412  float cos_edge_angle( const Feature_1 &f1, Feature_1::const_iterator it,
413  bool isloop);
414  bool is_strong_ad( Vertex *v);
415  bool is_rstrong_ea( const Feature_1 &f1,
416  Feature_1::const_iterator hprev,
417  Feature_1::const_iterator hnext,
418  float cos_ea, bool isloop);
424 protected:
425  bool check_false_strong_1( Feature_1 &);
426  void subdiv_feature_curve( const Feature_1 &f1,
427  Feature_list_1 &new_flist, int &dropped);
428  void merge_features_1( Vertex *v, Feature_1 &f1, Feature_1 &f2);
429 public:
430  void remove_feature_1( Feature_1 &f);
436 protected:
437  void identify_features_0();
438 public:
439  Feature_list_0::iterator remove_feature_0( Feature_list_0::iterator i);
445 private:
447  void set_feature_0( Vertex *v) const
448  { v->pane()->set_feature_0( v); }
449  void set_on_feature( Vertex *v) const
450  { v->pane()->set_on_feature( v); }
451 
452  bool is_feature_0( const Vertex *v) const
453  { return v->pane()->is_feature_0(v); }
454  bool is_on_feature( const Vertex *v) const
455  { return v->pane()->is_on_feature(v); }
456  bool is_feature_1( const Halfedge *h) const
457  { return h->vertex()->pane()->is_feature_1(h); }
458  void unset_strong_edge( Halfedge *h) const
459  { h->vertex()->pane()->unset_strong_edge(h); }
465  void dump_strong_edges(const std::vector< std::pair<float, Halfedge*> > &,
466  const std::vector< std::pair<float, Halfedge*> > &);
467 
472  { if (v != Vector_3(0,0,0)) v = v / std::sqrt( v*v); }
473 private:
475  float _ud, _ld, _rd;
476  float _cos_ue, _cos_le, _re;
478  int verb;
479 
480  std::string out_pre;
483  std::map<Vertex*,int> _f0_ranks;
486  // Whether to snap blue features onto green features
488 
489  static const float r2d;
491 };
492 
494 
495 #endif
496 
497 
498 
499 
500 
501 
bool is_strong_ad(Vertex *v)
Determine whether a vertex is strong (either theta-strong or relatively strong) in angle defect...
float cos_edge_angle(const Halfedge *h1, const Halfedge *h2)
Compute the cosine of the edge angle at a vertex between two incident feature edges.
int get_lid(const Facet *f) const
void set_strong_edge(Halfedge *h)
std::vector< bool > _is_f_0
void insert_subface(int idx, int plid, const int *lids, const Edge_ID *eids, const Point_2 *nc, int rp_id, int cnt, const int *rids)
Insert all the infomation related to a subface into the database.
void subdiv_feature_curve(const Feature_1 &f1, Feature_list_1 &new_flist, int &dropped)
Subdivide a feature curve by splitting it at 0-features.
CGAL::Polyhedron_incremental_builder_3< HDS > HDS_builder
void reduce_normals_to_all(MPI_Op)
Halfedge_overlay * halfedge()
Definition: HDS_overlay.h:73
std::vector< INode * > _v_nodes
static const float r2d
void set_on_feature(Vertex *v) const
Feature_list_0::iterator remove_feature_0(Feature_list_0::iterator i)
Remove the given 0-feature from the list.
RFC_Pane_overlay * pane()
Definition: HDS_overlay.h:69
const Feature_list_1 & flist_1() const
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE inode
float & get_cos_edge_angle(Vertex *v)
std::vector< INode_list > _e_node_list
Vertex_overlay Vertex
const float & get_cos_edge_angle(const Vertex *v) const
void unmark_alledges()
CGAL::Halfedge_data_structure_decorator< HDS > HDS_decorator
Vertex_overlay * destination()
Definition: HDS_overlay.h:137
const Vertex * get_primary(const Vertex *v) const
std::vector< INode * > _e_node_buf
void set_on_feature(Vertex *v)
MAP::Facet_ID Edge_ID
Definition: Manifold_2.h:49
const Point_3 & get_point(const Vertex *v) const
const int & size_of_subfaces() const
std::vector< Vector_3 > _f_nrmls
std::vector< int > _e_marks
RFC_Pane_base Base
const Point_3 & get_point(int id) const
Get the physical coordinates of the node with given local id.
Facet_overlay Facet
This class encapsulate a halfedge over a window manifold.
Definition: Manifold_2.h:446
RFC_Pane_overlay(COM::Pane *b, int color)
SURF::Vector_3< Real > Vector_3
Definition: rfc_basic.h:42
bool check_false_strong_1(Feature_1 &)
Determine whether a curve is false strong.
std::vector< Vertex * > _primaries
std::vector< Halfedge * > _cntrs
std::vector< bool > _is_on_f
void set_feature_0(Vertex *v)
double sqrt(double d)
Definition: double.h:73
float & get_cos_face_angle(Halfedge *h)
bool is_border() const
Definition: HDS_overlay.h:131
const HDS & hds() const
void add_tangent(Halfedge *h, const Vector_3 &v)
float comp_angle_defect(Vertex *v)
Compute the angle defect of a vertex.
int color() const
The color of the window for overlay or for data transfer (BLUE or GREEN).
int size_of_faces() const
The total number of faces in the pane.
int get_lid(const Vertex *v) const
std::vector< Three_tuple< int > > _subfaces
Vector_3 & get_tangent(Halfedge *h, Vertex *v)
std::vector< Edge_ID > _subnode_parents
Edge ids of parents.
RFC_Window_derived< RFC_Pane_overlay > Base
float & get_angle_defect(Vertex *v)
const Point_3 & point() const
A window is a collection of panes.
Vector_3 get_tangent(const Halfedge *h)
Vertex_overlay * origin()
Definition: HDS_overlay.h:135
int color() const
The color of the parent window (BLUE or GREEN).
*********************************************************************Illinois Open Source License ****University of Illinois NCSA **Open Source License University of Illinois All rights reserved ****Developed free of to any person **obtaining a copy of this software and associated documentation to deal with the Software without including without limitation the rights to and or **sell copies of the and to permit persons to whom the **Software is furnished to do subject to the following this list of conditions and the following disclaimers ****Redistributions in binary form must reproduce the above **copyright this list of conditions and the following **disclaimers in the documentation and or other materials **provided with the distribution ****Neither the names of the Center for Simulation of Advanced the University of nor the names of its **contributors may be used to endorse or promote products derived **from this Software without specific prior written permission ****THE SOFTWARE IS PROVIDED AS WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **ARISING OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE v
Definition: roccomf90.h:20
std::vector< Vector_3 > _nrmls
RFC_Window_overlay * window()
The base implementation of RFC_Pane.
bool snap_on_features() const
const Point_3 & get_point(int id) const
const float & get_cos_face_angle(const Halfedge *h) const
#define RFC_END_NAME_SPACE
Definition: rfc_basic.h:29
void init_feature_parameters()
Read in the control file for feature detection.
std::map< std::pair< int, int >, Halfedge * > _bv2edges
std::list< Feature_1 > Feature_list_1
float cos_face_angle(Halfedge *h, Halfedge *hopp)
Compute the cosine of the face angle (dihedral angle) at an edge.
bool is_rstrong_ea(const Feature_1 &f1, Feature_1::const_iterator hprev, Feature_1::const_iterator hnext, float cos_ea, bool isloop)
Determine whether a vertex is relatively strong in edge angle within a give feature.
#define HUGE_VALF
std::vector< bool > _is_f_1
std::vector< int > _f_t_index
void unset_strong_edge(Halfedge *h)
Feature_list_1 _f_list_1
const Point & point() const
INode * get_buffered_inode(Halfedge *h, int tag) const
Halfedge * get_counterpart(Halfedge *h)
void identify_features_0()
Identify the 0-features.
RFC_Window_overlay Self
bool is_same_node(Vertex *v1, Vertex *v2)
Check whether given two vertices correspond to the same physical point.
Vertex_overlay * vertex()
Definition: HDS_overlay.h:106
const RFC_Window_overlay * window() const
std::list< Feature_0 > Feature_list_0
int get_index(const Halfedge *h) const
bool is_feature_0(const Vertex *v) const
bool is_feature_0(const Vertex *v) const
In_place_list_n< INode, false > INode_list
Feature_list_0 & flist_0()
static HDS_accessor< Tag_true > acc
const Halfedge * get_counterpart(const Halfedge *h) const
bool is_primary(const Vertex *v) const
virtual ~RFC_Pane_overlay()
blockLoc i
Definition: read.cpp:79
void print_features()
Dump out the 0- and 1-features in Tecplot format into files &lt;name&gt;f0.plt, &lt;name&gt;f1.plt, respectively.
#define RFC_BEGIN_NAME_SPACE
Definition: rfc_basic.h:28
Vertex * get_primary(Vertex *v)
std::vector< float > _fd_1
INode_list & get_inode_list(Halfedge *h)
Contains declarations of MPI subroutines used in Roccom.
void unset_feature_0(Vertex *v)
void merge_features_1(Vertex *v, Feature_1 &f1, Feature_1 &f2)
Merge two feature curves into one at vertex v.
std::vector< Node_ID > _subnode_counterparts
Ids of counterparts of subnodes.
Feature_list_1 & flist_1()
std::vector< const INode * > _subnodes
std::vector< int > _f_n_index
void unset_strong_edge(Halfedge *h) const
void set_buffered_inode(Halfedge *h, int tag, INode *inode)
void detect_features()
The main entry of feature detection.
Feature_list_0 _f_list_0
void set_inode(Vertex *v, INode *i)
void mark_ridge(Halfedge *h)
bool is_on_feature(const Vertex *v) const
int get_index(const Vertex *v) const
Vector_3 & get_normal(Halfedge *h, int i)
std::vector< Vector_3 > _f_tngts
Reusable implementation for derived class of RFC_Window_base.
std::list< Halfedge * > Base
const Vector_3 & get_normal(const Halfedge *h, int i) const
const Halfedge * get_an_unmarked_halfedge() const
const Feature_list_0 & flist_0() const
std::vector< int > _subface_parents
Face ids of the parents of the subfaces.
std::vector< int > _subface_offsets
Offsets of first subfaces contained in a face.
void set_feature_0(Vertex *v) const
bool is_feature_1(const Halfedge *h) const
bool operator<(const Feature_0 &f) const
std::vector< float > _ad_0
int get_index(const Facet *f) const
void unmark(Halfedge *h)
const Vertex * vertex() const
const Vertex * get_vertex_from_id(int i) const
Halfedge_overlay Halfedge
RFC_Window_overlay(COM::Window *b, int color, const char *pre=NULL)
Some basic geometric data types.
Definition: mapbasic.h:54
bool is_on_feature(const Vertex *v) const
Halfedge_overlay Halfedge
void remove_feature_1(Feature_1 &f)
Remove a false strong curve.
std::vector< Point_2S > _subnode_nat_coors
Natual coordinates in the parent face.
bool is_feature_1(const Halfedge *h) const
void reset_cos_edge_angle(Vertex *v)
void allocate_subfaces(const std::vector< int > &cnts)
Allocate memory space for the arrays for storing the subdivision.
void normalize(Vector_3 &v)
Miscellaneous Helpers.
static HDS_accessor< Tag_true > acc
void unset_on_feature(Vertex *v)
std::map< Vertex *, int > _f0_ranks
INode * get_inode(const Vertex *v) const
const INode_list & get_inode_list(const Halfedge *h) const
RFC_Pane_overlay Self
Vertex * get_vertex_from_id(int i)
Vector_3 & get_normal(int v)
RFC_Window_overlay * _window
#define RFC_assertion
Definition: rfc_basic.h:65
void set_normal(int v, const Vector_3 &vec)
bool marked(const Halfedge *h) const
bool is_physical_border(const Halfedge *h) const
Determine whether an edge is on the physical boundary of the window.
const Vector_3 & get_normal(int v) const
void dump_strong_edges(const std::vector< std::pair< float, Halfedge * > > &, const std::vector< std::pair< float, Halfedge * > > &)
Dump out the strong edges in Tecplot format into file &lt;name&gt;s1.plt.
std::vector< float > _ea_0
void allocate_subnodes(int num_sn)
Allocate memory space for the arrays for storing the subdivision.
void mark(Halfedge *h)
std::vector< Face_ID > _subface_counterparts
Ids of counterparts of faces.
int get_border_index(const Halfedge *h) const
const float & get_angle_defect(const Vertex *v) const