G4VRML1Viewer.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 // G4VRMLView.cc
00030 // Yasuhide Sawada & Satoshi Tanaka
00031 
00032 #ifndef WIN32
00033 
00034 //=================//
00035 #ifdef G4VIS_BUILD_VRML_DRIVER
00036 //=================//
00037 
00038 
00039 //#define DEBUG_FR_VIEW
00040 
00041 #include "G4VisManager.hh"
00042 
00043 #include "G4Scene.hh"
00044 #include "G4VRML1Viewer.hh"
00045 #include "G4VRML1SceneHandler.hh"
00046 #include "G4VRML1.hh"
00047 #include "G4ios.hh"
00048 
00049 G4VRML1Viewer::G4VRML1Viewer(G4VRML1SceneHandler& scene, const G4String& name) :
00050    G4VViewer(scene, scene.IncrementViewCount(), name), fSceneHandler(scene)
00051 {}
00052 
00053 G4VRML1Viewer::~G4VRML1Viewer()
00054 {}
00055 
00056 void G4VRML1Viewer::SetView()
00057 {
00058 #if defined DEBUG_FR_VIEW
00059   if (G4VisManager::GetVerbosity() >= G4VisManager::errors)
00060         G4cout << "***** G4VRML1Viewer::SetView(): No effects" << G4endl;
00061 #endif
00062 }
00063 
00064 void G4VRML1Viewer::DrawView()
00065 {
00066 #if defined DEBUG_FR_VIEW
00067   if (G4VisManager::GetVerbosity() >= G4VisManager::errors)
00068         G4cout << "***** G4VRML1Viewer::DrawView()" << G4endl;
00069 #endif
00070 
00071         fSceneHandler.VRMLBeginModeling();
00072 
00073         // Here is a minimal DrawView() function.
00074         NeedKernelVisit();
00075         ProcessView();
00076         FinishView();
00077 }
00078 
00079 void G4VRML1Viewer::ClearView(void)
00080 {
00081 #if defined DEBUG_FR_VIEW
00082   if (G4VisManager::GetVerbosity() >= G4VisManager::errors)
00083         G4cout << "***** G4VRML1Viewer::ClearView(): No effects" << G4endl;
00084 #endif
00085 }
00086 
00087 void G4VRML1Viewer::ShowView(void)
00088 {
00089 #if defined DEBUG_FR_VIEW
00090   if (G4VisManager::GetVerbosity() >= G4VisManager::errors)
00091         G4cout << "***** G4VRML1Viewer::ShowView()" << G4endl;
00092 #endif
00093         fSceneHandler.VRMLEndModeling();
00094 }
00095 
00096 void G4VRML1Viewer::FinishView(void)
00097 {
00098 #if defined DEBUG_FR_VIEW
00099   if (G4VisManager::GetVerbosity() >= G4VisManager::errors)
00100         G4cout << "***** G4VRML1Viewer::FinishView(): No effects" << G4endl;
00101 #endif
00102 }
00103 
00104 #endif
00105 #endif //WIN32

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