$Id: History,v 1.104 2009/11/17 17:47:49 allison Exp $
-------------------------------------------------------------------

     =========================================================
     Geant4 - an Object-Oriented Toolkit for Simulation in HEP
     =========================================================

                      Category History file
                      ---------------------
This file should be used by G4 developers and category coordinators
to briefly summarize all major modifications introduced in the code
and keep track of all category-tags.
It DOES NOT substitute the  CVS log-message one should put at every
committal in the CVS repository !

     ----------------------------------------------------------
     * Reverse chronological order (last date on top), please *
     ----------------------------------------------------------

History file for visualization/OpenInventor
-------------------------------------------

17th November 2009  John Allison  (openinventor-V09-02-03)
- Tagged for vis tag.

17th November 2009  Gabriele Cosmo
- Fixed GNUmakefile.  Fixes build problem with gl2ps on Windows.

29 September 2009  John Allison  (openinventor-V09-02-02)
- Tagged.

18 August 2009 Laurent Garnier
 - G4OpenInventorXt/WinViewer : Fix a wrong initialization introduce by the 
   new way of handling window size hints (January 2009)

24 July 2009, Laurent Garnier
 - Remove Geant4_gl2ps.h gl2ps.cc gl2ps.h which were copied in external/gl2ps
   in february but forgot to remove them from OpenInventor

18 February 2009, Laurent Garnier (openinventor-V09-02-01)
 - Bug fix in gl2ps drawing

16 February 2009, Laurent Garnier
 - Modifications in GNUMakefile for gl2ps.
 - SoGL2PSAction Modified.
 - G4OpenInventorViewer.cc add a protection on file writing in gl2ps

30th April 2008  John Allison  (openinventor-V09-01-01)
- Fixes more gcc-4.3.0 compiler warnings.

4th April 2008  John Allison  (openinventor-V09-01-00)
- Fixes most gcc-4.3.0 compiler warnings.

23rd October 2007  Gabriele Cosmo
- Initialise local vectors in SoPolyhedron.cc to fix compilation warnings
  on gcc-4.2.2 for use of non-initialised values.

3rd April 2007  John Allison  (openinventor-V08-02-02 - needs visman-V08-02-03)
- Introduced picking control.  Default is "true" for Open Inventor.

25th March 2007  John Allison  (openinventor-V08-02-01)
- G4OpenInventorSceneHandler: Introduced AddProperties. Rationalises.
- G4OpenInventorViewer.cc: Added scale factor to list of changes
  requiring kernel visit.

5th January 2007  John Allison  (openinventor-V08-02-00)
- Moved LoadAtts to vis management.

5th November 2006  John Allison  (openinventor-V08-01-04)
- Protected against zero material pointer.

2nd November 2006  John Allison  (openinventor-V08-01-03)
- Rationalised G4Att loading and extended picking to hits.

1st November 2006  John Allison  (openinventor-V08-01-02)
- Follow changes to greps-V08-01-09: G4AttCheck/Holder rationalisation.

26th October 2006  John Allison  (openinventor-V08-01-01)
- Added SoG4LineSet, SoG4MarkerSet and SoG4Polyhedron - classes extended to
  include G4Atts (G4AttValues and G4AttDefs) for picking.
- G4OpenInventorSceneHandler.cc: Load lines, markers and polyhedron objects
  with G4Atts.
- G4OpenInventorViewer.cc: print G4Atts on picking.

29th August 2006  John Allison  (openinventor-V08-01-00)
- G4OpenInventorViewer::CompareForKernelVisit: Rationalisation. This
  assumes use of generic clipping (sectioning, slicing, DCUT,
  cutaway).  If a decision is made to implement locally, this will
  need changing.  See G4OpenGLViewer::SetView,
  G4OpenGLStoredViewer.cc::CompareForKernelVisit and
  G4OpenGLStoredSceneHander::CreateSection/CutawayPolyhedron.

4th June 2006 Joseph Perl (openinventor-V08-00-05)
- This tag includes all the changes below.

2 June 2006  Guy Barrand :
- G4OpenInvenot, G4OpenInvenotXt, G4OpenInvenotWin : have an Initialize 
  method in order to init Xt and Inventor only is really used 
  (when creating a viewer or a scene handler).

19th April 2006  Gabriele Cosmo  (openinventor-V08-00-04)
- Use cmath instead of math.h.

28th March John Allison  (openinventor-V08-00-03)
- Cosmetic.

21st March John Allison  (openinventor-V08-00-02)
- Rationalised G4OpenInventorSceneHandler:
  o Introduced GeneratePrerequisites.
  o Uses dynamic_cast<G4PhysicalVolumeModel*>(fpModel) instead
    of fpCurrentPV, etc.
  o Uses G4VSceneHandler utility functions,
    GetApplicableVisAttributes, GetColour, GetTextColour,
    GetMarkerSize, GetDrawingStyle, GetAuxEdgeVisible, where possible.
  o Revision 1.43: messy version with original code commented out.
  o Revision 1.44 (.cc) and 1.28 (.hh) (tagged): tidied versions.
- Investigated G4OpenInventorViewer:
  o Changed: DrawDetector and UpdateScene.  No noticeable effect!

20th March John Allison
- G4OpenInventorSceneHandler:
  o Bug fix for transient solids.
  o Replaced some code in AddPrimitive(const G4Polymarker&) by GetMarkerSize.
  o Attempt to finish AddPrimitive (const G4Text&) - still draws at origin.

30th January 2006  John Allison  (openinventor-V08-00-01)
- Implemented drawn volume path.  Needs modeling-V08-00-01.  Scene
  graph now corresponds to drawn, i.e., non-culled geometry.
  Inability to find (drawn) mothers shouldn't happen now, and it
  triggers an error message.

26th January 2006  John Allison  (openinventor-V08-00-00)
- Coworks with visman-V08-00-04 (removed fModified).
- Removed references to fModified.

20th December 2005  Guy Barrand
- SoAlternateRepAction.cc : add the #ifdef G4VIS_BUILD_OI_DRIVER.

12th December 2005  John Allison
- G4OpenInventorSceneHandler.cc: Pick up colour and transformation
  correctly for non-physical-volume solids.
  o G4OpenInventorSceneHandler::AddPrimitive (const G4Polyhedron&):
    Added code to pick up colour if LV and PV pointers are zero.
  o G4OpenInventorSceneHandler::BeginPrimitives: Pick up
    transformation if LV and PV pointers are zero.
  o G4OpenInventorSceneHandler::PreAddSolid: Added code to pick up
    colour if LV and PV pointers are zero and removed return statement
    so that transformation is picked up too.

30th November 2005  Gabriele Cosmo (openinventor-V07-01-04)
- Trivial fix to SoPolyhedron for support of CLHEP-2.0.X series.

15th November 2005  Guy Barrand (openinventor-V07-01-03)
- G4OpenInventorXtViewer : handle fVP.GetXGeometryString().
- G4OpenInventorSceneHandler : handle global scale view parameter.
  Done in BeginPrimitives and PreAddSolid by doing a 
  SbMatrix::multRight(sbScale) to the incoming global G4Transform3D matrix.
- G4OpenInventor[Xt,Win]Viewer : handle set background. Done
  in the overloaded SetView method.

17th October 2005  Guy Barrand
- G4OpenInventorViewer::G4OpenInventorViewer : read a g4view.iv
  file at creating of a view. If found, the scene graph in g4view.iv
  if added at head of the overall scene graph. This permits easy
  out of band customization of the scene without having to touch
  the code.
- Modification in order to save geometry in an Inventor file.
  Addition of an "alternateRep" for the SoPolyhedron (see Inventor doc).
  Addition of an "alternateRep" for the SoDetectorTreeKit.
  Addition of the SoAlternaterRepAction to traverse a scene graph
  and construct / delete the alternate reps.
  Modification of G4OpenInventorViewer::WriteInventor to write the
  alternateRep of the SoPolyhedron and then save geometry in a 
  .iv file by using Inventor standard lib. In particular the produced
  .iv files are readable by the ivview standard tool.

2nd September 2005  John Allison (openinventor-V07-01-02)
- Corrected treatment of edgeflags.

1st August 2005  Gabriele Cosmo  (openinventor-V07-01-01)
- Fixed compilation errors and warnings on gcc-4.0.0. Modified files:
  SoDetectorTreeKit.cc, gl2ps[.h.cc].

20th July 2005  John Allison  (openinventor-V07-01-00)
- Changed Geant4_SoPolyhedron to construct from G4Polyhedron rather
  than its base class, HepPolyhedron, for possible future
  developments.  Functionality unchanged.

2nd June 2005  John Allison  (openinventor-V07-00-02)
- Changed char* to const char* in gl2psMsg.

27th May 2005  John Allison  (openinventor-V07-00-01)
- Implemented marker sizes.

25th May 2005  Guy Barrand  (openinventor-V07-00-00)
- G4OpenInventorTransform3D.cc : use the CLHEP::Transform3D::operator(i,j)
  to initialize the m array in order to be compatible with new versions
  of CLHEP.

19th March 2005  Guy Barrand
- SoCounterAction.cc : remove extra ';' at end of SO_ACTION_SOURCE.
  Code with ';;' does not compile with the "-pedantic" mode of g++-3.4.

26th November 2004  Guy Barrand  (openinventor-V06-02-02)
- G4OpenInventorXtViewer, SoPolyhedron, SoCounterAction.h : 
  correct some warnings on g++-3.2.1 (reported by Tom Roberts).

25th November 2004  Guy Barrand
- G4OpenInventor[Viewer,SceneHandle] : handle aux edges.
- G4OpenInventorViewer : in SetSolid, etc... avoid to do a FinishView
  that will do a viewAll that may displace the camera.
- G4OpenInventorViewer : put the camera under a group and put
  a sensor (fGroupCameraSensor) on the group to detect that the viewer 
  changed the camera type.
- G4OpenInventor[Xt,Win]Viewer : GetCamera() to get camera of the viewer.
- G4OpenInventorViewer : delete fSoCameraSensor.

24th November 2004  John Allison
- Fixed SetView to respond to view parameters and CameraSensorCB to
  provide view parameters. Target point not quite right. Only for
  orthogonal view so far.

24th November 2004  Guy Barrand
- So*.cc : have #ifdef G4VIS_BUILD_OI_DRIVER instead of OIX_DRIVER !!!
- G4OpenInventor[Xt,Win]Viewer, SceneHandler : handle reduced wire frame
  at the level of the view.
- SoPolyhedron : reducedWireFramw field.

23th November 2004  Guy Barrand
- So*.cc : have #ifdef G4VIS_BUILD_OIX_DRIVER.

22th November 2004  Guy Barrand
- G4OpenInventor[Xt,Win]Viewer : "Set preview", "Set preview and full" 
  menu items.
- G4OpenInventorViewer : count nodes and shapes.
- SoCounterAction : to count nodes.
- G4OpenInventorViewer : SetSolid, SetWireFrame : arrange to avoid a SetView
  for the moment. It will move the camera ! Arrange to not clear the
  transient store.
- G4OpenInventorViewer : commit commented SoNodeSensor on fSoCamera.
- G4OpenInventorXtViewer : have a help dialog.
- G4OpenInventorSceneHandler : delete the SbMatrix returned 
  by G4OpenInventorTransform3D::GetSbMatrix. Not done before !
- G4OpenInventorTransform3D : use SbMatrix instead of SoSFMatrix.
- G4OpenInventorSceneHandler : cache SoResetTransform.
- SoStyleCache : destructor protected.
- G4OpenInventor[Xt,Win]Viewer : Help pulldown menu.
- G4OpenInventorViewer : in "Scene graph stats", count triangles,lines,points.
- G4OpenInventorViewer : set auto refresh by default.

21th November 2004  Guy Barrand
- G4OpenInventor[Xt,Win]Viewer, SceneHandler : add a simple picking that
  dumps picked SoNode address, type and name.
- G4OpenInventor[Xt,Win]Viewer : "Help controls" menu item.
- G4OpenInventorSceneHandler::PreAddThis : comment the "ERROR leaf protocal"
  message. Misleading to users.

19th November 2004  Guy Barrand
- G4OpenInventorSceneHandler::ClearStore: clear the fSeparatorMap.

18th November 2004  Guy Barrand
- G4OpenInventorSceneHandler::PreAddThis : handle viewer style.
- G4OpenInventorView : have an SoOrthographicCamera
  and a first implementation of SetView.
- Removed redundant fLastVP from G4OpenInventorSceneHandler (JA).

17th November 2004  Guy Barrand
- G4OpenInventorSceneHandler : rm the AddThis(G4Box,....). We use
  then only the generic AddPrimitive(G4Polyhedron). Much simpler.

15th November 2004  Guy Barrand
- G4OpenInventorViewer : //FIXME comment out on 
  f[Default]VP.SetCulling(false) by default. Not convinced that it is
  the right thing to do.
- G4OpenInventorViewer : have f[Default]VP.SetCulling(false) by default.
- On viewer have "Erase detector, event" menuitems for Xt and Win.
- G4OpenInventorWinViewer : have it inheriting G4OpenInventorViewer.
- G4OpenInventorSceneHandler : WIN32 : correct some warnings.

14th November 2004  Guy Barrand
- G4OpenInventorSceneHandler.cc : handle transparency.
- SoImageWriter, SbPainter, SbPainterPS : material to produce pixmap PS.
- G4OpenInventorViewer : base class for Inventor viewers.
- Menuitem "Etc/Triangles" : to count rendered triangles.
- Menuitem "File/IV" : to write the scene in an inventor file.

14th November 2004  John Allison  (openinventor-V06-02-01)
- Tag on branch openinventor-V06-02-01-branch.
- Consolidating the changes below, plus:
  - forcing culling off by default;
  - forcing solid mode;
  so that the user:
  - sees all of the requested geometry volume tree;
  - can use pointer button and CTRL-left-click to uncover (SHIFT-left-click
    to re-cover);
  - can use the hand button and right-click to get wireframe.
- Removed G4OpenInventorSceneHandler::EndModeling (empty function).

12th November 2004  Guy Barrand
- G4OpenInventor.cc : initClass of Geant4_SoPolyhedron.
- G4OpenInventorWinViewer.cc : WM_COMMAND : filter only messages
  from the window viewer menu.
- G4OpenInventorSceneHandler.cc : rm G4Polymarker::line handling.

11th November 2004  Guy Barrand
- Add SoPolyhedron that permits to visualize directly HepPolyhedron.
- G4OpenInventorSceneHandler::AddThis : uses the generic
  SoPolyhedron. Modeling is wireFrame by default.
  Solid modeling is used only in case visAtb.SetForceSolid(true).
- G4OpenInventorSceneHandler::PreAddThis : correct a flaw
  in the non-leaf part ; in case mother not found in fSeparatorMap
  the SoDetectorTreeKit were added nowhere ! This induced that 
  exaN03Vis5 displayed no gemetry.
- SoStyleCache : permit to cache commonly used colors, line styles and
  light models.
- G4OpenInventorSceneHandler : use SoStyleCache to minimize number of nodes.
- End of the first world war. 
- Death of Arrafat.

10th November 2004  Guy Barrand
- SoMarkerSet, SoGL2PSAction : corrections to work with SGI Inventor.
- gl2ps : gl2psPrintPostScriptPixmap : fix nbit=2,4 width truncation. 
  (On SoMarkerSet, the last column of pixmapswere missing ).

9th November 2004  Guy Barrand
- WIN32 : G4OpenInventorWinViewer : have a File pulldown menu
  with an Escape button to quit secondary Windows event loops.
- Xt : G4OpenInventorXtViewer : in destructor comment (and //FIXME)
  the "delete fViewer". With SGI, it hangs.
- Xt : Have a menubar and put escape button in the File pulldown menu.
- SoGL2PSAction, gl2ps : action to handle PostScript production with gl2ps.
- Xt : "PostScript" menu item.
- WIN32 : "PostScript" menu item.

8th November 2004  Guy Barrand
- WIN32 : Have HEPVis/SbGL.h to access GL.h properly on Windows.
  Use by SoMarkerSet.cc.
- G4OpenInventor.cc : initialize SoMarkerSet.
- G4OpenInventorWinViewer : correct bad viewer look and feel.

7th November 2004  Guy Barrand
- Have SoMarkerSet.h, .cc in the repository.
- G4OpenInventorSceneHandler : 
  Have a AddPrimitive(G4Polymarker) using SoMarkerSet.
  SoMarkerSet draws markers in the frame buffer. It is much
  more performant than having SoSphere and SoCube for markers.

6th November 2004  Guy Barrand
- G4OpenInventorXtViewer : restore the escape button.
  This button is put in the "app buttons" of the SoXtExaminerViewer.
  (The "app buttons" are put in the left border of decoration).
  It is ok with SGI-2.1.510 and recent SoXt of Coin, 

21th July 2004  Guy Barrand (openinventor-V06-02-00)
- G4OpenInventorXtViewer : add include X11/Shell.h to have
  XtNgeometry that may not come throught the includes of some
  Inventor implementation.

08th April 2004  Guy Barrand (openinventor-V06-01-00)
- Bring in the repository the necessary HEPVis code. In fact few of HEPVis
  is used in this G4 driver. Then HEPVis is no more needed.
  Note that, to avoid clashes of G4/vis within experiments, the HEPVis
  node are protected by some : #define Geant4_<node> <node>.  Then, for
  example, within the G4OpenInventor lib there are Geant4_SoBox, etc...
  (and not SoBox,... that may clash with other HEPVis code in  experiments).
- Have code to run on Windows.
- Split Viewer to have G4OpenInventorXtViewer and G4OpenInventorWinViewer.
- Split G4OpenInventor to have G4OpenInventorXt and G4OpenInventorWin.
  Xt and Win (and not X and Win32 like in vis/OpenGL) to follow 
  the conventions found in the OpenInventor world.

29th October 2003  Cosmo Gabriele (openinventor-V05-02-00)
- Patch in G4OpenInventorSceneHandler in PreAddThis() to cope with changes
  introduced in G4VPhysicalVolume in "geant4-05-02-ref-04", where pointer to
  mother physical-volume was removed.
  Separators map now refers to logical-volumes and is no longer built
  iteratively for each call to the method as it was done in an attempt
  implemented previously.
  NOTE: requires more investigation and eventually a revision of the
        adopted algorithm.
- Cleared usage of 'NULL' in favour of '0'.

4th October 2003  Cosmo Gabriele (vis-V05-02-01)
- Simplified GNUmakefile.

14th January 2003  John Allison  (openinventor-V05-00-00)
- Removed vertex.transform (*fpObjectTransformation) from
  G4OpenInventorSceneHandler::AddPrimitive (const G4Polyhedron& polyhedron).
  Symptom was that polyhedron objects were being transformed twice.
  The transformation is stored in 
  G4OpenInventorSceneHandler::PreAddThis
  ...
  G4OpenInventorTransform3D oiTran (objectTransformation);
  SoSFMatrix* oiMat = oiTran.GetOIMatrix();
  SoMatrixTransform* xform = new SoMatrixTransform;
  xform->matrix.setValue(oiMat->getValue());
  currentSeparator->addChild(new SoResetTransform);
  currentSeparator->addChild(xform);
}

27th November 2002  John Allison  (vis-V04-01-08)
- Improved algorithm of CompareForKernelVisit.

14th August 2001  John Allison  (vis-V03-02-11)
- Improved KernelVisitDecision - but see note therein.
