0022819: Redesign of OpenGl driver
[occt.git] / src / QADBMReflex / QADBMReflex_OCC749PrsUseVertexABV.cxx
diff --git a/src/QADBMReflex/QADBMReflex_OCC749PrsUseVertexABV.cxx b/src/QADBMReflex/QADBMReflex_OCC749PrsUseVertexABV.cxx
deleted file mode 100755 (executable)
index 3c1b1e0..0000000
+++ /dev/null
@@ -1,167 +0,0 @@
-// File:       QADBMReflex_OCC749PrsUseVertexABV.cxx
-// Created:    Mon Oct  7 15:01:41 2002
-// Author:     QA Admin
-//             <qa@russox>
-
-
-#include <QADBMReflex_OCC749PrsUseVertexABV.ixx>
-
-#include <Prs3d_Root.hxx>
-#include <Graphic3d_Group.hxx>
-#include <Graphic3d_Vertex.hxx>
-#include <Aspect_Array1OfEdge.hxx>
-#include <Graphic3d_AspectFillArea3d.hxx>
-#include <Graphic3d_MaterialAspect.hxx>
-#include <Quantity_Color.hxx>
-#include <Graphic3d_Array1OfVertexC.hxx>
-#include <Aspect_Edge.hxx>
-
-
-#include <Graphic3d_Array1OfVertex.hxx>
-#include <OSD_Timer.hxx>
-
-//=======================================================================
-//function : QADBMReflex_OCC749PrsUseVertexABV
-//purpose  : 
-//=======================================================================
-
-  QADBMReflex_OCC749PrsUseVertexABV::QADBMReflex_OCC749PrsUseVertexABV( const Standard_Boolean Reflection,const Quantity_Color& InteriorColor,const Quantity_Color& EdgeColor,const Quantity_Color& EdgeColor2,const Standard_Integer XCount,const Standard_Integer YCount,const Standard_Integer BoxSize,const Graphic3d_MaterialAspect& MaterialAspect,const Standard_Boolean Material,const Standard_Boolean Timer ):QADBMReflex_OCC749Prs(Reflection,InteriorColor,EdgeColor,EdgeColor2,XCount,YCount,BoxSize,MaterialAspect,Material,Timer) {
-}
-
-static OSD_Timer Timer;
-
-//=======================================================================
-//function : Compute
-//purpose  : 
-//=======================================================================
-
-void QADBMReflex_OCC749PrsUseVertexABV::Compute(const Handle(PrsMgr_PresentationManager3d)& aPrsMgr,
-                                            const Handle(Prs3d_Presentation)& aPresentation,
-                                            const Standard_Integer aMode )
-{
-  Standard_Boolean BooleanTimer = GetTimer();
-  if (BooleanTimer) {
-    Timer.Reset ();
-    Timer.Start ();
-  }
-
-  aPresentation->Clear();
-  Handle(Graphic3d_Group) aGroup = Prs3d_Root::NewGroup(aPresentation);
-
-  Graphic3d_MaterialAspect aFlatMat; 
-  Standard_Boolean BooleanMaterial = GetMaterial();
-  if (BooleanMaterial) {
-    aFlatMat = GetMaterialAspect(); 
-  }
-
-  Standard_Boolean BooleanReflection = GetReflection();
-  if (BooleanReflection) {
-    aFlatMat.SetReflectionModeOn(Graphic3d_TOR_AMBIENT);
-    aFlatMat.SetReflectionModeOn(Graphic3d_TOR_DIFFUSE);
-    aFlatMat.SetReflectionModeOn(Graphic3d_TOR_SPECULAR);
-    aFlatMat.SetReflectionModeOn(Graphic3d_TOR_EMISSION);
-  } else {
-    aFlatMat.SetReflectionModeOff(Graphic3d_TOR_AMBIENT);
-    aFlatMat.SetReflectionModeOff(Graphic3d_TOR_DIFFUSE);
-    aFlatMat.SetReflectionModeOff(Graphic3d_TOR_SPECULAR);
-    aFlatMat.SetReflectionModeOff(Graphic3d_TOR_EMISSION);
-  }
-
-  Quantity_Color InteriorColor = GetInteriorColor();
-  Quantity_Color EdgeColor     = GetEdgeColor();
-  Standard_Integer XCOUNT = GetXCount();
-  Standard_Integer YCOUNT = GetYCount();
-  Standard_Integer BOXSIZE = GetBoxSize();
-
-  //Handle(Graphic3d_AspectFillArea3d) Fill3d;
-  //Fill3d = new Graphic3d_AspectFillArea3d(Aspect_IS_SOLID,
-       //                                InteriorColor,
-       //                                EdgeColor,
-       //                                Aspect_TOL_SOLID,
-       //                                1.5,
-       //                                aFlatMat,
-       //                                aFlatMat);
-
-  //aGroup->SetPrimitivesAspect(Fill3d);
-  aGroup->BeginPrimitives();
-
-  Standard_Integer i,j,z1=0,z2,zmax=XCOUNT;
-  if (YCOUNT > XCOUNT) zmax = YCOUNT;
-
-  Standard_Integer HMAX = 100;
-  BOXSIZE = HMAX / zmax;
-  if (BOXSIZE ==0)
-    BOXSIZE = 1;
-
-  for (i=0; i < XCOUNT; i++){
-    for (j=0; j < YCOUNT; j++){
-
-      //Quantity_NameOfColor aColor = Quantity_Color::Name(1., 
-      //                                                   (double)j/YCOUNT, 
-      //                                                   (double)i/XCOUNT);
-      Handle(Graphic3d_AspectFillArea3d) Fill3d = new Graphic3d_AspectFillArea3d(Aspect_IS_SOLID,
-                                             Quantity_Color(1., (double)j/YCOUNT, (double)i/XCOUNT, Quantity_TOC_RGB),
-                                             EdgeColor,
-                                             Aspect_TOL_SOLID,
-                                             1.5,
-                                             aFlatMat,
-                                             aFlatMat);
-      //////////////////if (i == 0 && j ==0) {
-       //////////////////Fill3d->SetInteriorColor(InteriorColor);
-      //////////////////}
-      aGroup->SetPrimitivesAspect(Fill3d);
-
-      Graphic3d_Array1OfVertex aVertexes(1, 8); 
-      
-      //////////////////z2 = BOXSIZE +(i*zmax - j*((Standard_Integer) zmax/2));
-      z2 = BOXSIZE +(i*BOXSIZE - j*BOXSIZE/2);
-      aVertexes(1).SetCoord(i*BOXSIZE, j*BOXSIZE, z1);
-      aVertexes(2).SetCoord(i*BOXSIZE + BOXSIZE, j*BOXSIZE, z1);
-      aVertexes(3).SetCoord(i*BOXSIZE + BOXSIZE, j*BOXSIZE + BOXSIZE, z1);
-      aVertexes(4).SetCoord(i*BOXSIZE, j*BOXSIZE + BOXSIZE, z1);
-      aVertexes(5).SetCoord(i*BOXSIZE, j*BOXSIZE, z2);
-      aVertexes(6).SetCoord(i*BOXSIZE + BOXSIZE, j*BOXSIZE, z2);
-      aVertexes(7).SetCoord(i*BOXSIZE + BOXSIZE, j*BOXSIZE + BOXSIZE, z2);
-      aVertexes(8).SetCoord(i*BOXSIZE, j*BOXSIZE + BOXSIZE, z2);
-
-      Aspect_Array1OfEdge aEdges(1, 24);
-      aEdges(1) = Aspect_Edge(1, 2, Aspect_TOE_VISIBLE);
-      aEdges(2) = Aspect_Edge(2, 3, Aspect_TOE_VISIBLE);
-      aEdges(3) = Aspect_Edge(3, 4, Aspect_TOE_VISIBLE);
-      aEdges(4) = Aspect_Edge(4, 1, Aspect_TOE_VISIBLE);
-
-      aEdges(5) = Aspect_Edge(5, 6, Aspect_TOE_VISIBLE);
-      aEdges(6) = Aspect_Edge(6, 7, Aspect_TOE_VISIBLE);
-      aEdges(7) = Aspect_Edge(7, 8, Aspect_TOE_VISIBLE);
-      aEdges(8) = Aspect_Edge(8, 5, Aspect_TOE_VISIBLE);
-
-      aEdges(9) = Aspect_Edge(1, 5, Aspect_TOE_VISIBLE);
-      aEdges(10) = Aspect_Edge(5, 6, Aspect_TOE_VISIBLE);
-      aEdges(11) = Aspect_Edge(6, 2, Aspect_TOE_VISIBLE);
-      aEdges(12) = Aspect_Edge(2, 1, Aspect_TOE_VISIBLE);
-
-      aEdges(13) = Aspect_Edge(6, 7, Aspect_TOE_VISIBLE);
-      aEdges(14) = Aspect_Edge(7, 3, Aspect_TOE_VISIBLE);
-      aEdges(15) = Aspect_Edge(3, 2, Aspect_TOE_VISIBLE);
-      aEdges(16) = Aspect_Edge(2, 6, Aspect_TOE_VISIBLE);
-
-      aEdges(17) = Aspect_Edge(3, 7, Aspect_TOE_VISIBLE);
-      aEdges(18) = Aspect_Edge(7, 8, Aspect_TOE_VISIBLE);
-      aEdges(19) = Aspect_Edge(8, 4, Aspect_TOE_VISIBLE);
-      aEdges(20) = Aspect_Edge(4, 3, Aspect_TOE_VISIBLE);
-
-      aEdges(21) = Aspect_Edge(4, 8, Aspect_TOE_VISIBLE);
-      aEdges(22) = Aspect_Edge(8, 5, Aspect_TOE_VISIBLE);
-      aEdges(23) = Aspect_Edge(5, 1, Aspect_TOE_VISIBLE);
-      aEdges(24) = Aspect_Edge(1, 4, Aspect_TOE_VISIBLE);
-
-      aGroup->QuadrangleSet(aVertexes, aEdges);
-    }
-  }
-  aGroup->EndPrimitives();
-
-  if (BooleanTimer) {
-    Timer.Stop ();
-    Timer.Show (cout);
-  }
-}