* Added a flag into the surface element class to control the visibility of each element individually.

* Added functions to access the visibility flag.
* By default the visibility flag is set to "1" implying that the element is visible.
This commit is contained in:
Philippose Rajan 2010-08-09 17:58:24 +00:00
parent fec79cb2e3
commit 537f1ba164
2 changed files with 17 additions and 0 deletions

View File

@ -141,6 +141,7 @@ namespace netgen
index = 0;
badel = 0;
deleted = 0;
visible = 1;
typ = TRIG;
orderx = ordery = 1;
refflag = 1;
@ -162,6 +163,7 @@ namespace netgen
index = 0;
badel = 0;
deleted = 0;
visible = 1;
switch (np)
{
case 3: typ = TRIG; break;
@ -190,6 +192,7 @@ namespace netgen
index = 0;
badel = 0;
deleted = 0;
visible = 1;
orderx = ordery = 1;
refflag = 1;
strongrefflag = false;
@ -219,6 +222,7 @@ namespace netgen
refflag = 1;
strongrefflag = false;
deleted = 0;
visible = 1;
orderx = ordery = 1;
#ifdef PARALLEL
@ -246,6 +250,7 @@ namespace netgen
refflag = 1;
strongrefflag = false;
deleted = 0;
visible = 1;
orderx = ordery = 1;
#ifdef PARALLEL

View File

@ -309,6 +309,11 @@ class Element2d
bool strongrefflag:1;
bool deleted:1; // element is deleted
// Philippose - 08 August 2010
// Set a new property for each element, to
// control whether it is visible or not
bool visible:1; // element visible
/// order for hp-FEM
unsigned int orderx:6;
unsigned int ordery:6;
@ -465,6 +470,13 @@ public:
return deleted;
}
// Philippose - 08 August 2010
// Access functions for the new property: visible
void Visible(bool vis = 1)
{ visible = vis; }
bool IsVisible () const
{ return visible; }
void SetRefinementFlag (bool rflag = 1)
{ refflag = rflag; }
bool TestRefinementFlag () const