# Category visQt3D History

See `CONTRIBUTING.rst` for details of **required** info/format for each entry,
which **must** added in reverse chronological order (newest at the top).
It must **not** be used as a substitute for writing good git commit messages!

-------------------------------------------------------------------------------

## 2024-08-14 John Allison (visQt3D-V11-02-03)
- G4Qt3DViewer:
  - Resolve the timing issues around switching to the vis sub-thread with the
    use of G4CONDITIONWAITLAMBDA.

## 2024-07-12 Guy Barrand (visQt3D-V11-02-02)
- G4Qt3DViewer: implement a resizeEvent() method to avoid a bad aspect ratio at viewer creation.
- G4Qt3DSceneHandler: in AddPrimitive(G4Polyline), stay with the Qt5 code. The one for Qt6 using
  Qt3DCore::QGeometryView is crashy.
- G4Qt3DViewer: in MovingToVisSubThread(), SwitchToMasterThread() protect against nullptr for p1, p2.
  It permits to avoid crash in case of doing /run/beamOn in vis.mac at startup.

## 2024-05-23 Guy Barrand (visQt3D-V11-02-01)
- G4Qt3DSceneHandler::EstablishG4Qt3DQEntities(): have a missing:
   fpPhysicalVolumeObjects.clear();
  It avoids a crash if doing multiple "/vis/open Qt3D".
- G4Qt3DViewer destructor: do a setRootEntity(nullptr) to disconnect
  the G4Qt3DSceneHandler::fpQt3DScene from a viewer.
- G4Qt3DSceneHandler destructor: clear the fpQt3DScene scene tree.
  A crash (seen on most platforms) is now avoided here because of the
  disconnection of the fpQt3DScene in a viewer destructor.
  (This "scene clearing" assumes that the deletion a G4Qt3DSceneHandler happens after
  all related viewers are already deleted).

## 2024-03-13 Gabriele Cosmo (visQt3D-V11-02-00)
- Fixed compilation error on Windows for ambiguous string assignment in
  G4Qt3DSceneHandler::CreateNewNode().

## 2023-10-14 John Allison (visQt3D-V11-01-07)
- G4Qt3DSceneHandler.cc: Add dummy normal line attributes - Qt6 seems to require!!
  - I am puzzled - why do lines need normals?
  - Fixes wireframe drawing.
  - Does not seem to fix trajectory line drawing, which is curious.

## 2023-10-07 John Allison (visQt3D-V11-01-06)
- G4Qt3DSceneHandler.cc:
  - Establish the top physical volume Qt3D entities from the scene.
    - This is a better way than using transportation worlds.
      - In some circumstances, such as the standalone examples,
        G4TransportationManager is no longer instantiated in time,
        causing a crash. But this way is better anyway.

## 2023-08-14 John Allison (visQt3D-V11-01-05)
- G4Qt3D:
  - Simplify IsUISessionCompatible.
    - Exploit new method, G4UImanager::GetBaseSession (intercoms-V11-01-07).

## 2023-07-01 John Allison (visQt3D-V11-01-04)
- Fix precision-loss warning

## 2023-04-26 Ben Morgan (visQt3D-V11-01-03)
- Support compilation against Qt5 and Qt6.

## 2023-03-22 Ben Morgan (visQt3D-V11-01-02)
- Export public compile definitions to indicate availablity of specific drivers. Moves to
  "use on link" model.

## 2023-02-06 Ben Morgan (visQt3D-V11-01-01)
- Isolate private headers and update dependencies

## 2023-01-30 Ben Morgan (visQt3D-V11-01-00)
- Link to new G4UIcore/UIimplementation modules in place of former G4UIbasic/UIcommon

## 2022-11-25 Gabriele Cosmo (visQt3D-V11-00-12)
- Fixed compilation warning for implicit type conversions on macOS/XCode 14.1.

## 2022-11-06 John Allison (visQt3D-V11-00-11)
- Eliminate G4cerr and introduce G4warn.
  - `#define G4warn G4cout`
    - The above is temporary until a genuine G4warn output stream is
      implemented.
  - Change G4cerr to G4warn in all cases.
  - Change G4cout to G4warn in those cases where it is clearly
    an error report or a warning.

## 2022-10-28 John Allison (visQt3D-V11-00-10)
- Request kernel visit when cutaway mode changes:
  - G4Qt3DViewer.cc

## 2022-09-14 John Allison (visQt3D-V11-00-09)
- G4Qt3DViewer.cc:
  - Add check on special mesh rendering option in CompareForKernelVisit.

## 2022-09-03 Ben Morgan (visQt3D-V11-00-08)
- Remove unused header from G4heprandom to resolve consistency test

## 2022-04-06 John Allison (visQt3D-V11-00-07)
- Fix compiler warnings:
  - G4Qt3DSceneHandler.hh: Add `using G4VSceneHandler::AddCompound` to
    avoid warnings.
  - G4Qt3DSceneHandler.cc: Change `world` to `wrld` to avoid warnings.
    - `world` shadows an `enum` in `G4VSceneHandler`. Maybe a better solution
       is to encapsulate the enum.

## 2022-05-03 Ben Morgan (visQt3D-V11-00-06)
- Preliminary build support for Qt5 and Qt6

## 2022-04-06 John Allison (visQt3D-V11-00-05)
- `G4Qt3DSceneHandler`:
  - `void G4Qt3DSceneHandler::AddPrimitive (const G4Polymarker& polymarker)`:
    - Update to current usage.
  - `void G4Qt3DSceneHandler::AddPrimitive(const G4Polyhedron& polyhedron)`:
    - Comment out common line elimination - too expensive for a large
      polyhedron.
    - Maybe eliminate altogether in future?.
    - Allow the graphics-reps utilities to optimise things like this.
  - Use StandardSpecialMeshRendering(mesh).
    - Of course, only if special mesh rendering is requested.

## 2022-03-05 John Allison (visQt3D-V11-00-04)
- G4Qt3DSceneHandler::AddCompound(const G4Mesh& mesh):
  - For parameterised tetrahedron mesh, call default
    G4VSceneHandler::DrawTetMeshAsDots(mesh).
  - Tested on "ICRP145", a Geant4 application that we hope can become
    a Geant4 advanced example, downloaded from the supplementary material
    of Kim et al, ICRP, 2020. Adult mesh-type reference computational phantoms,
    ICRP Publication 145, Ann. ICRP 49(3).

## 2022-01-28 Ben Morgan (visQt3D-V11-00-03)
- Replace `geant4_global_library_target` with direct file inclusion and
  call to `geant4_add_category` to define library build from source modules.

## 2022-01-16 John Allison (visQt3D-V11-00-02)
- G4Qt3DViewer::wheelEvent:
  - Re-program wheelEvent for perspective projection:
    - Takes into account the extent of the scene.

## 2021-12-16 John Allison (visQt3D-V11-00-01)
- G4Qt3DSceneHandler.cc:
  - AddCompound(const G4Mesh& mesh):
    - Use base class utility G4VSceneHandler::Draw3DRectMeshAsDots(mesh);

## 2021-12-10 Ben Morgan (visQt3D-V11-00-00)
- Change to new Markdown History format

---

# History entries prior to 11.0

12 November 2021 - Ben Morgan (visQt3D-V10-07-12)
- Retire G4VIS_... preprocessor symbols in toolkit build, only required
  by obsolete GNUmake system

8 November 2021 - Ben Morgan (visQt3D-V10-07-11)
- Retire G4UI/G4INTY_... preprocessor symbols in toolkit build, only required
  by obsolete GNUmake system

20 October 2021  Gabriele Cosmo  (visQt3D-V10-07-10)
- Fixed broken dependency in GNUmakefile...

18 October 2021  John Allison  (visQt3D-V10-07-09)
- G4Qt3DSceneHandler:
  - Introduce AddCompound(const G4Mesh&).
    - This copies G4OpenGLSceneHandler.
    - Subsequently it may be refined for Qt3D - but works well for now.

01 September 2021  John Allison  (visQt3D-V10-07-08)
- G4Qt3DSceneHandler.cc:
  o Raise G4Exception if no available node.
- G4Qt3DViewer.cc:
  o Protect against illegal call to show() - it may only be called from
    the master thread.

22 August 2021  John Allison  (visQt3D-V10-07-07)
- Fix the problem of drawing from the vis sub-thread.

20 August 2021  John Allison  (visQt3D-V10-07-06)
- Minor updates - optional debug printing, etc.
- Revert to black background.
- Add G4Qt3DViewer::MovingToVisSubThread and MovingToMasterThread.

07 June 2021  John Allison  (visQt3D-V10-07-05)
- Requires greps-V10-07-07 (new method AddCompound (const G4Mesh&)).
- Requires modeling-V10-07-09 (new class G4Mesh).
- Requires visman-V10-07-10 (new default method and new commands).
- G4Qt3DViewer.hh:
  o Fix hidden function warning.
- G4Qt3DViewer.cc:
  o Force kernel visit if special mesh rendering parameters change.

28-May-2021 Ben Morgan (visQt3D-V10-07-04)
- Migrate to modular CMake build

27 May 2021  John Allison (visQt3D-V10-07-03)
- AddPrimitive(const G4Polyhedron&):
  o Minor improvement to error message in the case of unexpected number
    of edges.

17-Apr-2021  John Allison  (visQt3D-V10-07-02)
- Fix compiler warning (unused variable "text")

08-Apr-2021  John Allison  (visQt3D-V10-07-01)
- Move //#define G4QT3DDEBUG to G4Qt3DUtils.hh.
  o Improve overall protection of debug output with #ifdef G4QT3DDEBUG.
- Include some trial code for text output, but comment it out.

29-Dec-2020  John Allison  (visQt3D-V10-07-00)
- G4Qt3DViewer: Move code from constructor to G4Qt3DViewer::Initialise().
- G4Qt3DSceneHandler:
  o Implement auxiliary edge suppression.
  o Tidy up G4Qt3DSceneHandler::AddPrimitive(const G4Text& - still doesn't work.

29-Oct-2020  Ben Morgan (visQt3D-V10-06-02)
- Remove inclusion of obsolete CMake module

26-Oct-2020  Gabriele Cosmo  (visQt3D-V10-06-01)
- Corrected GNUmake setup and fixed compilation warnings.

23-Oct-2020  John Allison  (visQt3D-V10-06-00)
- First version.
- Requires cmake-V10-06-34.

27-Sep-2019  John Allison
- First skeleton. Based on XXXSG driver.
