67 fVoxelsVisAttributes[0] = VA_voxelX;
68 fVoxelsVisAttributes[1] = VA_voxelY;
69 fVoxelsVisAttributes[2] = VA_voxelZ;
74 fBoundingBoxVisAttributes = VA_boundingbox;
89 G4double dx=kInfinity, dy=kInfinity, dz=kInfinity;
90 G4double xmax=0, xmin=0, ymax=0, ymin=0, zmax=0, zmin=0;
111 bounding_polyhedronBox.SetVisAttributes(&fBoundingBoxVisAttributes);
130 t_FirstCenterofVoxelPlane=
G4ThreeVector(xmin,(ymin+ymax)*0.5,
132 voxelsVisAttributes=&fVoxelsVisAttributes[0];
136 t_FirstCenterofVoxelPlane=
G4ThreeVector((xmin+xmax)*0.5,ymin,
139 voxelsVisAttributes=&fVoxelsVisAttributes[1];
144 (ymin+ymax)*0.5,zmin);
146 voxelsVisAttributes=&fVoxelsVisAttributes[2];
153 voxel_plane.SetVisAttributes(voxelsVisAttributes);
156 std::size_t slice_no = 0, no_slices = header->
GetNoSlices();
160 while (slice_no<no_slices)
165 newlimit.AddLimit(header->
GetAxis(), beginning+step*slice_no,
167 ComputeVoxelPolyhedra(lv,slice->
GetHeader(), newlimit, ppl);
169 current_translation_vector = unit_translation_vector;
170 current_translation_vector *= step*slice_no;
174 + t_FirstCenterofVoxelPlane)));
178 if (slice_no<no_slices) { slice=header->
GetSlice(slice_no); }
210 GetNavigatorForTracking()->CreateTouchableHistoryHandle();
212 aTouchable->GetHistory()->GetTopTransform().Inverse();
217 if(pVVisManager !=
nullptr)
221 for (
size_t i=0; i<pplist->size(); ++i)
223 pVVisManager->
Draw((*pplist)[i].GetPolyhedron(),
224 (*pplist)[i].GetTransform()*transf3D);
231 "Pointer to visualization manager is null!");
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::vector< G4PlacedPolyhedron > G4PlacedPolyhedronList
CLHEP::Hep3Vector G4ThreeVector
void DrawVoxels(const G4LogicalVolume *lv) const
void SetVoxelsVisAttributes(G4VisAttributes &, G4VisAttributes &, G4VisAttributes &)
G4PlacedPolyhedronList * CreatePlacedPolyhedra(const G4LogicalVolume *) const
void SetBoundingBoxVisAttributes(G4VisAttributes &)
G4VSolid * GetSolid() const
std::size_t GetNoDaughters() const
G4SmartVoxelHeader * GetVoxelHeader() const
G4int GetMaxEquivalentSliceNo() const
G4SmartVoxelNode * GetNode() const
G4SmartVoxelHeader * GetHeader() const
static G4TransportationManager * GetTransportationManager()
virtual G4bool CalculateExtent(const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pMin, G4double &pMax) const =0
static G4VVisManager * GetConcreteInstance()
virtual void Draw(const G4Circle &, const G4Transform3D &objectTransformation=G4Transform3D())=0
void SetColour(const G4Colour &)