40:
G4VViewer(sceneHandler, sceneHandler.IncrementViewCount(),
name)
41, fQt3DSceneHandler(sceneHandler)
50 setObjectName(
fName.c_str());
56 auto uiQt =
dynamic_cast<G4UIQt*
>(UI->GetG4UIWindow());
59 G4cerr <<
"G4Qt3DViewer::G4Qt3DViewer requires G4UIQt"
63 fUIWidget = QWidget::createWindowContainer(
this);
64 fUIWidget->setMinimumSize(QSize(200, 100));
65 fUIWidget->setMaximumSize(screen()->size());
86 if(radius<=0.) radius = 1.;
93 const GLdouble left = -right;
95 const GLdouble bottom = -top;
97 camera()->setObjectName((
fName +
" camera").c_str());
118 camera()->lens()->setOrthographicProjection
119 (left*aspectRatio,right*aspectRatio,bottom,top,pnear,pfar);
121 camera()->lens()->setPerspectiveProjection
146 if (kernelVisitWasNeeded) {
182 G4cout <<
"G4Qt3DViewer::MovingToVisSubThread" <<
G4endl;
188 std::this_thread::sleep_for(std::chrono::milliseconds(100));
191 auto p2 = p1->parent();
198 G4cout <<
"G4Qt3DViewer::SwitchToVisSubThread" <<
G4endl;
204 std::this_thread::sleep_for(std::chrono::milliseconds(1000));
210 G4cout <<
"G4Qt3DViewer::MovingToMasterThread" <<
G4endl;
215 auto p2 = p1->parent();
224 G4cout <<
"G4Qt3DViewer::SwitchToMasterThread" <<
G4endl;
330 const G4double dxScene = dx*sceneRadius/scale;
331 const G4double dyScene = dy*sceneRadius/scale;
341 newViewpointDirection += dx*x_prime/scale;
342 newViewpointDirection += dy*y_prime/scale;
347 newUpVector += dx*x_prime/scale;
348 newUpVector += dy*y_prime/scale;
373 const G4double angleY = ev->angleDelta().y();
static constexpr double deg
G4GLOB_DLL std::ostream G4cerr
G4GLOB_DLL std::ostream G4cout
Qt3DCore::QEntity * fpQt3DScene
void mousePressEvent(QMouseEvent *)
void KernelVisitDecision()
G4Qt3DSceneHandler & fQt3DSceneHandler
void SwitchToMasterThread()
void SwitchToVisSubThread()
void MovingToMasterThread()
void mouseReleaseEvent(QMouseEvent *)
void wheelEvent(QWheelEvent *)
void keyPressEvent(QKeyEvent *)
G4Qt3DViewer(G4Qt3DSceneHandler &, const G4String &name)
void mouseDoubleClickEvent(QMouseEvent *)
void MovingToVisSubThread()
void mouseMoveEvent(QMouseEvent *)
G4bool CompareForKernelVisit(G4ViewParameters &)
void keyReleaseEvent(QKeyEvent *)
const G4VisExtent & GetExtent() const
const G4Point3D & GetStandardTargetPoint() const
static G4UImanager * GetUIpointer()
G4Scene * GetScene() const
G4VSceneHandler & fSceneHandler
G4ViewParameters fDefaultVP
void SetViewpointDirection(const G4Vector3D &viewpointDirection)
const std::vector< G4ModelingParameters::VisAttributesModifier > & GetVisAttributesModifiers() const
void SetAutoRefresh(G4bool)
G4int GetNoOfSides() const
G4bool IsSpecialMeshRendering() const
G4double GetCameraDistance(G4double radius) const
G4double GetExplodeFactor() const
G4int GetNumberOfCloudPoints() const
G4bool IsMarkerNotHidden() const
G4double GetGlobalLineWidthScale() const
const G4Colour & GetBackgroundColour() const
const G4Vector3D & GetViewpointDirection() const
const G4Point3D & GetCurrentTargetPoint() const
G4double GetFarDistance(G4double cameraDistance, G4double nearDistance, G4double radius) const
G4double GetFieldHalfAngle() const
G4double GetFrontHalfHeight(G4double nearDistance, G4double radius) const
const G4VisAttributes * GetDefaultTextVisAttributes() const
void SetDolly(G4double dolly)
void IncrementPan(G4double right, G4double up)
const G4Vector3D & GetUpVector() const
const std::vector< G4double > & GetCBDParameters() const
G4int GetCBDAlgorithmNumber() const
const std::vector< G4ModelingParameters::PVNameCopyNo > & GetSpecialMeshVolumes() const
G4double GetGlobalMarkerScale() const
G4bool IsCullingInvisible() const
const G4VisAttributes * GetDefaultVisAttributes() const
void SetUpVector(const G4Vector3D &upVector)
RotationStyle GetRotationStyle() const
G4bool IsDensityCulling() const
void MultiplyZoomFactor(G4double zoomFactorMultiplier)
G4double GetVisibleDensity() const
G4bool IsCullingCovered() const
G4double GetNearDistance(G4double cameraDistance, G4double radius) const
DrawingStyle GetDrawingStyle() const
G4bool IsAuxEdgeVisible() const
G4double GetDolly() const
const G4Colour & GetColour() const
G4double GetExtentRadius() const
BasicVector3D< T > cross(const BasicVector3D< T > &v) const
BasicVector3D< T > unit() const
const char * name(G4int ptype)
QColor ConvertToQColor(const G4Colour &c)
QVector3D ConvertToQVector3D(const G4ThreeVector &v)
QThread * visSubThreadQThread