32#include <vtkDataArray.h>
33#include <vtkDoubleArray.h>
34#include <vtkPointData.h>
35#include <vtkPolyData.h>
36#include <vtkPolyDataMapper.h>
37#include <vtkProperty.h>
49 std::size_t hash = std::hash<G4double>{}(colour.
GetAlpha());
68 mapper->SetColorModeToDirectScalars();
91 G4VtkPolydataInstancePipeline::addInstance(dx, dy, dz, r00, r01, r02, r10, r11, r12, r20, r21,
92 r22, r, g, b, a, nameIn);
112 for (
int i = 0; i < nEdges; i++) {
115 G4Point3D(vertex[i].x() * r00 + vertex[i].y() * r01 + vertex[i].z() * r02 + dx,
116 vertex[i].x() * r10 + vertex[i].y() * r11 + vertex[i].z() * r12 + dy,
117 vertex[i].x() * r20 + vertex[i].y() * r21 + vertex[i].z() * r22 + dz);
118 polydataPoints->InsertNextPoint(bakedVertex.
x(), bakedVertex.
y(), bakedVertex.
z());
119 poly->InsertNextId(
iVert);
121 double cols[] = {r, g, b, 0.5};
128 }
while (notLastFace);
HepGeom::Point3D< G4double > G4Point3D
G4GLOB_DLL std::ostream G4cout
G4double GetAlpha() const
const G4VisAttributes * GetApplicableVisAttributes(const G4VisAttributes *) const
const G4Colour & GetColour() const
const G4VisAttributes * GetVisAttributes() const
void SetPolydata(const G4Polyhedron &polyhedron) override
void removeInstance(const G4String &name) override
std::map< G4String, std::pair< vtkIdType, vtkIdType > > instanceVertexMap
const G4Polyhedron * polyhedronPrototype
std::map< G4String, std::pair< vtkIdType, vtkIdType > > instanceFaceMap
vtkSmartPointer< vtkDoubleArray > polydataPointData
static std::size_t MakeHash(const G4Polyhedron &p, const G4VtkVisContext &vc)
void addInstance(G4double dx, G4double dy, G4double dz, G4double r00, G4double r01, G4double r02, G4double r10, G4double r11, G4double r12, G4double r20, G4double r21, G4double r22, G4double r, G4double g, G4double b, G4double a, const G4String &name) override
G4VtkPolydataInstanceBakePipeline(G4String name, const G4VtkVisContext &vc)
virtual void addInstance(G4double dx, G4double dy, G4double dz, G4double r00, G4double r01, G4double r02, G4double r10, G4double r11, G4double r12, G4double r20, G4double r21, G4double r22, const G4String &name)
vtkSmartPointer< vtkCellArray > polydataCells
vtkSmartPointer< vtkPolyData > polydata
vtkSmartPointer< vtkPoints > polydataPoints
vtkSmartPointer< vtkActor > actor
vtkSmartPointer< vtkPolyDataMapper > mapper
G4ViewParameters::DrawingStyle fDrawingStyle
const G4VtkViewer * fViewer
G4bool GetNextFacet(G4int &n, G4Point3D *nodes, G4int *edgeFlags=nullptr, G4Normal3D *normals=nullptr) const
void hash_combine(std::size_t)