64#define PRECISION float
65#define BASETYPE Qt3DRender::QAttribute::Float
74 G4cout <<
"G4Qt3DSceneHandler::G4Qt3DSceneHandler called" <<
G4endl;
108 size_t nWorlds = transportationManager->
GetNoWorlds();
109 std::vector<G4VPhysicalVolume*>::iterator iterWorld
112 for (
size_t i = 0; i < nWorlds; ++i, ++iterWorld) {
115 entity->setObjectName(
"G4Qt3DPORoot_"+QString(
world->GetName()));
130 newNode->setObjectName(
name.c_str());
146 typedef std::vector<PVNodeID> PVPath;
162 for (; iWorld < nWorlds; ++iWorld) {
163 if (fullPVPath[0].GetPhysicalVolume() ==
166 if (iWorld == nWorlds) {
168 "World mis-match - not possible(!?)");
173 world->SetPVNodeID(fullPVPath[0]);
178 const size_t depth = fullPVPath.size();
180 while (iDepth < depth) {
181 const auto& children = node->children();
182 const G4int nChildren = children.size();
185 for (; iChild < nChildren; ++iChild) {
187 if (child->
GetPVNodeID() == fullPVPath[iDepth])
break;
189 if (iChild != nChildren) {
195 std::ostringstream oss;
198 newNode->setObjectName(oss.str().c_str());
227 static G4bool first =
true;
230 G4Exception(
"G4Qt3DSceneHandler::BeginPrimitives2D",
"qt3D-0001",
232 "2D drawing not yet implemented");
261 "G4Qt3DSceneHandler::AddPrimitive(const G4Polyline& polyline) called.\n"
266 if (polyline.size() == 0)
return;
270 static G4bool first =
true;
273 G4Exception(
"G4Qt3DSceneHandler::AddPrimitive(const G4Polyline&)",
275 "No available node!");
285 auto polylineEntity =
new Qt3DCore::QEntity(currentNode);
288 const auto vertexByteSize = 3*
sizeof(
PRECISION);
290 const size_t nLines = polyline.size() - 1;
291 QByteArray polylineByteArray;
292 const auto polylineBufferByteSize = 2*nLines*vertexByteSize;
293 polylineByteArray.resize(polylineBufferByteSize);
294 auto polylineBufferArray =
reinterpret_cast<PRECISION*
>(polylineByteArray.data());
296 for (
size_t i = 0; i < nLines; ++i) {
297 polylineBufferArray[iLine++] = polyline[i].x();
298 polylineBufferArray[iLine++] = polyline[i].y();
299 polylineBufferArray[iLine++] = polyline[i].z();
300 polylineBufferArray[iLine++] = polyline[i+1].x();
301 polylineBufferArray[iLine++] = polyline[i+1].y();
302 polylineBufferArray[iLine++] = polyline[i+1].z();
304 auto polylineGeometry =
new Qt3DRender::QGeometry();
305 polylineGeometry->setObjectName(
"polylineGeometry");
306 auto polylineBuffer =
new Qt3DRender::QBuffer(polylineGeometry);
307 polylineBuffer->setObjectName(
"Polyline buffer");
308 polylineBuffer->setData(polylineByteArray);
310 auto polylineAtt =
new Qt3DRender::QAttribute;
311 polylineAtt->setObjectName(
"Position attribute");
312 polylineAtt->setName(Qt3DRender::QAttribute::defaultPositionAttributeName());
313 polylineAtt->setBuffer(polylineBuffer);
314 polylineAtt->setAttributeType(Qt3DRender::QAttribute::VertexAttribute);
315 polylineAtt->setVertexBaseType(
BASETYPE);
316 polylineAtt->setVertexSize(3);
317 polylineAtt->setCount(nLines);
318 polylineAtt->setByteOffset(0);
319 polylineAtt->setByteStride(vertexByteSize);
323 polylineGeometry->addAttribute(polylineAtt);
325 auto material =
new Qt3DExtras::QDiffuseSpecularMaterial();
326 material->setObjectName(
"materialForPolyline");
330 polylineEntity->addComponent(
material);
332 auto renderer =
new Qt3DRender::QGeometryRenderer;
333 renderer->setObjectName(
"polylineWireframeRenderer");
334 renderer->setGeometry(polylineGeometry);
335 renderer->setVertexCount(2*nLines);
336 renderer->setPrimitiveType(Qt3DRender::QGeometryRenderer::Lines);
337 polylineEntity->addComponent(renderer);
342 if (polymarker.size() == 0)
return;
346 static G4bool first =
true;
349 G4Exception(
"G4Qt3DSceneHandler::AddPrimitive(const G4Polymarker&)",
351 "No available node!");
362 const size_t nDots = polymarker.size();
367 auto polymarkerEntity =
new Qt3DCore::QEntity(currentNode);
368 polymarkerEntity->addComponent(
transform);
370 const auto vertexByteSize = 3*
sizeof(
PRECISION);
372 QByteArray polymarkerByteArray;
373 const auto polymarkerBufferByteSize = nDots*vertexByteSize;
374 polymarkerByteArray.resize(polymarkerBufferByteSize);
375 auto polymarkerBufferArray =
reinterpret_cast<PRECISION*
>(polymarkerByteArray.data());
377 for (
size_t i = 0; i < polymarker.size(); ++i) {
378 polymarkerBufferArray[iMarker++] = polymarker[i].x();
379 polymarkerBufferArray[iMarker++] = polymarker[i].y();
380 polymarkerBufferArray[iMarker++] = polymarker[i].z();
382 auto polymarkerGeometry =
new Qt3DRender::QGeometry();
383 polymarkerGeometry->setObjectName(
"polymarkerGeometry");
384 auto polymarkerBuffer =
new Qt3DRender::QBuffer(polymarkerGeometry);
385 polymarkerBuffer->setObjectName(
"Polymarker buffer");
386 polymarkerBuffer->setData(polymarkerByteArray);
388 auto polymarkerAtt =
new Qt3DRender::QAttribute;
389 polymarkerAtt->setObjectName(
"Position attribute");
390 polymarkerAtt->setName(Qt3DRender::QAttribute::defaultPositionAttributeName());
391 polymarkerAtt->setBuffer(polymarkerBuffer);
392 polymarkerAtt->setAttributeType(Qt3DRender::QAttribute::VertexAttribute);
393 polymarkerAtt->setVertexBaseType(
BASETYPE);
394 polymarkerAtt->setVertexSize(3);
395 polymarkerAtt->setCount(nDots);
396 polymarkerAtt->setByteOffset(0);
397 polymarkerAtt->setByteStride(vertexByteSize);
401 polymarkerGeometry->addAttribute(polymarkerAtt);
403 auto material =
new Qt3DExtras::QDiffuseSpecularMaterial();
404 material->setObjectName(
"materialForPolymarker");
408 polymarkerEntity->addComponent(
material);
410 auto renderer =
new Qt3DRender::QGeometryRenderer;
411 renderer->setObjectName(
"polymarkerWireframeRenderer");
412 renderer->setGeometry(polymarkerGeometry);
413 renderer->setVertexCount(nDots);
414 renderer->setPrimitiveType(Qt3DRender::QGeometryRenderer::Points);
415 polymarkerEntity->addComponent(renderer);
423 auto material =
new Qt3DExtras::QDiffuseSpecularMaterial();
424 material->setObjectName(
"materialForCircle");
426 if (colour.GetAlpha() < 1.)
material->setAlphaBlendingEnabled(
true);
428 auto sphereMesh =
new Qt3DExtras::QSphereMesh;
429 sphereMesh->setObjectName(
"sphereMesh");
438 sphereMesh->setRadius(radius);
442 for (
size_t iPoint = 0; iPoint < polymarker.size(); iPoint++) {
445 auto currentEntity =
new Qt3DCore::QEntity(currentNode);
446 currentEntity->addComponent(
material);
448 currentEntity->addComponent(sphereMesh);
457 auto material =
new Qt3DExtras::QDiffuseSpecularMaterial();
458 material->setObjectName(
"materialForSquare");
460 if (colour.GetAlpha() < 1.)
material->setAlphaBlendingEnabled(
true);
462 auto boxMesh =
new Qt3DExtras::QCuboidMesh();
463 boxMesh->setObjectName(
"boxMesh");
472 boxMesh->setXExtent(side);
473 boxMesh->setYExtent(side);
474 boxMesh->setZExtent(side);
476 for (
size_t iPoint = 0; iPoint < polymarker.size(); iPoint++) {
479 auto currentEntity =
new Qt3DCore::QEntity(currentNode);
480 currentEntity->addComponent(
material);
482 currentEntity->addComponent(boxMesh);
492 "G4Qt3DSceneHandler::AddPrimitive(const G4Text& text) called.\n"
499 static G4bool first =
true;
502 G4Exception(
"G4Qt3DSceneHandler::AddPrimitive(const G4Text&)",
504 "Text drawing doesn't work yet");
564 "G4Qt3DSceneHandler::AddPrimitive(const G4Circle& circle) called.\n"
588 static G4bool first =
true;
591 G4Exception(
"G4Qt3DSceneHandler::AddPrimitive(const G4Circle&)",
593 "No available node!");
604 auto material =
new Qt3DExtras::QDiffuseSpecularMaterial();
605 material->setObjectName(
"materialForCircle");
607 if (colour.GetAlpha() < 1.)
material->setAlphaBlendingEnabled(
true);
609 auto sphereMesh =
new Qt3DExtras::QSphereMesh;
610 sphereMesh->setObjectName(
"sphereMesh");
619 sphereMesh->setRadius(radius);
621 auto currentEntity =
new Qt3DCore::QEntity(currentNode);
622 currentEntity->addComponent(
material);
624 currentEntity->addComponent(sphereMesh);
631 "G4Qt3DSceneHandler::AddPrimitive(const G4Square& square) called.\n"
655 static G4bool first =
true;
658 G4Exception(
"G4Qt3DSceneHandler::AddPrimitive(const G4Square&)",
660 "No available node!");
671 auto material =
new Qt3DExtras::QDiffuseSpecularMaterial();
672 material->setObjectName(
"materialForSquare");
674 if (colour.GetAlpha() < 1.)
material->setAlphaBlendingEnabled(
true);
676 auto boxMesh =
new Qt3DExtras::QCuboidMesh();
677 boxMesh->setObjectName(
"boxMesh");
686 boxMesh->setXExtent(side);
687 boxMesh->setYExtent(side);
688 boxMesh->setZExtent(side);
690 auto currentEntity =
new Qt3DCore::QEntity(currentNode);
691 currentEntity->addComponent(
material);
693 currentEntity->addComponent(boxMesh);
700 static G4bool first =
true;
703 G4Exception(
"G4Qt3DSceneHandler::AddPrimitive(const G4Polyhedron&)",
705 "No available node!");
721 std::vector<G4Point3D> vertices;
722 std::vector<G4Normal3D> normals;
726 typedef std::pair<G4Point3D,G4Point3D> Line;
727 std::vector<Line> lines;
728 auto insertIfNew = [&lines](
const Line& newLine) {
729 for (
const auto& line: lines) {
730 if ((newLine.first==line.first && newLine.second==line.second) ||
731 (newLine.first==line.second && newLine.second==line.first))
734 lines.push_back(newLine);
745 vertices.push_back(vertex[0]);
746 vertices.push_back(vertex[1]);
747 vertices.push_back(vertex[2]);
748 normals.push_back(
normal[0]);
749 normals.push_back(
normal[1]);
750 normals.push_back(
normal[2]);
751 if(isAuxilaryEdgeVisible||edgeFlag[0]>0)insertIfNew(Line(vertex[0],vertex[1]));
752 if(isAuxilaryEdgeVisible||edgeFlag[1]>0)insertIfNew(Line(vertex[1],vertex[2]));
756 if(isAuxilaryEdgeVisible||edgeFlag[2]>0)insertIfNew(Line(vertex[2],vertex[0]));
757 }
else if (nEdges == 4) {
760 vertices.push_back(vertex[2]);
761 vertices.push_back(vertex[3]);
762 vertices.push_back(vertex[0]);
763 normals.push_back(
normal[2]);
764 normals.push_back(
normal[3]);
765 normals.push_back(
normal[0]);
766 if(isAuxilaryEdgeVisible||edgeFlag[2]>0)insertIfNew(Line(vertex[2],vertex[3]));
767 if(isAuxilaryEdgeVisible||edgeFlag[3]>0)insertIfNew(Line(vertex[3],vertex[0]));
770 <<
"ERROR: polyhedron face with unexpected number of edges (" << nEdges <<
')'
775 }
while (notLastFace);
776 const auto nVerts = vertices.size();
777 const auto nLines = lines.size();
784 Qt3DCore::QEntity* wireframeEntity =
nullptr;
785 Qt3DCore::QEntity* surfaceEntity =
nullptr;
786 static G4int errorCount = 0;
788 switch (drawing_style) {
790 wireframeEntity =
new Qt3DCore::QEntity(currentNode);
791 wireframeEntity->addComponent(
transform);
794 wireframeEntity =
new Qt3DCore::QEntity(currentNode);
795 wireframeEntity->addComponent(
transform);
796 surfaceEntity =
new Qt3DCore::QEntity(currentNode);
800 surfaceEntity =
new Qt3DCore::QEntity(currentNode);
804 wireframeEntity =
new Qt3DCore::QEntity(currentNode);
805 wireframeEntity->addComponent(
transform);
806 surfaceEntity =
new Qt3DCore::QEntity(currentNode);
811 if (errorCount == 0) {
813 G4cerr <<
"WARNING: Qt3D: cloud drawing not implemented" <<
G4endl;
819 const auto vertexByteSize = 3*
sizeof(
PRECISION);
821 Qt3DRender::QGeometry* vertexGeometry =
nullptr;
822 Qt3DRender::QGeometry* lineGeometry =
nullptr;
824 Qt3DRender::QAttribute* positionAtt =
nullptr;
825 Qt3DRender::QAttribute* normalAtt =
nullptr;
826 Qt3DRender::QAttribute* lineAtt =
nullptr;
828 Qt3DRender::QBuffer* vertexBuffer =
nullptr;
835 QByteArray vertexByteArray;
836 const auto vertexBufferByteSize = 2*nVerts*vertexByteSize;
837 vertexByteArray.resize(vertexBufferByteSize);
838 auto vertexBufferArray =
reinterpret_cast<PRECISION*
>(vertexByteArray.data());
840 for (
size_t i = 0; i < nVerts; i++) {
841 vertexBufferArray[i1++] = vertices[i].x();
842 vertexBufferArray[i1++] = vertices[i].y();
843 vertexBufferArray[i1++] = vertices[i].z();
844 vertexBufferArray[i1++] = normals[i].x();
845 vertexBufferArray[i1++] = normals[i].y();
846 vertexBufferArray[i1++] = normals[i].z();
849 vertexGeometry =
new Qt3DRender::QGeometry();
850 vertexGeometry->setObjectName(
"vertexGeometry");
851 vertexBuffer =
new Qt3DRender::QBuffer(vertexGeometry);
852 vertexBuffer->setObjectName(
"Vertex buffer");
853 vertexBuffer->setData(vertexByteArray);
856 positionAtt =
new Qt3DRender::QAttribute;
857 positionAtt->setObjectName(
"Position attribute");
858 positionAtt->setName(Qt3DRender::QAttribute::defaultPositionAttributeName());
859 positionAtt->setBuffer(vertexBuffer);
860 positionAtt->setAttributeType(Qt3DRender::QAttribute::VertexAttribute);
861 positionAtt->setVertexBaseType(
BASETYPE);
862 positionAtt->setVertexSize(3);
863 positionAtt->setCount(nVerts);
864 positionAtt->setByteOffset(0);
865 positionAtt->setByteStride(2*vertexByteSize);
868 normalAtt =
new Qt3DRender::QAttribute;
869 normalAtt->setObjectName(
"Normal attribute");
870 normalAtt->setName(Qt3DRender::QAttribute::defaultNormalAttributeName());
871 normalAtt->setBuffer(vertexBuffer);
872 normalAtt->setAttributeType(Qt3DRender::QAttribute::VertexAttribute);
873 normalAtt->setVertexBaseType(
BASETYPE);
874 normalAtt->setVertexSize(3);
875 normalAtt->setCount(nVerts);
876 normalAtt->setByteOffset(vertexByteSize);
877 normalAtt->setByteStride(2*vertexByteSize);
880 Qt3DRender::QBuffer* lineBuffer =
nullptr;
886 QByteArray lineByteArray;
887 const auto lineBufferByteSize = 2*nLines*vertexByteSize;
888 lineByteArray.resize(lineBufferByteSize);
889 auto lineBufferArray =
reinterpret_cast<PRECISION*
>(lineByteArray.data());
891 for (
const auto& line: lines) {
892 lineBufferArray[i2++] = line.first.x();
893 lineBufferArray[i2++] = line.first.y();
894 lineBufferArray[i2++] = line.first.z();
895 lineBufferArray[i2++] = line.second.x();
896 lineBufferArray[i2++] = line.second.y();
897 lineBufferArray[i2++] = line.second.z();
900 lineGeometry =
new Qt3DRender::QGeometry();
901 lineGeometry->setObjectName(
"lineGeometry");
902 lineBuffer =
new Qt3DRender::QBuffer(lineGeometry);
903 lineBuffer->setObjectName(
"Line buffer");
904 lineBuffer->setData(lineByteArray);
907 lineAtt =
new Qt3DRender::QAttribute;
908 lineAtt->setObjectName(
"Position attribute");
909 lineAtt->setName(Qt3DRender::QAttribute::defaultPositionAttributeName());
910 lineAtt->setBuffer(lineBuffer);
911 lineAtt->setAttributeType(Qt3DRender::QAttribute::VertexAttribute);
912 lineAtt->setVertexBaseType(
BASETYPE);
913 lineAtt->setVertexSize(3);
914 lineAtt->setCount(nLines);
915 lineAtt->setByteOffset(0);
916 lineAtt->setByteStride(vertexByteSize);
922 Qt3DExtras::QDiffuseSpecularMaterial*
material;
923 Qt3DRender::QGeometryRenderer* renderer;
924 switch (drawing_style) {
928 lineGeometry->addAttribute(lineAtt);
930 material =
new Qt3DExtras::QDiffuseSpecularMaterial();
931 material->setObjectName(
"materialForWireframe");
935 wireframeEntity->addComponent(
material);
937 renderer =
new Qt3DRender::QGeometryRenderer;
938 renderer->setObjectName(
"polyhedronWireframeRenderer");
939 renderer->setGeometry(lineGeometry);
940 renderer->setVertexCount(2*nLines);
941 renderer->setPrimitiveType(Qt3DRender::QGeometryRenderer::Lines);
942 wireframeEntity->addComponent(renderer);
950 vertexGeometry->addAttribute(positionAtt);
951 vertexGeometry->addAttribute(normalAtt);
953 material =
new Qt3DExtras::QDiffuseSpecularMaterial();
954 material->setObjectName(
"materialForHiddenLines");
958 surfaceEntity->addComponent(
material);
960 renderer =
new Qt3DRender::QGeometryRenderer;
961 renderer->setObjectName(
"polyhedronSurfaceRenderer");
962 renderer->setGeometry(vertexGeometry);
963 renderer->setVertexCount(nVerts);
964 renderer->setPrimitiveType(Qt3DRender::QGeometryRenderer::Triangles);
965 surfaceEntity->addComponent(renderer);
969 lineGeometry->addAttribute(lineAtt);
971 material =
new Qt3DExtras::QDiffuseSpecularMaterial();
972 material->setObjectName(
"materialForWireFrame");
976 wireframeEntity->addComponent(
material);
978 renderer =
new Qt3DRender::QGeometryRenderer;
979 renderer->setObjectName(
"polyhedronWireframeRenderer");
980 renderer->setGeometry(lineGeometry);
981 renderer->setVertexCount(2*nLines);
982 renderer->setPrimitiveType(Qt3DRender::QGeometryRenderer::Lines);
983 wireframeEntity->addComponent(renderer);
989 vertexGeometry->addAttribute(positionAtt);
990 vertexGeometry->addAttribute(normalAtt);
992 material =
new Qt3DExtras::QDiffuseSpecularMaterial();
993 material->setObjectName(
"materialForSurface");
995 if (colour.GetAlpha() < 1.)
material->setAlphaBlendingEnabled(
true);
996 surfaceEntity->addComponent(
material);
998 renderer =
new Qt3DRender::QGeometryRenderer;
999 renderer->setObjectName(
"polyhedronSurfaceRenderer");
1000 renderer->setGeometry(vertexGeometry);
1001 renderer->setVertexCount(nVerts);
1002 renderer->setPrimitiveType(Qt3DRender::QGeometryRenderer::Triangles);
1003 surfaceEntity->addComponent(renderer);
1011 vertexGeometry->addAttribute(positionAtt);
1012 vertexGeometry->addAttribute(normalAtt);
1014 material =
new Qt3DExtras::QDiffuseSpecularMaterial();
1015 material->setObjectName(
"materialForSurface");
1017 if (colour.GetAlpha() < 1.)
material->setAlphaBlendingEnabled(
true);
1018 surfaceEntity->addComponent(
material);
1020 renderer =
new Qt3DRender::QGeometryRenderer;
1021 renderer->setObjectName(
"polyhedronSurfaceRenderer");
1022 renderer->setGeometry(vertexGeometry);
1023 renderer->setVertexCount(nVerts);
1024 renderer->setPrimitiveType(Qt3DRender::QGeometryRenderer::Triangles);
1025 surfaceEntity->addComponent(renderer);
1029 lineGeometry->addAttribute(lineAtt);
1031 material =
new Qt3DExtras::QDiffuseSpecularMaterial();
1032 material->setObjectName(
"materialForWireframe");
1036 wireframeEntity->addComponent(
material);
1038 renderer =
new Qt3DRender::QGeometryRenderer;
1039 renderer->setObjectName(
"polyhedronSurfaceRenderer");
1040 renderer->setGeometry(lineGeometry);
1041 renderer->setVertexCount(2*nLines);
1042 renderer->setPrimitiveType(Qt3DRender::QGeometryRenderer::Lines);
1043 wireframeEntity->addComponent(renderer);
1064 static G4bool firstPrint =
true;
1070 <<
"Special case drawing of G4VNestedParameterisation in G4OpenGLSceneHandler"
1079 const G4bool useFullExtent =
true;
1089 std::multimap<const G4Colour,G4ThreeVector> positionByColour;
1090 G4double halfX = 0., halfY = 0., halfZ = 0.;
1094 , std::multimap<const G4Colour,G4ThreeVector>& positionByColour
1096 : fpPVModel(pvModel)
1097 , fPositionByColour(positionByColour)
1098 , fHalfX(halfX), fHalfY(halfY), fHalfZ(halfZ)
1102 const G4Colour& colour = fpPVModel->GetCurrentLV()->GetVisAttributes()->
GetColour();
1104 fPositionByColour.insert(std::make_pair(colour,
position));
1110 std::multimap<const G4Colour,G4ThreeVector>& fPositionByColour;
1111 G4double &fHalfX, &fHalfY, &fHalfZ;
1113 pseudoScene(&tmpPVModel,positionByColour,halfX,halfY,halfZ);
1119 std::set<G4Colour> setOfColours;
1120 for (
const auto& entry: positionByColour) {
1121 setOfColours.insert(entry.first);
1125 for (
const auto& colour: setOfColours) {
1132 G4int nDotsTotal = 0;
1133 for (
const auto& colour: setOfColours) {
1139 dots.
SetInfo(container->GetName());
1140 const auto range = positionByColour.equal_range(colour);
1141 for (
auto posByCol = range.first; posByCol != range.second; ++posByCol) {
1151 <<
"Number of dots for colour " << colour
1152 <<
": " << nDots <<
G4endl;
1154 nDotsTotal += nDots;
1157 G4cout <<
"Total number of dots: " << nDotsTotal <<
G4endl;
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
CLHEP::Hep3Vector G4ThreeVector
void print(G4double elem)
G4GLOB_DLL std::ostream G4cerr
G4GLOB_DLL std::ostream G4cout
G4double GetYHalfLength() const
G4double GetZHalfLength() const
G4double GetXHalfLength() const
static G4bool GetColour(const G4String &key, G4Colour &result)
MeshType GetMeshType() const
G4VPhysicalVolume * GetContainerVolume() const
const G4Transform3D & GetTransform() const
G4int GetMeshDepth() const
void SetCullingInvisible(G4bool)
G4VPhysicalVolume * GetPhysicalVolume() const
void DescribeYourselfTo(G4VGraphicsScene &)
const std::vector< G4PhysicalVolumeNodeID > & GetFullPVPath() const
void SetMarkerType(MarkerType)
MarkerType GetMarkerType() const
void AddSolid(const G4Box &solid)
void SetPVNodeID(const G4PhysicalVolumeModel::G4PhysicalVolumeNodeID &id)
const G4PhysicalVolumeModel::G4PhysicalVolumeNodeID & GetPVNodeID() const
void PreAddSolid(const G4Transform3D &objectTransformation, const G4VisAttributes &)
void BeginPrimitives2D(const G4Transform3D &objectTransformation)
virtual ~G4Qt3DSceneHandler()
Qt3DCore::QEntity * fpTransientObjects
std::vector< G4Qt3DQEntity * > fpPhysicalVolumeObjects
Qt3DCore::QEntity * fpQt3DScene
void AddCompound(const G4Mesh &)
void AddPrimitive(const G4Polyline &)
Qt3DCore::QEntity * fpPersistentObjects
void BeginPrimitives(const G4Transform3D &objectTransformation)
G4Qt3DSceneHandler(G4VGraphicsSystem &system, const G4String &name)
void ClearTransientStore()
static G4int fSceneIdCount
G4Qt3DQEntity * CreateNewNode()
void EstablishG4Qt3DQEntities()
const G4VisExtent & GetExtent() const
static G4TransportationManager * GetTransportationManager()
std::vector< G4VPhysicalVolume * >::iterator GetWorldsIterator()
size_t GetNoWorlds() const
SizeType GetSizeType() const
virtual void SetInfo(const G4String &info)
void SetSize(SizeType, G4double)
G4double GetScreenRadius() const
G4double GetWorldDiameter() const
G4Point3D GetPosition() const
G4double GetScreenDiameter() const
G4double GetWorldRadius() const
virtual G4String GetCurrentTag() const
const G4String & GetGlobalTag() const
const G4String & GetName() const
G4Transform3D fObjectTransformation
virtual void EndPrimitives()
G4double GetMarkerSize(const G4VMarker &, MarkerSizeType &)
virtual void PreAddSolid(const G4Transform3D &objectTransformation, const G4VisAttributes &)
virtual void PostAddSolid()
virtual void EndPrimitives2D()
const G4VisAttributes * fpVisAttribs
virtual void BeginPrimitives2D(const G4Transform3D &objectTransformation=G4Transform3D())
G4bool fReadyForTransients
G4ViewParameters::DrawingStyle GetDrawingStyle(const G4VisAttributes *)
virtual void BeginPrimitives(const G4Transform3D &objectTransformation=G4Transform3D())
virtual void AddSolid(const G4Box &)
virtual void AddCompound(const G4VTrajectory &)
const G4VisAttributes * GetApplicableVisAttributes(const G4VisAttributes *) const
const G4ViewParameters & GetViewParameters() const
G4bool IsAuxEdgeVisible() const
const G4Colour & GetColour() const
G4double GetExtentRadius() const
static Verbosity GetVerbosity()
void SetVisAttributes(const G4VisAttributes *)
const G4VisAttributes * GetVisAttributes() const
G4int GetNoFacets() const
G4bool GetNextFacet(G4int &n, G4Point3D *nodes, G4int *edgeFlags=0, G4Normal3D *normals=0) const
static double normal(HepRandomEngine *eptr)
const char * name(G4int ptype)
Qt3DCore::QTransform * CreateQTransformFrom(const G4Transform3D &)
QColor ConvertToQColor(const G4Colour &c)
void delete_components_and_children_of_entity_recursively(Qt3DCore::QNode *node)