50fSceneHandler (sceneHandler),
53fNeedKernelVisit (true)
56 std::ostringstream ost;
131(
const std::vector<G4PhysicalVolumeModel::G4PhysicalVolumeNodeID>& fullPath)
134 std::ostringstream oss;
136 for (
const auto& pvNodeId: fullPath) {
137 const auto& pv = pvNodeId.GetPhysicalVolume();
138 auto iterator = find(pvStore->cbegin(),pvStore->cend(),pv);
139 if (iterator == pvStore->cend()) {
141 ed <<
"Volume no longer in physical volume store.";
145 <<
' ' << pvNodeId.GetPhysicalVolume()->GetName()
146 <<
' ' << pvNodeId.GetCopyNo();
153(
const std::vector<G4PhysicalVolumeModel::G4PhysicalVolumeNodeID>& fullPath,
178(
const std::vector<G4PhysicalVolumeModel::G4PhysicalVolumeNodeID>& fullPath,
212 G4int stepPoints = 500;
225 std::vector <G4ThreeVector> viewVect;
232 for (
G4int i = 0; i < stepPoints; ++i) {
239 G4cout <<
"FLY CR("<< i <<
"):" << cameraPosition <<
G4endl;
240 viewVect.push_back(
G4ThreeVector (cameraPosition.
x(), cameraPosition.
y(), cameraPosition.
z()));
352#ifdef G4MULTITHREADED
354void G4VViewer::DoneWithMasterThread () {
358void G4VViewer::MovingToMasterThread () {
362void G4VViewer::SwitchToVisSubThread () {
366void G4VViewer::DoneWithVisSubThread () {
370void G4VViewer::MovingToVisSubThread () {
374void G4VViewer::SwitchToMasterThread () {
381 os <<
"View " << v.
fName <<
":\n";
404 G4float b1 = .5 * ( -t3 + 2*t2 - t);
405 G4float b2 = .5 * ( 3*t3 - 5*t2 + 2);
406 G4float b3 = .5 * (-3*t3 + 4*t2 + t);
409 return (p1*b1 + p2*b2 + p3*b3 + p4*b4);
426 return (
G4int)vp.size();
434#define BOUNDS(pp) { if (pp < 0) pp = 0; else if (pp >= (G4int)vp.size()-1) pp = (G4int)vp.size() - 1; }
440 G4float lt = (t - delta_t*p) / delta_t;
442 return CatmullRom_Eq(lt, vp[p0], vp[p1], vp[p2], vp[p3]);
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
std::ostream & operator<<(std::ostream &os, const G4VViewer &v)
HepGeom::Vector3D< G4double > G4Vector3D
G4GLOB_DLL std::ostream G4cout
static G4ModelingParameters::PVNameCopyNoPath GetPVNameCopyNoPath(const std::vector< G4PhysicalVolumeNodeID > &)
static G4PhysicalVolumeStore * GetInstance()
G4double GetRealElapsed() const
G4int ApplyCommand(const char *aCommand)
static G4UImanager * GetUIpointer()
virtual void ProcessScene()
const G4String & GetName() const
void RemoveViewerFromList(G4VViewer *pView)
virtual void ClearStore()
G4Vector3D CatmullRom_Eq(G4float t, const G4Vector3D &p1, const G4Vector3D &p2, const G4Vector3D &p3, const G4Vector3D &p4)
void AddSplinePoint(const G4Vector3D &v)
G4Vector3D GetInterpolatedSplinePoint(G4float t)
void SetTouchable(const std::vector< G4PhysicalVolumeModel::G4PhysicalVolumeNodeID > &fullPath)
void SetName(const G4String &)
G4VSceneHandler & fSceneHandler
G4double fKernelVisitElapsedTimeSeconds
std::vector< G4ThreeVector > ComputeFlyThrough(G4Vector3D *)
G4ViewParameters fDefaultVP
void TouchableSetVisibility(const std::vector< G4PhysicalVolumeModel::G4PhysicalVolumeNodeID > &fullPath, G4bool visibility)
virtual void FinishView()
G4VViewer(G4VSceneHandler &, G4int id, const G4String &name="")
void SetViewParameters(const G4ViewParameters &vp)
void TouchableSetColour(const std::vector< G4PhysicalVolumeModel::G4PhysicalVolumeNodeID > &fullPath, const G4Colour &)
void AddVisAttributesModifier(const G4ModelingParameters::VisAttributesModifier &)
void SetColour(const G4Colour &)
void SetVisibility(G4bool=true)
const G4ViewParameters & GetDefaultViewParameters() const
static G4VisManager * GetInstance()
void strip(G4String &str, char ch=' ')
Remove leading and trailing characters from string.