Clean Mod/Part. remove old OCC <7.3 and #if 0 code.

This commit is contained in:
Andrew
2023-03-13 16:50:25 +01:00
committed by wwmayer
parent 53de24ae2d
commit 1eaf8a724e
15 changed files with 21 additions and 1442 deletions

View File

@@ -92,9 +92,6 @@ ViewProvider2DObjectGrid::~ViewProvider2DObjectGrid()
SoSeparator* ViewProvider2DObjectGrid::createGrid()
{
//double dx = 10 * GridSize.getValue(); // carpet size
//double dy = 10 * GridSize.getValue();
// float Size = (MaxX-MinX > MaxY-MinY) ? MaxX-MinX : MaxY-MinY;
float Step = GridSize.getValue(); //pow(10,floor(log10(Size/5.0)));
float MiX, MaX, MiY, MaY;
if (TightGrid.getValue()) {
@@ -133,35 +130,6 @@ SoSeparator* ViewProvider2DObjectGrid::createGrid()
SoBaseColor *mycolor;
SoVertexProperty *vts;
// carpet
/* mycolor = new SoBaseColor;
mycolor->rgb.setValue(0.2f, 0.7f, 0.7f);
parent->addChild(mycolor);
vts = new SoVertexProperty;
vts->vertex.set1Value(0, -0.5*dx, -1.5*dy, 0.5*zGrid);
vts->vertex.set1Value(1, -0.5*dx, -1.5*dy, -0.5*zGrid);
vts->vertex.set1Value(2, 0.5*dx, -1.5*dy, 0.5*zGrid);
vts->vertex.set1Value(3, 0.5*dx, -1.5*dy, -0.5*zGrid);
SoQuadMesh *carpet = new SoQuadMesh;
carpet->verticesPerColumn = 2;
carpet->verticesPerRow = 2;
carpet->vertexProperty = vts;
parent->addChild(carpet);*/
// It seems that SoDepthBuffer will mess up with other object's
// pre-selection highlight. No idea why the setting can leak out of a
// separator.
//
// What's the purpose of using SoDepthBuffer here anyway? If the intention
// is to render grid always on top, shouldn't it be better to use
// SoAnnotation?
#if 0
SoDepthBuffer *depth = new SoDepthBuffer;
depth->function = SoDepthBuffer::ALWAYS;
parent->addChild(depth);
#endif
// gridlines
mycolor = new SoBaseColor;