source: trunk/source/graphics_reps/include/G4VGraphicsScene.hh @ 1058

Last change on this file since 1058 was 1058, checked in by garnier, 15 years ago

file release beta

File size: 6.0 KB
Line 
1//
2// ********************************************************************
3// * License and Disclaimer                                           *
4// *                                                                  *
5// * The  Geant4 software  is  copyright of the Copyright Holders  of *
6// * the Geant4 Collaboration.  It is provided  under  the terms  and *
7// * conditions of the Geant4 Software License,  included in the file *
8// * LICENSE and available at  http://cern.ch/geant4/license .  These *
9// * include a list of copyright holders.                             *
10// *                                                                  *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work  make  any representation or  warranty, express or implied, *
14// * regarding  this  software system or assume any liability for its *
15// * use.  Please see the license in the file  LICENSE  and URL above *
16// * for the full disclaimer and the limitation of liability.         *
17// *                                                                  *
18// * This  code  implementation is the result of  the  scientific and *
19// * technical work of the GEANT4 collaboration.                      *
20// * By using,  copying,  modifying or  distributing the software (or *
21// * any work based  on the software)  you  agree  to acknowledge its *
22// * use  in  resulting  scientific  publications,  and indicate your *
23// * acceptance of all terms of the Geant4 Software license.          *
24// ********************************************************************
25//
26//
27// $Id: G4VGraphicsScene.hh,v 1.11 2008/01/04 22:20:59 allison Exp $
28// GEANT4 tag $Name: geant4-09-02-ref-02 $
29// John Allison  19th July 1996
30//
31// Class Description:
32// Abstract interface class for a graphics scene handler.
33// It is a minimal scene handler for the GEANT4 kernel.
34// See G4VSceneHandler for a fuller description.  G4VSceneHandler is
35// the full abstract interface to graphics systems.
36
37#ifndef G4VGRAPHICSSCENE_HH
38#define G4VGRAPHICSSCENE_HH
39
40class G4VisAttributes;
41class G4VSolid;
42class G4Box;
43class G4Cons;
44class G4Tubs;
45class G4Trd;
46class G4Trap;
47class G4Sphere;
48class G4Ellipsoid;
49class G4Para;
50class G4Torus;
51class G4PhysicalVolumeModel;
52class G4Polycone;
53class G4Polyhedra;
54class G4VTrajectory;
55class G4VHit;
56class G4Polyline;
57class G4Scale;
58class G4Text;
59class G4Circle;
60class G4Square;
61class G4Polymarker;
62class G4Polyhedron;
63class G4NURBS;
64
65#include "G4Transform3D.hh"
66
67class G4VGraphicsScene {
68
69public: // With description
70
71  G4VGraphicsScene();
72  virtual ~G4VGraphicsScene();
73
74  ///////////////////////////////////////////////////////////////////
75  // Methods for adding solids to the scene handler.  They
76  // must always be called in the triplet PreAddSolid, AddSolid and
77  // PostAddSolid.  The transformation and visualization attributes
78  // must be set by the call to PreAddSolid.  A possible default
79  // implementation is to request the solid to provide a G4Polyhedron
80  // or similar primitive - see, for example, G4VSceneHandler in the
81  // Visualization Category.
82
83  virtual void PreAddSolid (const G4Transform3D& objectTransformation,
84                            const G4VisAttributes& visAttribs) = 0;
85  // objectTransformation is the transformation in the world
86  // coordinate system of the object about to be added, and
87  // visAttribs is its visualization attributes.
88
89  virtual void PostAddSolid () = 0;
90
91  virtual void AddSolid (const G4Box&)       = 0;
92  virtual void AddSolid (const G4Cons&)      = 0;
93  virtual void AddSolid (const G4Tubs&)      = 0;
94  virtual void AddSolid (const G4Trd&)       = 0;
95  virtual void AddSolid (const G4Trap&)      = 0;
96  virtual void AddSolid (const G4Sphere&)    = 0;
97  virtual void AddSolid (const G4Para&)      = 0;
98  virtual void AddSolid (const G4Torus&)     = 0;
99  virtual void AddSolid (const G4Polycone&)  = 0;
100  virtual void AddSolid (const G4Polyhedra&) = 0;
101  virtual void AddSolid (const G4VSolid&)    = 0;  // For solids not above.
102
103  ///////////////////////////////////////////////////////////////////
104  // Methods for adding "compound" GEANT4 objects to the scene
105  // handler.  These methods may either (a) invoke "user code" that
106  // uses the "user interface", G4VVisManager (see, for example,
107  // G4VSceneHandler in the Visualization Category, which for
108  // trajectories uses G4VTrajectory::DrawTrajectory, via
109  // G4TrajectoriesModel in the Modeling Category) or (b) invoke
110  // AddPrimitives below (between calls to Begin/EndPrimitives) or (c)
111  // use graphics-system-specific code or (d) any combination of the
112  // above.
113
114  virtual void AddCompound (const G4VTrajectory&) = 0;
115  virtual void AddCompound (const G4VHit&)        = 0;
116
117  ///////////////////////////////////////////////////////////////////
118  // Methods for adding graphics primitives to the scene handler.  A
119  // sequence of calls to AddPrimitive must be sandwiched between
120  // calls to BeginPrimitives and EndPrimitives.  A sequence is any
121  // number of calls that have the same transformation.
122
123  virtual void BeginPrimitives
124  (const G4Transform3D& objectTransformation = G4Transform3D()) = 0;
125  // objectTransformation is the transformation in the world
126  // coordinate system of the object about to be added.
127
128  virtual void EndPrimitives () = 0;
129
130  virtual void BeginPrimitives2D
131  (const G4Transform3D& objectTransformation = G4Transform3D()) = 0;
132
133  virtual void EndPrimitives2D () = 0;
134  // The x,y coordinates of the primitives passed to AddPrimitive are
135  // intrepreted as screen coordinates, -1 < x,y < 1.  The
136  // z-coordinate is ignored.
137
138  virtual void AddPrimitive (const G4Polyline&)   = 0;
139  virtual void AddPrimitive (const G4Scale&)      = 0;
140  virtual void AddPrimitive (const G4Text&)       = 0;
141  virtual void AddPrimitive (const G4Circle&)     = 0;
142  virtual void AddPrimitive (const G4Square&)     = 0;
143  virtual void AddPrimitive (const G4Polymarker&) = 0;
144  virtual void AddPrimitive (const G4Polyhedron&) = 0;
145  virtual void AddPrimitive (const G4NURBS&)      = 0;
146
147};
148
149#endif
Note: See TracBrowser for help on using the repository browser.