add vtk solids

This commit is contained in:
AndreaRigoni
2026-03-25 21:03:13 +00:00
parent e4a8499104
commit 422113a0e9
17 changed files with 353 additions and 16 deletions

View File

@@ -151,6 +151,7 @@ TessellatedSolid::TessellatedSolid(const char *name)
}
void TessellatedSolid::SetMesh(TriangleMesh &mesh) {
this->m_Mesh = mesh;
G4TessellatedSolid *ts = this->m_Solid;
for (int i = 0; i < mesh.Triangles().size(); ++i) {
const Vector3i &trg = mesh.Triangles().at(i);
@@ -165,6 +166,9 @@ void TessellatedSolid::SetMesh(TriangleMesh &mesh) {
}
}
void TessellatedSolid::Update() {
}

View File

@@ -93,11 +93,14 @@ public:
void SetMesh(TriangleMesh &mesh);
uLibGetMacro(Solid, G4TessellatedSolid *)
virtual G4VSolid* GetG4Solid() const override { return (G4VSolid*)m_Solid; }
const TriangleMesh& GetMesh() const { return m_Mesh; }
public slots:
void Update();
private :
TriangleMesh m_Mesh;
G4TessellatedSolid *m_Solid;
};