Revision 01911daefdab6ec4f4836ccb0500e5996e8cd09f authored by Olivier Couet on 20 September 2006, 11:46:13 UTC, committed by Olivier Couet on 20 September 2006, 11:46:13 UTC
if they were set on the original histogram (suggested by V.Boudry). git-svn-id: http://root.cern.ch/svn/root/trunk@16302 27541ba8-7e3a-0410-8455-c3a389f83636
1 parent 49eea84
TGLSphere.cxx
// @(#)root/gl:$Name: $:$Id: TGLSphere.cxx $
// Author: Timur Pocheptsov 03/08/2004
// NOTE: This code moved from obsoleted TGLSceneObject.h / .cxx - see these
// attic files for previous CVS history
/*************************************************************************
* Copyright (C) 1995-2006, 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 "TGLSphere.h"
#include "TGLDrawFlags.h"
#include "TGLIncludes.h"
#include "TBuffer3D.h"
#include "TBuffer3DTypes.h"
// For debug tracing
#include "TClass.h"
#include "TError.h"
ClassImp(TGLSphere)
//______________________________________________________________________________
TGLSphere::TGLSphere(const TBuffer3DSphere &buffer) :
TGLLogicalShape(buffer)
{
// Default ctor
fRadius = buffer.fRadiusOuter;
// TODO:
// Support hollow & cut spheres
// buffer.fRadiusInner;
// buffer.fThetaMin;
// buffer.fThetaMax;
// buffer.fPhiMin;
// buffer.fPhiMax;
}
//______________________________________________________________________________
void TGLSphere::DirectDraw(const TGLDrawFlags & flags) const
{
// Debug tracing
if (gDebug > 4) {
Info("TGLSphere::DirectDraw", "this %d (class %s) LOD %d", this, IsA()->GetName(), flags.LOD());
}
// 4 stack/slice min for gluSphere to work
UInt_t divisions = flags.LOD();
if (divisions < 4) {
divisions = 4;
}
gluSphere(fgQuad.Get(),fRadius, divisions, divisions);
}
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...