TridSketchEllipse Class Reference

#include <TridSketches.h>

Inheritance diagram for TridSketchEllipse:
TridSketch

List of all members.

Public Member Functions

 TridSketchEllipse (void)
 TridSketchEllipse (const TVector3 &center, const TVector3 &axis1, const TVector3 &axis2, Int_t nvertex)
virtual ~TridSketchEllipse ()
void DrawSelf (void)

Public Attributes

TVector3 * p
Int_t fNv

Detailed Description

Definition at line 228 of file TridSketches.h.


Constructor & Destructor Documentation

TridSketchEllipse::TridSketchEllipse ( void   ) 

Definition at line 547 of file TridSketches.cxx.

00548   : TridSketch( kEllipse, TVector3() )
00549 {
00550   //
00551   // Default constructor for a box.
00552   //
00553   p = new TVector3[6];
00554   cout << "TridSketchEllipse:: Wrong constructor!" << endl;
00555   for(int i=0;i<8;i++) {
00556     cout << "Ellipse " << fId << "\t" << i << "\t" << p[i].x() << "\t" << p[i].y() << "\t" << p[i].z() << endl;
00557   }
00558 }

TridSketchEllipse::TridSketchEllipse ( const TVector3 &  center,
const TVector3 &  axis1,
const TVector3 &  axis2,
Int_t  nvertex 
)

Definition at line 561 of file TridSketches.cxx.

References Anp::angle(), fNv, and p.

00565   : TridSketch( kEllipse, center )
00566 {
00567   //
00568   // Defines the center of the faces, the
00569   //
00570   fNv = nvertex; 
00571   p = new TVector3[nvertex];
00572 
00573   // Find the points around the ends.
00574   for(int i=0;i<fNv;i++) {
00575     double angle = (double)i/(double)fNv * 2.0*TMath::Pi();
00576     p[i]         = center + axis1*cos(angle) + axis2*sin(angle);
00577   }
00578 }

virtual TridSketchEllipse::~TridSketchEllipse (  )  [inline, virtual]

Definition at line 240 of file TridSketches.h.

References TridSketchLine::p.

00240 { delete [] p; };


Member Function Documentation

void TridSketchEllipse::DrawSelf ( void   )  [virtual]

Reimplemented from TridSketch.

Definition at line 581 of file TridSketches.cxx.

References fNv, TridSketch::GlVertexTVector(), Msg::kError, MSG, and p.

00582 {
00583   //
00584   // Draws 
00585   //
00586   glBegin(GL_POLYGON);
00587   for(int i=0;i<fNv;i++) 
00588     GlVertexTVector(p[i]); 
00589   glEnd();
00590   
00591   int error;
00592   while ((error = glGetError()) != GL_NO_ERROR)  
00593     MSG("TriD",Msg::kError) << "TridSketchEllipse::DrawSelf.  GL error: "
00594                             << "(" << error << ")"
00595                             <<  gluErrorString(error)
00596                             << endl;
00597 }


Member Data Documentation

Definition at line 232 of file TridSketches.h.

Referenced by DrawSelf(), and TridSketchEllipse().

Definition at line 231 of file TridSketches.h.

Referenced by DrawSelf(), and TridSketchEllipse().


The documentation for this class was generated from the following files:

Generated on 16 Jan 2018 for loon by  doxygen 1.6.1