Clean Mod/Part. remove old OCC <7.3 and #if 0 code.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user