246 errDetailed->addChild(
t1 );
247 errSimple->addChild(
t1 );
250 const double sqrtv0 = sqrt( tmpcovmat(0,0) );
253 sqrtv1 = sqrt( tmpcovmat(1,1) );
265 const double rp =
radius + sigmaScale * sqrtv0;
266 const double rm =
radius - sigmaScale * sqrtv0;
269 SoTranslation *
t0 =
new SoTranslation;
273 SoSeparator * circleGrp =
new SoSeparator;
274 circleGrp->addChild(
t0);
276 SoSeparator * circleGrpSimple =
new SoSeparator;
277 circleGrpSimple->addChild(
t0);
279 SoVertexProperty *vertices =
new SoVertexProperty();
282 if ( drawZErrCircles )
285 zz[0] = -sigmaScale * sqrtv1;
287 zz[2] = +sigmaScale * sqrtv1;
307 SoLineSet * circles =
new SoLineSet();
308 SoLineSet * circlesSimple =
new SoLineSet();
311 int numlinesSimple(0);
312 for (
int k = 0;
k<Nrr;
k++)
314 for (
int j = 0; j<Nzz; j++)
316 vertices->vertex.set1Value(iver++,
rr[
k],0.0,zz[j]);
317 for (
int i = 1;
i < numNodes;
i++)
319 vertices->vertex.set1Value(iver++,
320 cos(2.0*
static_cast<double>(
i)*
M_PI/
static_cast<double>(numNodes))*
rr[
k],
321 sin(2.0*
static_cast<double>(
i)*
M_PI/
static_cast<double>(numNodes))*
rr[
k],
324 vertices->vertex.set1Value(iver++,
rr[
k],0.0,zz[j]);
326 circles->numVertices.set1Value(numlines++,numNodes+1);
330 circlesSimple->numVertices.set1Value(numlinesSimple++,numNodes+1);
334 circles->vertexProperty = vertices;
335 circleGrp->addChild( circles );
337 circlesSimple->vertexProperty = vertices;
338 circleGrpSimple->addChild( circlesSimple );
340 errDetailed->addChild( circleGrp );
341 errSimple->addChild( circleGrpSimple );
346 SoCylinder * outerCyl =
new SoCylinder;
347 outerCyl->removePart( SoCylinder::TOP );
348 outerCyl->removePart( SoCylinder::BOTTOM );
349 outerCyl->radius.setValue (
rp );
350 outerCyl->height.setValue ( 2.0 * sigmaScale * sqrtv1 );
352 SoSeparator * cylGrp =
new SoSeparator;
353 cylGrp->addChild(
t0);
355 SoGroup * outCylGrp =
new SoGroup;
356 SoRotationXYZ * outCylRot =
new SoRotationXYZ;
358 outCylRot->angle = M_PI_2;
359 outCylGrp->addChild(outCylRot);
360 outCylGrp->addChild(outerCyl);
361 cylGrp->addChild(outCylGrp);
365 errDetailed->addChild( trans );
366 errDetailed->addChild( cylGrp );