refactor: introduce PhysicalVolume class and update Geant scene hierarchy to use logical and physical volumes

This commit is contained in:
AndreaRigoni
2026-04-16 14:16:09 +00:00
parent 987d783fdb
commit 0b553c0db7
14 changed files with 432 additions and 275 deletions

View File

@@ -71,8 +71,21 @@ public:
// Object Wrapper
/**
* @brief Utility wrapper that bridges factory registration and shared ownership.
*
* ObjectWrapper provides a high-level interface to handle objects that can be
* both registered in the ObjectFactory and managed through shared ownership
* using SmartPointer.
*
* One of its key roles is static registration: when instantiated with a
* class name string, it automatically registers a factory function for type T
* in the ObjectFactory singleton. This allows the factory to subsequently
* create instances of T dynamically by name.
*
* It supports multiple initialization paths, including factory-based
* construction and direct model wrapping.
*/
template <typename T> class ObjectWrapper {
public:
ObjectWrapper(const std::string &className) {
@@ -108,7 +121,7 @@ public:
T &operator*() const { return *m_model; }
T *get() const { return m_model.get(); }
T *GetWrapped() const { return m_model.get(); }
bool operator==(const ObjectWrapper &other) const {
return m_model == other.m_model;