Ignore:
Timestamp:
Jan 15, 2008, 2:19:33 PM (17 years ago)
Author:
garnier
Message:

mise a jour par rapport au commit sur cvs de geant4

Location:
trunk/geant4/visualization/management
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/geant4/visualization/management/History

    r632 r688  
    1 $Id: History,v 1.104 2007/11/30 14:47:30 lgarnier Exp $
     1$Id: History,v 1.105 2008/01/04 22:03:46 allison Exp $
    22
    33-------------------------------------------------------------------
     
    2626History file for visualization management sub-category
    2727------------------------------------------------------
     28
     294th January 2008  John Allison  (visman-V09-01-00)
     30- Implemented extended 2D interface.
    2831
    293230th November 2007  Laurent Garnier
  • trunk/geant4/visualization/management/include/G4VSceneHandler.hh

    r593 r688  
    2525//
    2626//
    27 // $Id: G4VSceneHandler.hh,v 1.39 2007/01/11 16:38:14 allison Exp $
    28 // GEANT4 tag $Name: geant4-09-00-ref-01 $
     27// $Id: G4VSceneHandler.hh,v 1.40 2008/01/04 22:03:45 allison Exp $
     28// GEANT4 tag $Name: $
    2929//
    3030//
     
    164164  // }
    165165
    166   virtual void BeginPrimitives2D ();
     166  virtual void BeginPrimitives2D
     167  (const G4Transform3D& objectTransformation);
    167168  // The x,y coordinates of the primitives passed to AddPrimitive are
    168169  // intrepreted as screen coordinates, -1 < x,y < 1.  The
  • trunk/geant4/visualization/management/include/G4VisManager.hh

    r593 r688  
    2525//
    2626//
    27 // $Id: G4VisManager.hh,v 1.67 2007/07/10 17:49:27 allison Exp $
    28 // GEANT4 tag $Name: geant4-09-00-ref-01 $
     27// $Id: G4VisManager.hh,v 1.68 2008/01/04 22:03:46 allison Exp $
     28// GEANT4 tag $Name: $
    2929//
    3030//
     
    250250    const G4Transform3D& objectTransformation = G4Transform3D());
    251251
    252   void Draw2D (const G4Text&);
     252  virtual void Draw2D (const G4Circle&,
     253    const G4Transform3D& objectTransformation = G4Transform3D());
     254
     255  virtual void Draw2D (const G4NURBS&,
     256    const G4Transform3D& objectTransformation = G4Transform3D());
     257
     258  virtual void Draw2D (const G4Polyhedron&,
     259    const G4Transform3D& objectTransformation = G4Transform3D());
     260
     261  virtual void Draw2D (const G4Polyline&,
     262    const G4Transform3D& objectTransformation = G4Transform3D());
     263
     264  virtual void Draw2D (const G4Polymarker&,
     265    const G4Transform3D& objectTransformation = G4Transform3D());
     266
     267  virtual void Draw2D (const G4Square&,
     268    const G4Transform3D& objectTransformation = G4Transform3D());
     269
     270  virtual void Draw2D (const G4Text&,
     271    const G4Transform3D& objectTransformation = G4Transform3D());
    253272
    254273  ////////////////////////////////////////////////////////////////////
  • trunk/geant4/visualization/management/src/G4VSceneHandler.cc

    r593 r688  
    2525//
    2626//
    27 // $Id: G4VSceneHandler.cc,v 1.82 2007/05/16 15:47:44 allison Exp $
    28 // GEANT4 tag $Name: geant4-09-00-ref-01 $
     27// $Id: G4VSceneHandler.cc,v 1.83 2008/01/04 22:03:46 allison Exp $
     28// GEANT4 tag $Name: $
    2929//
    3030//
     
    159159}
    160160
    161 void G4VSceneHandler::BeginPrimitives2D () {
     161void G4VSceneHandler::BeginPrimitives2D
     162(const G4Transform3D& objectTransformation) {
    162163  fNestingDepth++;
    163164  if (fNestingDepth > 1)
    164165    G4Exception("G4VSceneHandler::BeginPrimitives2D: Nesting detected."
    165166                "\n  It is illegal to nest Begin/EndPrimitives.");
    166   // Not actually required for 2D operations but some drivers do an
    167   // initial transformation...
    168   fpObjectTransformation = &fIdentityTransformation;
     167  fpObjectTransformation = &objectTransformation;
    169168}
    170169
  • trunk/geant4/visualization/management/src/G4VisManager.cc

    r632 r688  
    2424// ********************************************************************
    2525//
    26 // $Id: G4VisManager.cc,v 1.114 2007/11/10 14:59:46 allison Exp $
     26// $Id: G4VisManager.cc,v 1.115 2008/01/04 22:03:46 allison Exp $
    2727// GEANT4 tag $Name:  $
    2828//
     
    505505}
    506506
    507 void G4VisManager::Draw2D (const G4Text& text)
     507void G4VisManager::Draw2D (const G4Circle& circle,
     508                           const G4Transform3D& objectTransform)
    508509{
    509510  if (IsValidView()) {
    510511    ClearTransientStoreIfMarked();
    511     fpSceneHandler -> BeginPrimitives2D();
     512    fpSceneHandler -> BeginPrimitives2D(objectTransform);
     513    fpSceneHandler -> AddPrimitive(circle);
     514    fpSceneHandler -> EndPrimitives2D();
     515  }
     516}
     517
     518void G4VisManager::Draw2D (const G4NURBS& nurbs,
     519                           const G4Transform3D& objectTransform)
     520{
     521  if (IsValidView()) {
     522    ClearTransientStoreIfMarked();
     523    fpSceneHandler -> BeginPrimitives2D(objectTransform);
     524    fpSceneHandler -> AddPrimitive(nurbs);
     525    fpSceneHandler -> EndPrimitives2D();
     526  }
     527}
     528
     529void G4VisManager::Draw2D (const G4Polyhedron& polyhedron,
     530                           const G4Transform3D& objectTransform)
     531{
     532  if (IsValidView()) {
     533    ClearTransientStoreIfMarked();
     534    fpSceneHandler -> BeginPrimitives2D(objectTransform);
     535    fpSceneHandler -> AddPrimitive(polyhedron);
     536    fpSceneHandler -> EndPrimitives2D();
     537  }
     538}
     539
     540void G4VisManager::Draw2D (const G4Polyline& line,
     541                           const G4Transform3D& objectTransform)
     542{
     543  if (IsValidView()) {
     544    ClearTransientStoreIfMarked();
     545    fpSceneHandler -> BeginPrimitives2D(objectTransform);
     546    fpSceneHandler -> AddPrimitive(line);
     547    fpSceneHandler -> EndPrimitives2D();
     548  }
     549}
     550
     551void G4VisManager::Draw2D (const G4Polymarker& polymarker,
     552                           const G4Transform3D& objectTransform)
     553{
     554  if (IsValidView()) {
     555    ClearTransientStoreIfMarked();
     556    fpSceneHandler -> BeginPrimitives2D(objectTransform);
     557    fpSceneHandler -> AddPrimitive(polymarker);
     558    fpSceneHandler -> EndPrimitives2D();
     559  }
     560}
     561
     562void G4VisManager::Draw2D (const G4Square& square,
     563                           const G4Transform3D& objectTransform)
     564{
     565  if (IsValidView()) {
     566    ClearTransientStoreIfMarked();
     567    fpSceneHandler -> BeginPrimitives2D(objectTransform);
     568    fpSceneHandler -> AddPrimitive(square);
     569    fpSceneHandler -> EndPrimitives2D();
     570  }
     571}
     572
     573void G4VisManager::Draw2D (const G4Text& text,
     574                           const G4Transform3D& objectTransform)
     575{
     576  if (IsValidView()) {
     577    ClearTransientStoreIfMarked();
     578    fpSceneHandler -> BeginPrimitives2D(objectTransform);
    512579    fpSceneHandler -> AddPrimitive(text);
    513580    fpSceneHandler -> EndPrimitives2D();
Note: See TracChangeset for help on using the changeset viewer.