ROOT logo
// @(#)root/eve:$Id: TEvePlot3D.cxx 29695 2009-08-06 11:10:55Z matevz $
// Author: Matevz Tadel, 2009

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

#include "TEvePlot3D.h"
#include "TEveTrans.h"

#include "TVirtualPad.h"
#include "TVirtualViewer3D.h"
#include "TBuffer3D.h"
#include "TBuffer3DTypes.h"


//______________________________________________________________________________
// Description of TEvePlot3D
//

ClassImp(TEvePlot3D);

//______________________________________________________________________________
TEvePlot3D::TEvePlot3D(const char* n, const char* t) :
   TEveElementList(n, t),
   fPlot(0),
   fLogX(kFALSE), fLogY(kFALSE), fLogZ(kFALSE)
{
   // Constructor.

   InitMainTrans();
}


/******************************************************************************/

/*
// For now use true sizes of plots.
//______________________________________________________________________________
void TEvePlot3D::ComputeBBox()
{
   // Compute bounding-box of the data.

   if (fPlot)
      BBoxZero(); // should be BBoxZero(0.5); once the plots are stuffed into unit box.
   else
      BBoxZero();
}
*/

//______________________________________________________________________________
void TEvePlot3D::Paint(Option_t*)
{
   // Paint object.
   // This is for direct rendering (using TEvePlot3DGL class).

   static const TEveException eh("TEvePlot3D::Paint ");

   if (fRnrSelf == kFALSE) return;

   TBuffer3D buff(TBuffer3DTypes::kGeneric);

   // Section kCore
   buff.fID           = this;
   buff.fColor        = GetMainColor();
   buff.fTransparency = GetMainTransparency();
   if (HasMainTrans())
      RefMainTrans().SetBuffer3D(buff);
   buff.SetSectionsValid(TBuffer3D::kCore);

   Int_t reqSections = gPad->GetViewer3D()->AddObject(buff);
   if (reqSections != TBuffer3D::kNone)
      Error(eh, "only direct GL rendering supported.");
}
 TEvePlot3D.cxx:1
 TEvePlot3D.cxx:2
 TEvePlot3D.cxx:3
 TEvePlot3D.cxx:4
 TEvePlot3D.cxx:5
 TEvePlot3D.cxx:6
 TEvePlot3D.cxx:7
 TEvePlot3D.cxx:8
 TEvePlot3D.cxx:9
 TEvePlot3D.cxx:10
 TEvePlot3D.cxx:11
 TEvePlot3D.cxx:12
 TEvePlot3D.cxx:13
 TEvePlot3D.cxx:14
 TEvePlot3D.cxx:15
 TEvePlot3D.cxx:16
 TEvePlot3D.cxx:17
 TEvePlot3D.cxx:18
 TEvePlot3D.cxx:19
 TEvePlot3D.cxx:20
 TEvePlot3D.cxx:21
 TEvePlot3D.cxx:22
 TEvePlot3D.cxx:23
 TEvePlot3D.cxx:24
 TEvePlot3D.cxx:25
 TEvePlot3D.cxx:26
 TEvePlot3D.cxx:27
 TEvePlot3D.cxx:28
 TEvePlot3D.cxx:29
 TEvePlot3D.cxx:30
 TEvePlot3D.cxx:31
 TEvePlot3D.cxx:32
 TEvePlot3D.cxx:33
 TEvePlot3D.cxx:34
 TEvePlot3D.cxx:35
 TEvePlot3D.cxx:36
 TEvePlot3D.cxx:37
 TEvePlot3D.cxx:38
 TEvePlot3D.cxx:39
 TEvePlot3D.cxx:40
 TEvePlot3D.cxx:41
 TEvePlot3D.cxx:42
 TEvePlot3D.cxx:43
 TEvePlot3D.cxx:44
 TEvePlot3D.cxx:45
 TEvePlot3D.cxx:46
 TEvePlot3D.cxx:47
 TEvePlot3D.cxx:48
 TEvePlot3D.cxx:49
 TEvePlot3D.cxx:50
 TEvePlot3D.cxx:51
 TEvePlot3D.cxx:52
 TEvePlot3D.cxx:53
 TEvePlot3D.cxx:54
 TEvePlot3D.cxx:55
 TEvePlot3D.cxx:56
 TEvePlot3D.cxx:57
 TEvePlot3D.cxx:58
 TEvePlot3D.cxx:59
 TEvePlot3D.cxx:60
 TEvePlot3D.cxx:61
 TEvePlot3D.cxx:62
 TEvePlot3D.cxx:63
 TEvePlot3D.cxx:64
 TEvePlot3D.cxx:65
 TEvePlot3D.cxx:66
 TEvePlot3D.cxx:67
 TEvePlot3D.cxx:68
 TEvePlot3D.cxx:69
 TEvePlot3D.cxx:70
 TEvePlot3D.cxx:71
 TEvePlot3D.cxx:72
 TEvePlot3D.cxx:73
 TEvePlot3D.cxx:74
 TEvePlot3D.cxx:75
 TEvePlot3D.cxx:76
 TEvePlot3D.cxx:77
 TEvePlot3D.cxx:78