Import Geant4 11.1.1 source tree

This commit is contained in:
Gabriele Cosmo
2023-02-14 13:57:32 +01:00
parent 9f34590941
commit 84a556a9dc
312 changed files with 35018 additions and 36005 deletions
+6
View File
@@ -6,6 +6,12 @@ It must **not** be used as a substitute for writing good git commit messages!
-------------------------------------------------------------------------------
## 2022-12-13 John Allison (modeling-V11-00-15)
- G4TextModel: Fix transform.
- The rotation part of the transform was being ignored. This impacted
the implementation of /vis/scene/add/localAxes.
- G4AxesModel: Tidied.
## 2022-11-25 Gabriele Cosmo (modeling-V11-00-14)
- Fixed compilation warnings for implicit type conversions on macOS/XCode 14.1.
@@ -124,9 +124,6 @@ void G4AxesModel::Construct
}
G4String annotation = G4BestUnit(length,"Length");
G4Text* text = 0;
G4VisAttributes* va = 0;
G4int lineSegmentsPerCircle = 6;
G4Colour xColour(colour);
@@ -136,22 +133,19 @@ void G4AxesModel::Construct
xColour, "x-axis: " + description,
lineSegmentsPerCircle, fTransform);
if (withAnnotation) {
text = new G4Text("x",G4Point3D(x0+1.05*length, y0, z0));
text->SetScreenSize(textSize);
text->SetOffset(0.5*textSize,0.5*textSize);
text->SetLayout(G4Text::centre);
va = new G4VisAttributes(xColour);
text->SetVisAttributes(va);
fXLabelModel = new G4TextModel(*text,fTransform);
delete text;
text = new G4Text(annotation,G4Point3D(x0+0.8*length, y0, z0));
text->SetScreenSize(textSize);
text->SetOffset(-1.5*textSize,-1.5*textSize);
text->SetLayout(G4Text::centre);
va = new G4VisAttributes(xColour);
text->SetVisAttributes(va);
fXAnnotationModel = new G4TextModel(*text,fTransform);
delete text;
G4VisAttributes va(xColour);
G4Text lmtext("x",G4Point3D(x0+1.05*length,y0,z0));
lmtext.SetScreenSize(textSize);
lmtext.SetOffset(0.5*textSize,0.5*textSize);
lmtext.SetLayout(G4Text::centre);
lmtext.SetVisAttributes(va);
fXLabelModel = new G4TextModel(lmtext,fTransform);
G4Text amtext(annotation,G4Point3D(x0+0.8*length,y0,z0));
amtext.SetScreenSize(textSize);
amtext.SetOffset(-1.5*textSize,-1.5*textSize);
amtext.SetLayout(G4Text::centre);
amtext.SetVisAttributes(va);
fXAnnotationModel = new G4TextModel(amtext,fTransform);
}
G4Colour yColour(colour);
@@ -161,22 +155,19 @@ void G4AxesModel::Construct
yColour, "y-axis: " + description,
lineSegmentsPerCircle, fTransform);
if (withAnnotation) {
text = new G4Text("y",G4Point3D(x0, y0+1.05*length, z0));
text->SetScreenSize(textSize);
text->SetOffset(0.5*textSize,0.5*textSize);
text->SetLayout(G4Text::centre);
va = new G4VisAttributes(yColour);
text->SetVisAttributes(va);
fYLabelModel = new G4TextModel(*text,fTransform);
delete text;
text = new G4Text(annotation,G4Point3D(x0, y0+0.8*length, z0));
text->SetScreenSize(textSize);
text->SetOffset(-1.5*textSize,-1.5*textSize);
text->SetLayout(G4Text::centre);
va = new G4VisAttributes(yColour);
text->SetVisAttributes(va);
fYAnnotationModel = new G4TextModel(*text,fTransform);
delete text;
G4VisAttributes va(yColour);
G4Text lmtext("y",G4Point3D(x0,y0+1.05*length,z0));
lmtext.SetScreenSize(textSize);
lmtext.SetOffset(0.5*textSize,0.5*textSize);
lmtext.SetLayout(G4Text::centre);
lmtext.SetVisAttributes(va);
fYLabelModel = new G4TextModel(lmtext,fTransform);
G4Text amtext(annotation,G4Point3D(x0,y0+0.8*length,z0));
amtext.SetScreenSize(textSize);
amtext.SetOffset(-1.5*textSize,-1.5*textSize);
amtext.SetLayout(G4Text::centre);
amtext.SetVisAttributes(va);
fYAnnotationModel = new G4TextModel(amtext,fTransform);
}
G4Colour zColour(colour);
@@ -186,22 +177,19 @@ void G4AxesModel::Construct
zColour, "z-axis: " + description,
lineSegmentsPerCircle, fTransform);
if (withAnnotation) {
text = new G4Text("z",G4Point3D(x0, y0, z0+1.05*length));
text->SetScreenSize(textSize);
text->SetOffset(0.5*textSize,0.5*textSize);
text->SetLayout(G4Text::centre);
va = new G4VisAttributes(zColour);
text->SetVisAttributes(va);
fZLabelModel = new G4TextModel(*text,fTransform);
delete text;
text = new G4Text(annotation,G4Point3D(x0, y0, z0+0.8*length));
text->SetScreenSize(textSize);
text->SetOffset(-1.5*textSize,-1.5*textSize);
text->SetLayout(G4Text::centre);
va = new G4VisAttributes(zColour);
text->SetVisAttributes(va);
fZAnnotationModel = new G4TextModel(*text,fTransform);
delete text;
G4VisAttributes va(zColour);
G4Text lmtext("z",G4Point3D(x0,y0,z0+1.05*length));
lmtext.SetScreenSize(textSize);
lmtext.SetOffset(0.5*textSize,0.5*textSize);
lmtext.SetLayout(G4Text::centre);
lmtext.SetVisAttributes(va);
fZLabelModel = new G4TextModel(lmtext,fTransform);
G4Text amtext(annotation,G4Point3D(x0,y0,z0+0.8*length));
amtext.SetScreenSize(textSize);
amtext.SetOffset(-1.5*textSize,-1.5*textSize);
amtext.SetLayout(G4Text::centre);
amtext.SetVisAttributes(va);
fZAnnotationModel = new G4TextModel(amtext,fTransform);
}
}
@@ -51,7 +51,7 @@ G4TextModel::G4TextModel (const G4Text& g4Text, const G4Transform3D& transform)
fGlobalTag = oss.str();
fGlobalDescription = fGlobalTag;
fG4Text.SetPosition(fG4Text.GetPosition()+transform.getTranslation());
fG4Text.SetPosition(fG4Text.GetPosition().transform(transform));
}
void G4TextModel::DescribeYourselfTo (G4VGraphicsScene& sceneHandler) {