65 {
68
71
72 SoShape * shape(
a.getShape() ?
a.getShape() :
new SoCylinder);
74
76 if (shape->getTypeId().isDerivedFrom(SoTubs::getClassTypeId())) {
77 SoTubs * tubs = static_cast<SoTubs*>(shape);
78 const double halfz(tubs->
pDz.getValue());
79 tubs->
pDz.setValue(halfz + 0.2*CLHEP::mm);
80
81 SoLineSet *
line =
new SoLineSet;
82 SoVertexProperty * vertices = new SoVertexProperty;
83 line->vertexProperty = vertices;
84 vertices->vertex.set1Value(0,0,0,+(halfz-0.1*CLHEP::mm));
85 vertices->vertex.set1Value(1,0,0,-(halfz-0.1*CLHEP::mm));
86 line->numVertices.set1Value(0,2);
88 }
91 }
SoSFFloat pDz
Half-length in Z.
static void initClass()
Class Initializer, required.
static SoTransform * toSoTransform(const HepGeom::Transform3D &, SoTransform *t=0)