88 sep->removeAllChildren();
90 sep =
new SoSeparator;
94 const bool save =
sep->enableNotify(
false);
96 int nmax;
double distmax;
113 SoSeparator *
s =
new SoSeparator;
114 SoTranslation *
t1=
new SoTranslation();
115 t1->translation.setValue(0.0,0.0,-distmax-
spacing);
117 for (
int iz = -
nmax; iz<=
nmax; ++iz) {
118 SoTranslation *
t2=
new SoTranslation();
119 t2->translation.setValue(0.0,0.0,
spacing);
128 SoVertexProperty * grid_cylindrical_vertices =
new SoVertexProperty();
132 static const double invsqrttwo = 1.0/sqrt(2.0);
135 double r2 =
r*invsqrttwo;
136 grid_cylindrical_vertices->vertex.set1Value(ivert++,
r,0,-distmax);
137 grid_cylindrical_vertices->vertex.set1Value(ivert++,
r,0,+distmax);
138 grid_cylindrical_vertices->vertex.set1Value(ivert++,0,
r,-distmax);
139 grid_cylindrical_vertices->vertex.set1Value(ivert++,0,
r,+distmax);
140 grid_cylindrical_vertices->vertex.set1Value(ivert++,-
r,0,-distmax);
141 grid_cylindrical_vertices->vertex.set1Value(ivert++,-
r,0,+distmax);
142 grid_cylindrical_vertices->vertex.set1Value(ivert++,0,-
r,-distmax);
143 grid_cylindrical_vertices->vertex.set1Value(ivert++,0,-
r,+distmax);
144 grid_cylindrical_vertices->vertex.set1Value(ivert++,r2,r2,-distmax);
145 grid_cylindrical_vertices->vertex.set1Value(ivert++,r2,r2,+distmax);
146 grid_cylindrical_vertices->vertex.set1Value(ivert++,r2,-r2,-distmax);
147 grid_cylindrical_vertices->vertex.set1Value(ivert++,r2,-r2,+distmax);
148 grid_cylindrical_vertices->vertex.set1Value(ivert++,-r2,r2,-distmax);
149 grid_cylindrical_vertices->vertex.set1Value(ivert++,-r2,r2,+distmax);
150 grid_cylindrical_vertices->vertex.set1Value(ivert++,-r2,-r2,-distmax);
151 grid_cylindrical_vertices->vertex.set1Value(ivert++,-r2,-r2,+distmax);
157 SoLineSet *
line =
new SoLineSet();
159 line->numVertices.setNum(nsublines);
160 for (
int i=0;
i<nsublines;++
i)
161 line->numVertices.set1Value(
i,2);
162 line->vertexProperty = grid_cylindrical_vertices;
163 line->numVertices.enableNotify(
TRUE);
164 line->numVertices.touch();
170 sep->enableNotify(
true);