G4XXXViewer.cc

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 //
00027 // $Id$
00028 //
00029 // 
00030 // John Allison  5th April 2001
00031 // A template for a simplest possible graphics driver.
00032 //?? Lines or sections marked like this require specialisation for your driver.
00033 
00034 #include "G4XXXViewer.hh"
00035 
00036 #include "G4VSceneHandler.hh"
00037 #include "G4XXXSceneHandler.hh"
00038 
00039 G4XXXViewer::G4XXXViewer
00040 (G4VSceneHandler& sceneHandler, const G4String& name):
00041   G4VViewer(sceneHandler, sceneHandler.IncrementViewCount(), name) {}
00042 
00043 G4XXXViewer::~G4XXXViewer() {}
00044 
00045 void G4XXXViewer::SetView() {
00046 #ifdef G4XXXDEBUG
00047   G4cout << "G4XXXViewer::SetView() called." << G4endl;
00048 #endif
00049 }
00050 
00051 void G4XXXViewer::ClearView() {
00052 #ifdef G4XXXDEBUG
00053   G4cout << "G4XXXViewer::ClearView() called." << G4endl;
00054 #endif
00055 }
00056 
00057 void G4XXXViewer::DrawView() {
00058 #ifdef G4XXXDEBUG
00059   G4cout << "G4XXXViewer::DrawView() called." << G4endl;
00060 #endif
00061 
00062   // First, a view should decide when to re-visit the G4 kernel.
00063   // Sometimes it might not be necessary, e.g., if the scene is stored
00064   // in a graphical database (e.g., OpenGL's display lists) and only
00065   // the viewing angle has changed.  But graphics systems without a
00066   // graphical database will always need to visit the G4 kernel.
00067 
00068   NeedKernelVisit ();  // Default is - always visit G4 kernel.
00069   // Note: this routine sets the fNeedKernelVisit flag of *all* the
00070   // views of the scene.
00071 
00072   ProcessView ();      // The basic logic is here.
00073 
00074   // Then a view may have more to do, e.g., display the graphical
00075   // database.  That code should come here...
00076 
00077   // ...before finally...
00078   FinishView ();       // Flush streams and/or swap buffers.
00079 }
00080 
00081 void G4XXXViewer::ShowView() {
00082 #ifdef G4XXXDEBUG
00083   G4cout << "G4XXXViewer::ShowView() called." << G4endl;
00084   static_cast<G4XXXSceneHandler&>(fSceneHandler).PrintStores();
00085 #endif
00086 }

Generated on Mon May 27 17:50:28 2013 for Geant4 by  doxygen 1.4.7