92{
93 theclass->messageVerbose(
"(Re)building 3D objects");
94
96 sep->removeAllChildren();
97 } else {
98 sep =
new SoSeparator;
100 }
101
102 const bool save =
sep->enableNotify(
false);
103
104 int nmax;
double distmax;
107 distmax = 10*SYSTEM_OF_UNITS::m;
108 theclass->message(
"ERROR: Problems calculating nmax/distmax.");
109 }
110
111 SoVertexProperty * floor_vertices = new SoVertexProperty();
112 int ivert(0);
113 int nsublines(0);
114 for (
int ix = -
nmax; ix<=
nmax; ++ix) {
116 floor_vertices->vertex.set1Value(ivert++,
x,
vertpos,-distmax);
117 floor_vertices->vertex.set1Value(ivert++,
x,
vertpos,+distmax);
118 ++nsublines;
119 }
120 for (
int iz = -
nmax; iz<=
nmax; ++iz) {
122 floor_vertices->vertex.set1Value(ivert++,-distmax,
vertpos,
z);
123 floor_vertices->vertex.set1Value(ivert++,+distmax,
vertpos,
z);
124 ++nsublines;
125 }
126
127 floor_vertices->materialBinding=SoMaterialBinding::OVERALL;
128 floor_vertices->normalBinding=SoNormalBinding::OVERALL;
129 SoLineSet *
line =
new SoLineSet();
130 line->numVertices.enableNotify(FALSE);
131 line->numVertices.setNum(nsublines);
132 for (
int i=0;
i<nsublines;++
i)
133 line->numVertices.set1Value(i,2);
134 line->vertexProperty = floor_vertices;
135 line->numVertices.enableNotify(TRUE);
136 line->numVertices.touch();
137
140
141 if (save) {
142 sep->enableNotify(
true);
144 }
145
146}
static bool calcParsFromExtentAndSpacing(const VP1HelperClassBase *, const double &extent, const double &spacing, const int &nmaxlimit, int &nmax, double &distmax)