#include "TEveProjectionAxes.h"
#include "TEveProjectionManager.h"
#include "TMath.h"
#include "TBuffer3D.h"
#include "TBuffer3DTypes.h"
#include "TVirtualPad.h"
#include "TVirtualViewer3D.h"
#include "TEveTrans.h"
ClassImp(TEveProjectionAxes);
TEveProjectionAxes::TEveProjectionAxes(TEveProjectionManager* m) :
TEveElement(fColor),
TNamed("TEveProjectionAxes", ""),
fManager(m),
fColor(kGray),
fLabMode(kValue),
fAxesMode(kAll),
fDrawCenter(kFALSE),
fDrawOrigin(kFALSE)
{
fNdivisions = 1006;
fLabelSize = 0.015;
fCanEditMainTrans = kFALSE;
fManager->AddDependent(this);
}
TEveProjectionAxes::~TEveProjectionAxes()
{
fManager->RemoveDependent(this);
}
void TEveProjectionAxes::Paint(Option_t* )
{
static const TEveException eH("TEveProjectionAxes::Paint ");
TBuffer3D buff(TBuffer3DTypes::kGeneric);
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.");
}
void TEveProjectionAxes::ComputeBBox()
{
static const TEveException eH("TEveProjectionManager::ComputeBBox ");
BBoxZero();
if(fManager == 0)
return;
for (Int_t i=0; i<6; ++i)
fBBox[i] = fManager->GetBBox()[i];
AssertBBoxExtents(0.1);
}
const TGPicture* TEveProjectionAxes::GetListTreeIcon(Bool_t)
{
return TEveElement::fgListTreeIcons[6];
}
Last change: Mon Nov 24 08:18:50 2008
Last generated: 2008-11-24 08:18
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.