68 theclass->messageVerbose(
"(Re)building 3D objects");
71 sep->removeAllChildren();
73 sep =
new SoSeparator;
77 const bool save =
sep->enableNotify(
false);
79 SoVertexProperty * line_vertices =
new SoVertexProperty();
81 line_vertices->vertex.set1Value(0,0.0,0.0,0.0);
84 line_vertices->materialBinding=SoMaterialBinding::OVERALL;
85 line_vertices->normalBinding=SoNormalBinding::OVERALL;
86 SoLineSet * line =
new SoLineSet();
87 line->numVertices.enableNotify(FALSE);
90 line->vertexProperty = line_vertices;
91 line->numVertices.enableNotify(TRUE);
92 line->numVertices.touch();
96 constexpr bool convert =
false;
98 SbVec3f p1 = line_vertices->vertex[0].getValue();
99 SbVec3f p2 = line_vertices->vertex[1].getValue();
100 SoCylinder * cylinder =
new SoCylinder;
101 cylinder->radius = 4.0;
105 cylinder->height = height;
108 m.setTranslate(SbVec3f(0,0.5*height,0));
109 SbVec3f v(p2); v -= p1;
110 SbRotation rotation(SbVec3f(0,1,0),v);
111 SbMatrix m2; m2.setRotate(rotation);
118 SoMatrixTransform * mt =
new SoMatrixTransform;
119 mt->matrix.setValue(mat);
121 sep->addChild(cylinder);
122 }
else sep->addChild(line);
127 sep->enableNotify(
true);