source: trunk/geant4/visualization/OpenGL/include/G4OpenGLSceneHandler.hh@ 573

Last change on this file since 573 was 529, checked in by garnier, 18 years ago

r658@mac-90108: laurentgarnier | 2007-06-25 12:02:16 +0200
import de visualisation

  • Property svn:mime-type set to text/cpp
File size: 4.1 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: G4OpenGLSceneHandler.hh,v 1.20 2006/08/30 11:37:34 allison Exp $
28// GEANT4 tag $Name: geant4-08-02-patch-01 $
29//
30//
31// Andrew Walkden 27th March 1996
32// OpenGL scene handler - base for immediate mode and stored mode classes to
33// inherit from.
34
35#ifdef G4VIS_BUILD_OPENGL_DRIVER
36
37#ifndef G4OPENGLSCENEHANDLER_HH
38#define G4OPENGLSCENEHANDLER_HH
39
40#include "globals.hh"
41#include "G4RotationMatrix.hh"
42
43#include "G4OpenGL.hh"
44
45#include "G4VSceneHandler.hh"
46#include "G4OpenGLViewer.hh"
47
48// Base class for various OpenGLScene classes.
49class G4OpenGLSceneHandler: public G4VSceneHandler {
50
51public:
52 void AddPrimitive (const G4Polyline&);
53 void AddPrimitive (const G4Text&);
54 void AddPrimitive (const G4Circle&);
55 void AddPrimitive (const G4Square&);
56 void AddPrimitive (const G4Polyhedron&);
57 void AddPrimitive (const G4NURBS&);
58 // Explicitly invoke base class methods to avoid warnings about
59 // hiding of base class methods...
60 void AddPrimitive(const G4Polymarker& polymarker) {
61 G4VSceneHandler::AddPrimitive (polymarker);
62 }
63 void AddPrimitive (const G4Scale& scale) {
64 G4VSceneHandler::AddPrimitive (scale);
65 }
66
67 void AddSolid (const G4Box&);
68 void AddSolid (const G4Cons&);
69 void AddSolid (const G4Tubs&);
70 void AddSolid (const G4Trd&);
71 void AddSolid (const G4Trap&);
72 void AddSolid (const G4Sphere&);
73 void AddSolid (const G4Para&);
74 void AddSolid (const G4Torus&);
75 void AddSolid (const G4Polycone&);
76 void AddSolid (const G4Polyhedra&);
77 void AddSolid (const G4VSolid&);
78 void AddCompound (const G4VTrajectory&);
79 void AddCompound (const G4VHit&);
80
81protected:
82
83 G4OpenGLSceneHandler (G4VGraphicsSystem& system,
84 G4int id,
85 const G4String& name = "");
86 virtual ~G4OpenGLSceneHandler ();
87
88 const G4Polyhedron* CreateSectionPolyhedron ();
89 const G4Polyhedron* CreateCutawayPolyhedron ();
90
91private:
92
93 void AddCircleSquare (const G4VMarker&, G4int nSides);
94 /**************************************************
95 Not needed - but see note on future development in .cc.
96 void DrawScreenPolygon (G4double size,
97 const G4Point3D& centre,
98 G4int nSides);
99 // Draws in screen coordinates.
100 *********************************/
101
102 void DrawXYPolygon (G4double size,
103 const G4Point3D& centre,
104 G4int nSides);
105 // Draws in world coordinates a polygon in the screen plane knowing
106 // viewpoint direction and up vector.
107
108 static const GLubyte fStippleMaskHashed [128];
109};
110
111#include "G4OpenGLSceneHandler.icc"
112
113#endif
114
115#endif
Note: See TracBrowser for help on using the repository browser.