mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-25 05:20:34 +05:00
* 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:
parent
654914c3e1
commit
2b4e7aad8f
@ -2260,6 +2260,9 @@ namespace netgen
|
|||||||
{
|
{
|
||||||
surfnr = domin = domout = bcprop = 0;
|
surfnr = domin = domout = bcprop = 0;
|
||||||
domin_singular = domout_singular = 0.;
|
domin_singular = domout_singular = 0.;
|
||||||
|
// Philippose - 06/07/2009
|
||||||
|
// Initialise surface colour
|
||||||
|
surfcolour = Vec3d(0.0,1.0,0.0);
|
||||||
tlosurf = -1;
|
tlosurf = -1;
|
||||||
bcname = 0;
|
bcname = 0;
|
||||||
firstelement = -1;
|
firstelement = -1;
|
||||||
@ -2268,7 +2271,8 @@ namespace netgen
|
|||||||
FaceDescriptor :: FaceDescriptor(const FaceDescriptor& other)
|
FaceDescriptor :: FaceDescriptor(const FaceDescriptor& other)
|
||||||
: surfnr(other.surfnr), domin(other.domin), domout(other.domout),
|
: surfnr(other.surfnr), domin(other.domin), domout(other.domout),
|
||||||
tlosurf(other.tlosurf), bcprop(other.bcprop), bcname(other.bcname),
|
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;
|
firstelement = -1;
|
||||||
}
|
}
|
||||||
@ -2279,6 +2283,9 @@ namespace netgen
|
|||||||
surfnr = surfnri;
|
surfnr = surfnri;
|
||||||
domin = domini;
|
domin = domini;
|
||||||
domout = domouti;
|
domout = domouti;
|
||||||
|
// Philippose - 06/07/2009
|
||||||
|
// Initialise surface colour
|
||||||
|
surfcolour = Vec3d(0.0,1.0,0.0);
|
||||||
tlosurf = tlosurfi;
|
tlosurf = tlosurfi;
|
||||||
bcprop = surfnri;
|
bcprop = surfnri;
|
||||||
domin_singular = domout_singular = 0.;
|
domin_singular = domout_singular = 0.;
|
||||||
@ -2291,6 +2298,9 @@ namespace netgen
|
|||||||
surfnr = seg.si;
|
surfnr = seg.si;
|
||||||
domin = seg.domin+1;
|
domin = seg.domin+1;
|
||||||
domout = seg.domout+1;
|
domout = seg.domout+1;
|
||||||
|
// Philippose - 06/07/2009
|
||||||
|
// Initialise surface colour
|
||||||
|
surfcolour = Vec3d(0.0,1.0,0.0);
|
||||||
tlosurf = seg.tlosurf+1;
|
tlosurf = seg.tlosurf+1;
|
||||||
bcprop = 0;
|
bcprop = 0;
|
||||||
domin_singular = domout_singular = 0.;
|
domin_singular = domout_singular = 0.;
|
||||||
@ -2333,7 +2343,8 @@ namespace netgen
|
|||||||
<< ", tlosurf = " << fd.tlosurf
|
<< ", tlosurf = " << fd.tlosurf
|
||||||
<< ", bcprop = " << fd.bcprop
|
<< ", bcprop = " << fd.bcprop
|
||||||
<< ", domin_sing = " << fd.domin_singular
|
<< ", domin_sing = " << fd.domin_singular
|
||||||
<< ", domout_sing = " << fd.domout_singular;
|
<< ", domout_sing = " << fd.domout_singular
|
||||||
|
<< ", colour = " << fd.surfcolour;
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -885,6 +885,11 @@ class FaceDescriptor
|
|||||||
int tlosurf;
|
int tlosurf;
|
||||||
/// boundary condition property
|
/// boundary condition property
|
||||||
int bcprop;
|
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;
|
string * bcname;
|
||||||
@ -909,6 +914,9 @@ public:
|
|||||||
int DomainOut () const { return domout; }
|
int DomainOut () const { return domout; }
|
||||||
int TLOSurface () const { return tlosurf; }
|
int TLOSurface () const { return tlosurf; }
|
||||||
int BCProperty () const { return bcprop; }
|
int BCProperty () const { return bcprop; }
|
||||||
|
// Philippose - 06/07/2009
|
||||||
|
// Get Surface colour
|
||||||
|
Vec3d SurfColour () const { return surfcolour; }
|
||||||
string GetBCName () const;
|
string GetBCName () const;
|
||||||
// string * BCNamePtr () { return bcname; }
|
// string * BCNamePtr () { return bcname; }
|
||||||
// const string * BCNamePtr () const { return bcname; }
|
// const string * BCNamePtr () const { return bcname; }
|
||||||
@ -917,6 +925,9 @@ public:
|
|||||||
void SetDomainOut (int dom) { domout = dom; }
|
void SetDomainOut (int dom) { domout = dom; }
|
||||||
void SetBCProperty (int bc) { bcprop = bc; }
|
void SetBCProperty (int bc) { bcprop = bc; }
|
||||||
void SetBCName (string * bcn) { bcname = bcn; }
|
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 ostream & operator<<(ostream & s, const FaceDescriptor & fd);
|
||||||
friend class Mesh;
|
friend class Mesh;
|
||||||
|
Loading…
Reference in New Issue
Block a user