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 32 of file TEveEllipsoidGL.cc.

32  :
33  TGLObject(), fE(0)
34 {
35  // Constructor.
36 
37  // fDLCache = kFALSE; // Disable display list.
38 }
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 62 of file TEveEllipsoidGL.cc.

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

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

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

Reimplemented in TEveEllipsoidProjectedGL.

Definition at line 41 of file TEveEllipsoidGL.cc.

References fE, and getGTfromDQMFile::obj.

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

Member Data Documentation

TEveEllipsoid* TEveEllipsoidGL::fE
protected