67{
68 theclass->messageVerbose(
"(Re)building 3D objects");
69
71 sep->removeAllChildren();
72 } else {
73 sep =
new SoSeparator;
75 }
76
77 const bool save =
sep->enableNotify(
false);
78
79 SoVertexProperty * line_vertices = new SoVertexProperty();
80
81 line_vertices->vertex.set1Value(0,0.0,0.0,0.0);
83
84 line_vertices->materialBinding=SoMaterialBinding::OVERALL;
85 line_vertices->normalBinding=SoNormalBinding::OVERALL;
86 SoLineSet *
line =
new SoLineSet();
87 line->numVertices.enableNotify(FALSE);
88
89
90 line->vertexProperty = line_vertices;
91 line->numVertices.enableNotify(TRUE);
92 line->numVertices.touch();
93
94
95
97 if (convert) {
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;
106
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);
123
125
126 if (save) {
127 sep->enableNotify(
true);
129 }
130
131}
std::unique_ptr< MVAUtils::BDT > convert(TMVA::MethodBDT *bdt, bool isRegression=true, bool useYesNoLeaf=false)