Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4VtkPolydataInstancePipeline Class Reference

#include <G4VtkPolydataInstancePipeline.hh>

+ Inheritance diagram for G4VtkPolydataInstancePipeline:

Public Member Functions

 G4VtkPolydataInstancePipeline (G4String name, const G4VtkVisContext &vc)
 
 ~G4VtkPolydataInstancePipeline () override=default
 
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 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)
 
virtual void removeInstance (const G4String &name)
 
- Public Member Functions inherited from G4VtkPolydataPipeline
 G4VtkPolydataPipeline (G4String name, const G4VtkVisContext &vc)
 
 ~G4VtkPolydataPipeline () override=default
 
void AddFilter (vtkSmartPointer< vtkPolyDataAlgorithm > f)
 
vtkSmartPointer< vtkPolyDataAlgorithm > GetFilter (G4int iFilter)
 
G4int GetNumberOfFilters ()
 
vtkSmartPointer< vtkPolyDataAlgorithm > GetFinalFilter ()
 
void Enable () override
 
void Disable () override
 
void Print () override
 
void Modified () override
 
void Clear () override
 
virtual vtkSmartPointer< vtkActor > GetActor ()
 
virtual void SetPolydata (const G4Polyhedron &polyhedron)
 
virtual void SetPolydata (const G4Polyline &polyline)
 
virtual void SetPolydata (vtkPolyData *polydata)
 
virtual void SetPolydataData (const G4Point3D &p)
 
virtual void SetPolydataData (double x, double y, double z)
 
virtual void SetActorTransform (G4double dx, G4double dy, G4double dz, G4double r00, G4double r01, G4double r02, G4double r10, G4double r11, G4double r12, G4double r20, G4double r21, G4double r22)
 
virtual void SetActorColour (G4double r, G4double g, G4double b, G4double a)
 
virtual vtkSmartPointer< vtkPolyData > GetPolydata ()
 
virtual G4doubleGetBounds ()
 
- Public Member Functions inherited from G4VVtkPipeline
 G4VVtkPipeline ()
 
 G4VVtkPipeline (G4String nameIn, G4String typeIn, const G4VtkVisContext &vcIn, G4bool disableParentIn=false, vtkSmartPointer< vtkRenderer > rendererIn=nullptr)
 
virtual ~G4VVtkPipeline ()
 
void SetDisableParent (G4bool disableParentIn)
 
bool GetDisableParent ()
 
void SetName (G4String nameIn)
 
const G4String GetName ()
 
void SetTypeName (G4String typeNameIn)
 
G4String GetTypeName ()
 
G4VtkVisContextGetVtkVisContext ()
 
void AddChildPipeline (G4VVtkPipeline *child)
 
G4VVtkPipelineGetChildPipeline (G4int iPipeline)
 
G4int GetNumberOfChildPipelines ()
 
std::vector< G4VVtkPipeline * > GetChildPipelines ()
 
void ClearChildPipeline ()
 

Protected Attributes

vtkSmartPointer< vtkDoubleArray > instanceColour
 
vtkSmartPointer< vtkPoints > instancePosition
 
vtkSmartPointer< vtkDoubleArray > instanceTransform
 
std::map< G4String, vtkIdType > instanceMap
 
- Protected Attributes inherited from G4VtkPolydataPipeline
vtkSmartPointer< vtkPoints > polydataPoints
 
vtkSmartPointer< vtkCellArray > polydataCells
 
vtkSmartPointer< vtkPolyData > polydata
 
std::vector< vtkSmartPointer< vtkPolyDataAlgorithm > > filters
 
vtkSmartPointer< vtkPolyDataMapper > mapper
 
vtkSmartPointer< vtkActor > actor
 
- Protected Attributes inherited from G4VVtkPipeline
G4String name
 
G4String type
 
G4bool disableParent
 
std::vector< G4VVtkPipeline * > childPipelines
 
vtkSmartPointer< vtkRenderer > renderer
 
G4VtkVisContext vc
 

Additional Inherited Members

- Static Public Member Functions inherited from G4VtkPolydataPipeline
static std::size_t MakeHash (const G4Polyhedron &p, const G4VtkVisContext &vc)
 

Detailed Description

Definition at line 36 of file G4VtkPolydataInstancePipeline.hh.

Constructor & Destructor Documentation

◆ G4VtkPolydataInstancePipeline()

G4VtkPolydataInstancePipeline::G4VtkPolydataInstancePipeline ( G4String name,
const G4VtkVisContext & vc )

Definition at line 31 of file G4VtkPolydataInstancePipeline.cc.

33 : G4VtkPolydataPipeline(nameIn, vcIn)
34{
35 // Set pipeline type
36 SetTypeName(G4String("G4VtkPolydataInstancePipeline"));
37
39 instanceColour->SetName("colours");
40 instanceColour->SetNumberOfComponents(4);
41
43
45 instanceTransform->SetName("transform");
46 instanceTransform->SetNumberOfComponents(9);
47}
void SetTypeName(G4String typeNameIn)
vtkSmartPointer< vtkPoints > instancePosition
vtkSmartPointer< vtkDoubleArray > instanceColour
vtkSmartPointer< vtkDoubleArray > instanceTransform
G4VtkPolydataPipeline(G4String name, const G4VtkVisContext &vc)

◆ ~G4VtkPolydataInstancePipeline()

G4VtkPolydataInstancePipeline::~G4VtkPolydataInstancePipeline ( )
overridedefault

Member Function Documentation

◆ addInstance() [1/2]

void G4VtkPolydataInstancePipeline::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

Reimplemented in G4VtkPolydataInstanceAppendPipeline, and G4VtkPolydataInstanceBakePipeline.

Definition at line 49 of file G4VtkPolydataInstancePipeline.cc.

53{
54 // add the instance without colour or alpha
55 addInstance(dx, dy, dz, r00, r01, r02, r10, r11, r12, r20, r21, r22, 0, 0, 0, 0, nameIn);
56}
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)

Referenced by G4VtkPolydataInstanceAppendPipeline::addInstance(), G4VtkPolydataInstanceBakePipeline::addInstance(), and addInstance().

◆ addInstance() [2/2]

void G4VtkPolydataInstancePipeline::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 )
virtual

Reimplemented in G4VtkPolydataInstanceAppendPipeline, and G4VtkPolydataInstanceBakePipeline.

Definition at line 58 of file G4VtkPolydataInstancePipeline.cc.

63{
64 instanceColour->InsertNextTuple4(r, g, b, a);
65 auto idp = instancePosition->InsertNextPoint(dx, dy, dz);
66 instanceTransform->InsertNextTuple9(r00, r01, r02, r10, r11, r12, r20, r21, r22);
67 instanceMap[nameIn] = idp;
68}
std::map< G4String, vtkIdType > instanceMap

◆ removeInstance()

void G4VtkPolydataInstancePipeline::removeInstance ( const G4String & name)
virtual

Reimplemented in G4VtkPolydataInstanceAppendPipeline, and G4VtkPolydataInstanceBakePipeline.

Definition at line 70 of file G4VtkPolydataInstancePipeline.cc.

71{
72 // remove from instanceColour, instancePosition and instanceTransform
73}

Referenced by G4VtkPolydataInstanceAppendPipeline::removeInstance().

Member Data Documentation

◆ instanceColour

vtkSmartPointer<vtkDoubleArray> G4VtkPolydataInstancePipeline::instanceColour
protected

◆ instanceMap

std::map<G4String, vtkIdType> G4VtkPolydataInstancePipeline::instanceMap
protected

Definition at line 55 of file G4VtkPolydataInstancePipeline.hh.

Referenced by addInstance().

◆ instancePosition

vtkSmartPointer<vtkPoints> G4VtkPolydataInstancePipeline::instancePosition
protected

◆ instanceTransform

vtkSmartPointer<vtkDoubleArray> G4VtkPolydataInstancePipeline::instanceTransform
protected

The documentation for this class was generated from the following files: