minor changes
This commit is contained in:
parent
a7d6742fda
commit
a81551f3a1
|
@ -47,6 +47,7 @@ public:
|
|||
|
||||
|
||||
template <DrawMode dm,NormalMode nm,ColorMode cm >
|
||||
|
||||
void Draw(){
|
||||
switch (dm){
|
||||
case DMNone: break;
|
||||
|
@ -65,6 +66,8 @@ template <ColorMode cm >
|
|||
Point3x p[4],br;
|
||||
CONT_TETRA::iterator it;
|
||||
glPushAttrib(0xffffffff);
|
||||
glEnable(GL_COLOR_MATERIAL);
|
||||
glEnable(GL_LIGHT0);
|
||||
glEnable(GL_LIGHTING);
|
||||
glEnable(GL_NORMALIZE);
|
||||
glPolygonMode(GL_FRONT,GL_FILL);
|
||||
|
@ -80,6 +83,7 @@ template <ColorMode cm >
|
|||
template <NormalMode nm,ColorMode cm >
|
||||
void _DrawFlatWire(){
|
||||
glPushAttrib(0xffff);
|
||||
glEnable(GL_COLOR_MATERIAL);
|
||||
glEnable(GL_DEPTH);
|
||||
glDepthRange(0.001,1.0);
|
||||
Draw<DMFlat,nm,cm>();
|
||||
|
@ -95,8 +99,8 @@ template <DrawMode dm,NormalMode nm,ColorMode cm >
|
|||
void _DrawSurface(){
|
||||
CONT_TETRA::iterator it;
|
||||
|
||||
glPushAttrib(0xffffffff);
|
||||
|
||||
glPushAttrib(0xffff);
|
||||
glEnable(GL_COLOR_MATERIAL);
|
||||
if((dm == DMWire)||(dm ==DMHidden))
|
||||
{
|
||||
glDisable(GL_LIGHTING);
|
||||
|
@ -109,7 +113,6 @@ void _DrawSurface(){
|
|||
glEnable(GL_NORMALIZE);
|
||||
glPolygonMode(GL_FRONT,GL_FILL);
|
||||
}
|
||||
|
||||
glBegin(GL_TRIANGLES);
|
||||
for( it = tetra.begin(); it != tetra.end(); ++it)
|
||||
_DrawTetra<dm,nm,cm>((*it));
|
||||
|
@ -130,6 +133,7 @@ void _DrawTetra(TetraType &t)
|
|||
else
|
||||
{
|
||||
if (t.IsBorderF(i))
|
||||
//if (t.IsS())
|
||||
{
|
||||
if(nm==NMSmooth)
|
||||
_DrawFaceSmooth<cm>(t,i);
|
||||
|
@ -146,7 +150,12 @@ template <ColorMode cm >
|
|||
void _ChooseColorTetra(TetraType &t)
|
||||
{
|
||||
if (cm==CMNone)
|
||||
glColor3d(0.8,0.8,0.8);
|
||||
{
|
||||
if (t.IsS())
|
||||
glColor3d(1,0,0);
|
||||
else
|
||||
glColor3d(0.8f,0.8f,0.8f);
|
||||
}
|
||||
else
|
||||
if(cm == CMPerTetraF)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue