32#include <vtkAppendPolyData.h>
33#include <vtkDataArray.h>
34#include <vtkDoubleArray.h>
35#include <vtkGeneralTransform.h>
36#include <vtkPointData.h>
37#include <vtkPolyData.h>
38#include <vtkPolyDataMapper.h>
39#include <vtkProperty.h>
40#include <vtkTransformPolyDataFilter.h>
52 std::size_t hash = std::hash<G4double>{}(colour.
GetAlpha());
53 std::size_t rhash = std::hash<G4double>{}(colour.
GetRed());
54 std::size_t ghash = std::hash<G4double>{}(colour.
GetGreen());
55 std::size_t bhash = std::hash<G4double>{}(colour.
GetBlue());
56 std::size_t phash = std::hash<G4Polyhedron>{}(polyhedron);
84 actor->SetVisibility(1);
91 actor->GetProperty()->SetAmbient(0.2);
92 actor->GetProperty()->SetDiffuse(0.7);
93 actor->GetProperty()->SetSpecular(0.1);
94 actor->GetProperty()->SetSpecularPower(1);
114 G4VtkPolydataInstancePipeline::addInstance(dx, dy, dz, r00, r01, r02, r10, r11, r12, r20, r21,
115 r22, r, g, b, a, nameIn);
119 double transformArray[16] = {r00, r01, r02, dx, r10, r11, r12, dy,
120 r20, r21, r22, dz, 0., 0., 0., 1.};
121 transform->Concatenate(transformArray);
127 tf->SetTransform(transform);
G4GLOB_DLL std::ostream G4cout
G4double GetAlpha() const
G4double GetGreen() const
const G4VisAttributes * GetApplicableVisAttributes(const G4VisAttributes *) const
void SetTypeName(G4String typeNameIn)
const G4Colour & GetColour() const
const G4VisAttributes * GetVisAttributes() const
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
void removeInstance(const G4String &name) override
std::map< G4String, vtkSmartPointer< vtkTransformPolyDataFilter > > transformFilterMap
static std::size_t MakeHash(const G4Polyhedron &p, const G4VtkVisContext &vc)
G4VtkPolydataInstanceAppendPipeline(G4String name, const G4VtkVisContext &vc)
vtkSmartPointer< vtkAppendPolyData > appendFilter
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)
virtual void removeInstance(const G4String &name)
vtkSmartPointer< vtkPolyDataAlgorithm > GetFinalFilter()
vtkSmartPointer< vtkActor > actor
vtkSmartPointer< vtkPolyDataMapper > mapper
virtual vtkSmartPointer< vtkActor > GetActor()
void AddFilter(vtkSmartPointer< vtkPolyDataAlgorithm > f)
vtkSmartPointer< vtkPolyDataAlgorithm > GetFilter(G4int iFilter)
G4int GetNumberOfFilters()
vtkNew< vtkRenderer > renderer
G4ViewParameters::DrawingStyle fDrawingStyle
const G4VtkViewer * fViewer
void hash_combine(std::size_t)