| Message: Re: G4VVisPrim in Geant4.7.1 and G4VVisManager in Geant4.8.0 | Not Logged In (login) |
|
Yes, it is enough to eliminate the two lines that refer to G4VVisPrim. You may also remove the other assignment operator. It is not mandatory to extend G4Polyhedron for each new solid. You may use the generic construction function HepPolyhedron::createPolyhedron, as, for example, for G4Tet:
G4Polyhedron* G4Tet::CreatePolyhedron () const {
G4Polyhedron *ph=new G4Polyhedron;
G4double xyz[4][3];
static G4int faces[4][4]={{1,3,2,0},{1,4,3,0},{1,2,4,0},{2,3,4,0}};
xyz[0][0]=fAnchor.x(); xyz[0][1]=fAnchor.y(); xyz[0][2]=fAnchor.z();
xyz[1][0]=fP2.x(); xyz[1][1]=fP2.y(); xyz[1][2]=fP2.z();
xyz[2][0]=fP3.x(); xyz[2][1]=fP3.y(); xyz[2][2]=fP3.z();
xyz[3][0]=fP4.x(); xyz[3][1]=fP4.y(); xyz[3][2]=fP4.z();
ph->createPolyhedron(4,4,xyz,faces);
return ph;
}
|
| Inline Depth: | Outline Depth: | Add message: |
|
to: |