CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Attributes | Private Member Functions
TEveEllipsoidGL Class Reference

#include <TEveEllipsoidGL.h>

Inheritance diagram for TEveEllipsoidGL:
TEveEllipsoidProjectedGL

Public Member Functions

 ClassDef (TEveEllipsoidGL, 0)
 
virtual void DirectDraw (TGLRnrCtx &rnrCtx) const
 
virtual Bool_t IgnoreSizeForOfInterest () const
 
virtual void SetBBox ()
 
virtual Bool_t SetModel (TObject *obj, const Option_t *opt=0)
 
 TEveEllipsoidGL ()
 
virtual ~TEveEllipsoidGL ()
 

Protected Attributes

TEveEllipsoidfE
 

Private Member Functions

TEveEllipsoidGLoperator= (const TEveEllipsoidGL &)
 
 TEveEllipsoidGL (const TEveEllipsoidGL &)
 

Detailed Description

Definition at line 17 of file TEveEllipsoidGL.h.

Constructor & Destructor Documentation

TEveEllipsoidGL::TEveEllipsoidGL ( const TEveEllipsoidGL )
private
TEveEllipsoidGL::TEveEllipsoidGL ( )

Definition at line 30 of file TEveEllipsoidGL.cc.

30  :
31  TGLObject(), fE(0)
32 {
33  // Constructor.
34 
35  // fDLCache = kFALSE; // Disable display list.
36 }
TEveEllipsoid * fE
virtual TEveEllipsoidGL::~TEveEllipsoidGL ( )
inlinevirtual

Definition at line 29 of file TEveEllipsoidGL.h.

29 {}

Member Function Documentation

TEveEllipsoidGL::ClassDef ( TEveEllipsoidGL  ,
 
)
void TEveEllipsoidGL::DirectDraw ( TGLRnrCtx &  rnrCtx) const
virtual

Reimplemented in TEveEllipsoidProjectedGL.

Definition at line 60 of file TEveEllipsoidGL.cc.

References a, EnergyCorrector::c, fE, i, j, TEveEllipsoid::RefEMtx(), TEveEllipsoid::RefExtent3D(), TEveEllipsoid::RefPos(), and x.

61 {
62  // Render with OpenGL.
63 
64  // printf("TEveEllipsoidGL::DirectDraw LOD %s\n", fE->GetName());
65 
66  glPushAttrib(GL_ENABLE_BIT | GL_POLYGON_BIT | GL_LIGHTING_BIT);
67  glEnable(GL_NORMALIZE );
68  if(!quad)
69  quad = gluNewQuadric();
70 
71  glPushMatrix();
72 
73  TMatrixDSym xxx(3);
74  for(int i=0;i<3;i++)
75  for(int j=0;j<3;j++)
76  {
77  xxx(i,j) = fE->RefEMtx()(i+1,j+1);
78  }
79  TMatrixDEigen eig(xxx);
80 
81 
82  // rewrite for multmatrix ....
83  TEveTrans x;
84  for(int i=0;i<3;i++)
85  for(int j=0;j<3;j++)
86  {
87  x(i+1, j+1) = eig.GetEigenVectors()(i,j);
88  }
89 
90  TVector3 a = x.GetBaseVec(1);
91  TVector3 c = a.Cross(x.GetBaseVec(2));
92  x.SetBaseVec(3, c);
93 
94  glTranslatef(fE->RefPos()[0], fE->RefPos()[1], fE->RefPos()[2]);
95  glMultMatrixd(x.Array());
96  glScalef(fE->RefExtent3D()[0] , fE->RefExtent3D()[1], fE->RefExtent3D()[2]);
97  gluSphere(quad,1. , 30, 30);
98 
99  glPopMatrix();
100  glPopAttrib();
101 
102 
103  // gluDeleteQuadric(quad);
104 }
int i
Definition: DBlmapReader.cc:9
TEveVector & RefPos()
Definition: TEveEllipsoid.h:38
TEveEllipsoid * fE
TEveTrans & RefEMtx()
Definition: TEveEllipsoid.h:40
int j
Definition: DBlmapReader.cc:9
TEveVector & RefExtent3D()
Definition: TEveEllipsoid.h:39
double a
Definition: hdecay.h:121
virtual Bool_t TEveEllipsoidGL::IgnoreSizeForOfInterest ( ) const
inlinevirtual

Definition at line 35 of file TEveEllipsoidGL.h.

35 { return kTRUE; }
TEveEllipsoidGL& TEveEllipsoidGL::operator= ( const TEveEllipsoidGL )
private
void TEveEllipsoidGL::SetBBox ( )
virtual

Reimplemented in TEveEllipsoidProjectedGL.

Definition at line 48 of file TEveEllipsoidGL.cc.

49 {
50  // Set bounding box.
51  ( (TEveEllipsoid*)fExternalObj)->ComputeBBox();
52  SetAxisAlignedBBox(((TEveEllipsoid*)fExternalObj)->AssertBBox());
53 }
Bool_t TEveEllipsoidGL::SetModel ( TObject *  obj,
const Option_t *  opt = 0 
)
virtual

Reimplemented in TEveEllipsoidProjectedGL.

Definition at line 39 of file TEveEllipsoidGL.cc.

References fE, and getGTfromDQMFile::obj.

40 {
41  // Set model object.
42 
43  fE = SetModelDynCast<TEveEllipsoid>(obj);
44  return kTRUE;
45 }
TEveEllipsoid * fE

Member Data Documentation

TEveEllipsoid* TEveEllipsoidGL::fE
protected