* Face colours added to FaceDescriptor class to allow for geometry independent implementation of face colours

* Added functions to set and retrieve face colour data to FaceDescriptor class
This commit is contained in:
Philippose Rajan 2009-07-10 11:56:45 +00:00
parent 654914c3e1
commit 2b4e7aad8f
2 changed files with 24 additions and 2 deletions

View File

@ -2260,6 +2260,9 @@ namespace netgen
{
surfnr = domin = domout = bcprop = 0;
domin_singular = domout_singular = 0.;
// Philippose - 06/07/2009
// Initialise surface colour
surfcolour = Vec3d(0.0,1.0,0.0);
tlosurf = -1;
bcname = 0;
firstelement = -1;
@ -2268,7 +2271,8 @@ namespace netgen
FaceDescriptor :: FaceDescriptor(const FaceDescriptor& other)
: surfnr(other.surfnr), domin(other.domin), domout(other.domout),
tlosurf(other.tlosurf), bcprop(other.bcprop), bcname(other.bcname),
domin_singular(other.domin_singular), domout_singular(other.domout_singular)
domin_singular(other.domin_singular), domout_singular(other.domout_singular),
surfcolour(other.surfcolour)
{
firstelement = -1;
}
@ -2279,6 +2283,9 @@ namespace netgen
surfnr = surfnri;
domin = domini;
domout = domouti;
// Philippose - 06/07/2009
// Initialise surface colour
surfcolour = Vec3d(0.0,1.0,0.0);
tlosurf = tlosurfi;
bcprop = surfnri;
domin_singular = domout_singular = 0.;
@ -2291,6 +2298,9 @@ namespace netgen
surfnr = seg.si;
domin = seg.domin+1;
domout = seg.domout+1;
// Philippose - 06/07/2009
// Initialise surface colour
surfcolour = Vec3d(0.0,1.0,0.0);
tlosurf = seg.tlosurf+1;
bcprop = 0;
domin_singular = domout_singular = 0.;
@ -2333,7 +2343,8 @@ namespace netgen
<< ", tlosurf = " << fd.tlosurf
<< ", bcprop = " << fd.bcprop
<< ", domin_sing = " << fd.domin_singular
<< ", domout_sing = " << fd.domout_singular;
<< ", domout_sing = " << fd.domout_singular
<< ", colour = " << fd.surfcolour;
return s;
}

View File

@ -885,6 +885,11 @@ class FaceDescriptor
int tlosurf;
/// boundary condition property
int bcprop;
// Philippose - 06/07/2009
// Add capability to store surface colours along with
// other face data
/// surface colour (Default: R=0.0 ; G=1.0 ; B=0.0)
Vec3d surfcolour;
///
string * bcname;
@ -909,6 +914,9 @@ public:
int DomainOut () const { return domout; }
int TLOSurface () const { return tlosurf; }
int BCProperty () const { return bcprop; }
// Philippose - 06/07/2009
// Get Surface colour
Vec3d SurfColour () const { return surfcolour; }
string GetBCName () const;
// string * BCNamePtr () { return bcname; }
// const string * BCNamePtr () const { return bcname; }
@ -917,6 +925,9 @@ public:
void SetDomainOut (int dom) { domout = dom; }
void SetBCProperty (int bc) { bcprop = bc; }
void SetBCName (string * bcn) { bcname = bcn; }
// Philippose - 06/07/2009
// Set the surface colour
void SetSurfColour (Vec3d colour) { surfcolour = colour; }
friend ostream & operator<<(ostream & s, const FaceDescriptor & fd);
friend class Mesh;