909 {
910 os << "View parameters and options:";
911
912 os << "\n Drawing style: " << v.fDrawingStyle;
913
914 os << "\n Number of cloud points: " << v.fNumberOfCloudPoints;
915
916 os << "\n Auxiliary edges: ";
917 if (!v.fAuxEdgeVisible) os << "in";
918 os << "visible";
919
920 os << "\n Culling: ";
921 if (v.fCulling) os << "on";
922 else os << "off";
923
924 os << "\n Culling invisible objects: ";
925 if (v.fCullInvisible) os << "on";
926 else os << "off";
927
928 os << "\n Density culling: ";
929 if (v.fDensityCulling) {
930 os << "on - invisible if density less than "
931 << v.fVisibleDensity / (1. * g / cm3) << " g cm^-3";
932 }
933 else os << "off";
934
935 os << "\n Culling daughters covered by opaque mothers: ";
936 if (v.fCullCovered) os << "on";
937 else os << "off";
938
939 os << "\n Colour by density: ";
940 if (v.fCBDAlgorithmNumber <= 0) {
941 os << "inactive";
942 } else {
943 os << "Algorithm " << v.fCBDAlgorithmNumber << ", Parameters:";
944 for (auto p: v.fCBDParameters) {
946 }
947 }
948
949 os << "\n Section flag: ";
950 if (v.fSection) os << "true, section/cut plane: " << v.fSectionPlane;
951 else os << "false";
952
954 os << "\n Cutaway planes: ";
955 for (size_t i = 0; i < v.fCutawayPlanes.size (); i++) {
956 os << ' ' << v.fCutawayPlanes[i];
957 }
958 }
959 else {
960 os << "\n No cutaway planes";
961 }
962
963 os << "\n Explode factor: " << v.fExplodeFactor
964 << " about centre: " << v.fExplodeCentre;
965
966 os << "\n No. of sides used in circle polygon approximation: "
967 << v.fNoOfSides;
968
969 os << "\n Viewpoint direction: " << v.fViewpointDirection;
970
971 os << "\n Up vector: " << v.fUpVector;
972
973 os << "\n Field half angle: " << v.fFieldHalfAngle;
974
975 os << "\n Zoom factor: " << v.fZoomFactor;
976
977 os << "\n Scale factor: " << v.fScaleFactor;
978
979 os << "\n Current target point: " << v.fCurrentTargetPoint;
980
981 os << "\n Dolly distance: " << v.fDolly;
982
983 os << "\n Light ";
984 if (v.fLightsMoveWithCamera) os << "moves";
985 else os << "does not move";
986 os << " with camera";
987
988 os << "\n Relative lightpoint direction: "
989 << v.fRelativeLightpointDirection;
990
991 os << "\n Actual lightpoint direction: "
992 << v.fActualLightpointDirection;
993
994 os << "\n Derived parameters for standard view of object of unit radius:";
996 tempVP.fDolly = 0.;
997 tempVP.fZoomFactor = 1.;
1005 os << "\n Camera distance: " << cameraDistance;
1006 os << "\n Near distance: " << nearDistance;
1007 os << "\n Far distance: " << farDistance;
1008 os << "\n Front half height: " << right;
1009
1010 os << "\n Default VisAttributes:\n " << v.fDefaultVisAttributes;
1011
1012 os << "\n Default TextVisAttributes:\n " << v.fDefaultTextVisAttributes;
1013
1014 os << "\n Default marker: " << v.fDefaultMarker;
1015
1016 os << "\n Global marker scale: " << v.fGlobalMarkerScale;
1017
1018 os << "\n Global lineWidth scale: " << v.fGlobalLineWidthScale;
1019
1020 os << "\n Marker ";
1021 if (v.fMarkerNotHidden) os << "not ";
1022 os << "hidden by surfaces.";
1023
1024 os << "\n Window size hint: "
1025 << v.fWindowSizeHintX << 'x'<< v.fWindowSizeHintX;
1026
1027 os << "\n X geometry string: " << v.fXGeometryString;
1028 os << "\n X geometry mask: "
1029 << std::showbase << std::hex << v.fGeometryMask
1030 << std::noshowbase << std::dec;
1031
1032 os << "\n Auto refresh: ";
1033 if (v.fAutoRefresh) os << "true";
1034 else os << "false";
1035
1036 os << "\n Background colour: " << v.fBackgroundColour;
1037
1038 os << "\n Picking requested: ";
1039 if (v.fPicking) os << "true";
1040 else os << "false";
1041
1042 os << "\n Rotation style: ";
1043 switch (v.fRotationStyle) {
1045 os << "constrainUpDirection (conventional HEP view)"; break;
1047 os << "freeRotation (Google-like rotation, using mouse-grab)"; break;
1048 default: os << "unrecognised"; break;
1049 }
1050
1051 os << "\n Vis attributes modifiers: ";
1052 const std::vector<G4ModelingParameters::VisAttributesModifier>& vams =
1053 v.fVisAttributesModifiers;
1054 if (vams.empty()) {
1055 os << "None";
1056 } else {
1057 os << vams;
1058 }
1059
1060 os << "\n Time window parameters:"
1061 << "\n Start time: " << v.fStartTime/ns << " ns"
1062 << "\n End time: " << v.fEndTime/ns << " ns"
1063 << "\n Fade factor: " << v.fFadeFactor;
1064 if (!v.fDisplayHeadTime) {
1065 os << "\n Head time display not requested.";
1066 } else {
1067 os
1068 << "\n Head time position: "
1069 << v.fDisplayHeadTimeX << ' ' << v.fDisplayHeadTimeY
1070 << "\n Head time size: " << v.fDisplayHeadTimeSize
1071 << "\n Head time colour: " << v.fDisplayHeadTimeRed
1072 << ' ' << v.fDisplayHeadTimeGreen << ' ' << v.fDisplayHeadTimeBlue;
1073 }
1074 if (!v.fDisplayLightFront) {
1075 os << "\n Light front display not requested.";
1076 } else {
1077 os
1078 << "\n Light front position: "
1079 << v.fDisplayLightFrontX/mm << ' ' << v.fDisplayLightFrontY/mm
1080 << ' ' << v.fDisplayLightFrontZ/mm << " mm"
1081 << "\n Light front time: " << v.fDisplayLightFrontT/ns << " ns"
1082 << "\n Light front colour: " << v.fDisplayLightFrontRed
1083 << ' ' << v.fDisplayLightFrontGreen << ' ' << v.fDisplayLightFrontBlue;
1084 }
1085
1086 os << "\n Special Mesh Rendering";
1087 if (v.fSpecialMeshRendering) {
1088 os << " requested with option \"" << v.fSpecialMeshRenderingOption;
1089 os << "\" for ";
1090 if (v.fSpecialMeshVolumes.empty()) {
1091 os << "any mesh";
1092 } else {
1093 os << "selected meshes";
1094 for (const auto& vol: v.fSpecialMeshVolumes) {
1095 os << "\n " << vol.GetName() << ':' << vol.GetCopyNo();
1096 }
1097 }
1098 } else os << ": off";
1099 return os;
1100}
G4double GetCameraDistance(G4double radius) const
G4double GetFarDistance(G4double cameraDistance, G4double nearDistance, G4double radius) const
G4double GetFrontHalfHeight(G4double nearDistance, G4double radius) const
G4double GetNearDistance(G4double cameraDistance, G4double radius) const