42:
G4VViewer(sceneHandler, sceneHandler.IncrementViewCount(), name)
43, fQt3DSceneHandler(sceneHandler)
52 setObjectName(
fName.c_str());
58 auto uiQt =
dynamic_cast<G4UIQt*
>(UI->GetG4UIWindow());
61 G4warn <<
"G4Qt3DViewer::G4Qt3DViewer requires G4UIQt"
65 fUIWidget = QWidget::createWindowContainer(
this);
66 fUIWidget->setMinimumSize(QSize(200, 100));
67 fUIWidget->setMaximumSize(screen()->size());
88 if(radius<=0.) radius = 1.;
95 const GLdouble left = -right;
97 const GLdouble bottom = -top;
99 camera()->setObjectName((
fName +
" camera").c_str());
120 camera()->lens()->setOrthographicProjection
121 (left*aspectRatio,right*aspectRatio,bottom,top,pnear,pfar);
123 camera()->lens()->setPerspectiveProjection
148 if (kernelVisitWasNeeded) {
175 QThread* masterQThread =
nullptr;
176 QThread* visSubThreadQThread =
nullptr;
184 G4cout <<
"G4Qt3DViewer::MovingToVisSubThread" <<
G4endl;
188 masterQThread = QThread::currentThread();
190 std::this_thread::sleep_for(std::chrono::milliseconds(100));
193 auto p2 = p1->parent();
194 p2->moveToThread(visSubThreadQThread);
200 G4cout <<
"G4Qt3DViewer::SwitchToVisSubThread" <<
G4endl;
204 visSubThreadQThread = QThread::currentThread();
206 std::this_thread::sleep_for(std::chrono::milliseconds(1000));
212 G4cout <<
"G4Qt3DViewer::MovingToMasterThread" <<
G4endl;
217 auto p2 = p1->parent();
218 p2->moveToThread(masterQThread);
220 visSubThreadQThread =
nullptr;
226 G4cout <<
"G4Qt3DViewer::SwitchToMasterThread" <<
G4endl;
355 const G4double dxScene = dx*sceneRadius/scale;
356 const G4double dyScene = dy*sceneRadius/scale;
366 newViewpointDirection += dx*x_prime/scale;
367 newViewpointDirection += dy*y_prime/scale;
372 newUpVector += dx*x_prime/scale;
373 newUpVector += dy*y_prime/scale;
398 const G4double angleY = ev->angleDelta().y();
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
virtual const G4VisExtent & GetExtent() const
G4VSceneHandler & fSceneHandler
G4ViewParameters fDefaultVP
void SetViewpointDirection(const G4Vector3D &viewpointDirection)
const std::vector< G4ModelingParameters::VisAttributesModifier > & GetVisAttributesModifiers() const
const G4Vector3D & GetScaleFactor() const
void SetAutoRefresh(G4bool)
G4int GetNoOfSides() const
G4bool IsSpecialMeshRendering() const
CutawayMode GetCutawayMode() 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)
const G4Planes & GetCutawayPlanes() const
RotationStyle GetRotationStyle() const
G4bool IsDensityCulling() const
void MultiplyZoomFactor(G4double zoomFactorMultiplier)
G4double GetVisibleDensity() const
SMROption GetSpecialMeshRenderingOption() const
G4bool IsCullingCovered() const
const G4Plane3D & GetSectionPlane() 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
QColor ConvertToQColor(const G4Colour &c)
QVector3D ConvertToQVector3D(const G4ThreeVector &v)