44 fRefreshAtEndOfEvent(true),
45 fRefreshAtEndOfRun(true),
46 fMaxNumberOfKeptEvents(100)
53 std::vector<Model>::const_iterator i;
56 if (pModel -> GetGlobalDescription () ==
61 G4cout <<
"G4Scene::AddRunDurationModel: model \""
62 << pModel -> GetGlobalDescription ()
63 <<
"\"\n is already in the run-duration list of scene \""
73 if (pModel -> GetGlobalTag () ==
79 <<
"G4Scene::AddRunDurationModel: The tag \""
81 <<
"\"\n duplicates one already in scene \""
84 "\".\n This may be intended but if not, you may inspect the scene with"
85 "\n \"/vis/scene/list\" and deactivate unwanted models with"
86 "\n \"/vis/scene/activateModel\". Or create a new scene."
105 if (model -> Validate()) {
108 if (thisRadius > 0.) {
110 thisCentre.transform (model -> GetTransformation ());
116 <<
"\".\n Not included in extent calculation.";
118 (
"G4Scene::CalculateExtent",
127 if (model -> Validate()) {
130 if (thisRadius > 0.) {
132 thisCentre.transform (model -> GetTransformation ());
138 <<
"\".\n Not included in extent calculation.";
140 (
"G4Scene::CalculateExtent",
149 if (model -> Validate()) {
152 if (thisRadius > 0.) {
154 thisCentre.transform (model -> GetTransformation ());
160 <<
"\".\n Not included in extent calculation.";
162 (
"G4Scene::CalculateExtent",
172 (
"G4Scene::CalculateExtent",
174 "Scene has no extent. Please activate or add something."
175 "\nThe camera needs to have something to point at!"
176 "\nAdd a volume. (You may need \"/run/initialize\".)"
177 "\nOr use \"/vis/scene/add/extent\"."
178 "\n\"/vis/scene/list\" to see list of models.");
188 -> GetNavigatorForTracking () -> GetWorldVolume ();
191 pWorld -> GetLogicalVolume () -> GetVisAttributes ();
192 if (!pVisAttribs || pVisAttribs -> IsVisible ()) {
195 "Your \"world\" has no vis attributes or is marked as visible."
196 "\n For a better view of the contents, mark the world as"
198 "\n myWorldLogicalVol ->"
199 " SetVisAttributes (G4VisAttributes::GetInvisible());"
208 "G4Scene::AddWorldIfEmpty: The scene was empty of run-duration models."
209 "\n \"world\" has been added.";
220 for (i = 0; i < nModels; i++) {
221 if (pModel -> GetGlobalDescription () ==
226 G4cout <<
"G4Scene::AddEndOfEventModel: a model \""
227 << pModel -> GetGlobalDescription ()
228 <<
"\"\n is already in the end-of-event list of scene \""
240 for (i = 0; i < nModels; i++) {
241 if (pModel -> GetGlobalDescription () ==
246 G4cout <<
"G4Scene::AddEndOfRunModel: a model \""
247 << pModel -> GetGlobalDescription ()
248 <<
"\"\n is already in the end-of-run list of scene \""
264 os <<
"\n Run-duration model list:";
267 else os <<
"\n Inactive: ";
271 os <<
"\n End-of-event model list:";
274 else os <<
"\n Inactive: ";
278 os <<
"\n End-of-run model list:";
281 else os <<
"\n Inactive: ";
285 os <<
"\n Extent or bounding box: " << scene.
fExtent;
289 os <<
"\n End of event action set to \"";
292 os <<
"accumulate (maximum number of kept events: ";
294 else os <<
"unlimited";
298 os <<
"\n End of run action set to \"";
300 else os <<
"accumulate";
G4Scene(const G4String &name="scene-with-unspecified-name")
std::ostringstream G4ExceptionDescription
G4bool AddEndOfEventModel(G4VModel *, G4bool warn=false)
std::ostream & operator<<(std::ostream &, const BasicVector3D< float > &)
const G4String & GetGlobalDescription() const
const G4Point3D & GetExtentCentre() const
void AccrueBoundingSphere(const G4Point3D ¢re, G4double radius)
const G4String & GetGlobalTag() const
G4bool fRefreshAtEndOfRun
G4bool operator!=(const G4Scene &) const
G4int fMaxNumberOfKeptEvents
G4VisExtent GetBoundingSphereExtent()
G4bool AddEndOfRunModel(G4VModel *, G4bool warn=false)
static G4TransportationManager * GetTransportationManager()
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4bool AddRunDurationModel(G4VModel *, G4bool warn=false)
G4double GetExtentRadius() const
G4Point3D fStandardTargetPoint
std::vector< Model > fEndOfRunModelList
G4GLOB_DLL std::ostream G4cout
const G4VisExtent & GetExtent() const
std::vector< Model > fRunDurationModelList
G4bool fRefreshAtEndOfEvent
const XML_Char XML_Content * model
std::vector< Model > fEndOfEventModelList
G4bool AddWorldIfEmpty(G4bool warn=false)