ROOT logo
// @(#)root/geom:$Id: TVirtualGeoPainter.cxx 21494 2007-12-19 15:50:40Z brun $
// Author: Andrei Gheata   11/01/02

/*************************************************************************
 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

//______________________________________________________________________________
// TVirtualGeoPainter
// ==================
// ABC for geometry painters
//______________________________________________________________________________

#include "TROOT.h"
#include "TVirtualGeoPainter.h"
#include "TPluginManager.h"
#include "TGeoManager.h"

TVirtualGeoPainter  *TVirtualGeoPainter::fgGeoPainter = 0;

ClassImp(TVirtualGeoPainter)

//______________________________________________________________________________
TVirtualGeoPainter::TVirtualGeoPainter(TGeoManager *)
{
//*-*-*-*-*-*-*-*-*-*-*Geometry painter default constructor*-*-*-*-*-*-*-*-*
//*-*                  ====================================
}

//______________________________________________________________________________
TVirtualGeoPainter::~TVirtualGeoPainter()
{
//*-*-*-*-*-*-*-*-*-*-*Geometry painter default destructor*-*-*-*-*-*-*-*-*
//*-*                  ===================================

   fgGeoPainter = 0;
}


//______________________________________________________________________________
TVirtualGeoPainter *TVirtualGeoPainter::GeoPainter()
{
   // Static function returning a pointer to the geometry painter.
   // The painter will paint objects from the specified geometry. 
   // If the geometry painter does not exist a default painter is created.

   // if no painter set yet, create a default painter via the PluginManager
   if (!fgGeoPainter) {
      TPluginHandler *h;
      if ((h = gROOT->GetPluginManager()->FindHandler("TVirtualGeoPainter"))) {
         if (h->LoadPlugin() == -1)
            return 0;
         fgGeoPainter = (TVirtualGeoPainter*)h->ExecPlugin(1,gGeoManager);
      }
   }
   return fgGeoPainter;
}

//______________________________________________________________________________
void TVirtualGeoPainter::SetPainter(const TVirtualGeoPainter *painter)
{
   // Static function to set an alternative histogram painter.

   fgGeoPainter = (TVirtualGeoPainter*)painter;
}
 TVirtualGeoPainter.cxx:1
 TVirtualGeoPainter.cxx:2
 TVirtualGeoPainter.cxx:3
 TVirtualGeoPainter.cxx:4
 TVirtualGeoPainter.cxx:5
 TVirtualGeoPainter.cxx:6
 TVirtualGeoPainter.cxx:7
 TVirtualGeoPainter.cxx:8
 TVirtualGeoPainter.cxx:9
 TVirtualGeoPainter.cxx:10
 TVirtualGeoPainter.cxx:11
 TVirtualGeoPainter.cxx:12
 TVirtualGeoPainter.cxx:13
 TVirtualGeoPainter.cxx:14
 TVirtualGeoPainter.cxx:15
 TVirtualGeoPainter.cxx:16
 TVirtualGeoPainter.cxx:17
 TVirtualGeoPainter.cxx:18
 TVirtualGeoPainter.cxx:19
 TVirtualGeoPainter.cxx:20
 TVirtualGeoPainter.cxx:21
 TVirtualGeoPainter.cxx:22
 TVirtualGeoPainter.cxx:23
 TVirtualGeoPainter.cxx:24
 TVirtualGeoPainter.cxx:25
 TVirtualGeoPainter.cxx:26
 TVirtualGeoPainter.cxx:27
 TVirtualGeoPainter.cxx:28
 TVirtualGeoPainter.cxx:29
 TVirtualGeoPainter.cxx:30
 TVirtualGeoPainter.cxx:31
 TVirtualGeoPainter.cxx:32
 TVirtualGeoPainter.cxx:33
 TVirtualGeoPainter.cxx:34
 TVirtualGeoPainter.cxx:35
 TVirtualGeoPainter.cxx:36
 TVirtualGeoPainter.cxx:37
 TVirtualGeoPainter.cxx:38
 TVirtualGeoPainter.cxx:39
 TVirtualGeoPainter.cxx:40
 TVirtualGeoPainter.cxx:41
 TVirtualGeoPainter.cxx:42
 TVirtualGeoPainter.cxx:43
 TVirtualGeoPainter.cxx:44
 TVirtualGeoPainter.cxx:45
 TVirtualGeoPainter.cxx:46
 TVirtualGeoPainter.cxx:47
 TVirtualGeoPainter.cxx:48
 TVirtualGeoPainter.cxx:49
 TVirtualGeoPainter.cxx:50
 TVirtualGeoPainter.cxx:51
 TVirtualGeoPainter.cxx:52
 TVirtualGeoPainter.cxx:53
 TVirtualGeoPainter.cxx:54
 TVirtualGeoPainter.cxx:55
 TVirtualGeoPainter.cxx:56
 TVirtualGeoPainter.cxx:57
 TVirtualGeoPainter.cxx:58
 TVirtualGeoPainter.cxx:59
 TVirtualGeoPainter.cxx:60
 TVirtualGeoPainter.cxx:61
 TVirtualGeoPainter.cxx:62
 TVirtualGeoPainter.cxx:63
 TVirtualGeoPainter.cxx:64
 TVirtualGeoPainter.cxx:65
 TVirtualGeoPainter.cxx:66
 TVirtualGeoPainter.cxx:67
 TVirtualGeoPainter.cxx:68
 TVirtualGeoPainter.cxx:69