//*CMZ :  2.22/01 17/04/99  07.50.09  by  Valery Fine(fine@mail.cern.ch)
//*CMZ :  1.00/07 27/03/97  17.55.23  by  Rene Brun
//*-- Author :    Nenad Buncic   19/09/95

//*KEEP,CopyRight,T=C.
/*************************************************************************
 * Copyright(c) 1995-1999, The ROOT System, All rights reserved.         *
 * Authors: Rene Brun, Fons Rademakers.                                  *
 * For list of contributors see $ROOTSYS/AA_CREDITS.                     *
 *                                                                       *
 * Permission to use, copy, modify and distribute this software and its  *
 * documentation for non-commercial purposes is hereby granted without   *
 * fee, provided that the above copyright notice appears in all copies   *
 * and that both the copyright notice and this permission notice appear  *
 * in the supporting documentation. The authors make no claims about the *
 * suitability of this software for any purpose. It is provided "as is"  *
 * without express or implied warranty.                                  *
 *************************************************************************/
//*KEND.

//*KEEP,TPARA.
#include "TPARA.h"
//*KEEP,TNode.
#include "TNode.h"
//*KEND.

ClassImp(TPARA)


//______________________________________________________________________________
//  

// PARA is a parallelepiped. It has 9 parameters: // // - name name of the shape // - title shape's title // - material (see TMaterial) // - dx half-length in x // - dy half-length in y // - dz half-length in z // - alpha angle formed by the y axis and by the plane joining the // centre of the faces parallel to the z-x plane at -DY and +DY // - theta polar angle of the line joining the centres of the faces // at -DZ and +DZ in z // - phi azimuthal angle of the line joining the centres of the // faces at -DZ and +DZ in z //______________________________________________________________________________ TPARA::TPARA() { //*-*-*-*-*-*-*-*-*-*-*-*-*PARA shape default constructor*-*-*-*-*-*-*-*-*-*-*-* //*-* ============================== } //______________________________________________________________________________ TPARA::TPARA(Text_t *name, Text_t *title, Text_t *material, Float_t dx, Float_t dy, Float_t dz, Float_t alpha, Float_t theta, Float_t phi) : TBRIK(name, title,material, dx, dy, dz) { //*-*-*-*-*-*-*-*-*-*-*-*-*PARA shape normal constructor*-*-*-*-*-*-*-*-*-*-*-*-* //*-* ============================= fAlpha = alpha; fTheta = theta; fPhi = phi; } //______________________________________________________________________________ TPARA::~TPARA() { //*-*-*-*-*-*-*-*-*-*-*-*-*PARA shape default destructor*-*-*-*-*-*-*-*-*-*-*-*-* //*-* ============================= } //______________________________________________________________________________ void TPARA::SetPoints(Float_t *buff) { //*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*Create PARA points*-*-*-*-*-*-*-*-*-*-*-*-*-*-* //*-* ================== if (!buff) return; Float_t dx, dy, dz, theta, phi, alpha; const Float_t PI = Float_t (TMath::Pi()); alpha = fAlpha * PI/180.0; theta = fTheta * PI/180.0; phi = fPhi * PI/180.0; dx = TBRIK::fDx; dy = TBRIK::fDy; dz = TBRIK::fDz; // Parallelepiped change angles to tangents (by Pavel Nevski 12/04/99) Float_t TXY,TTH,TXZ,TYZ; TXY = TMath::Tan(alpha); TTH = TMath::Tan(theta); TXZ = TTH*TMath::Cos(phi); TYZ = TTH*TMath::Sin(phi); *buff++ = -dz*TXZ-TXY*dy-dx; *buff++ = -dy-dz*TYZ; *buff++ = -dz; *buff++ = -dz*TXZ-TXY*dy+dx; *buff++ = -dy-dz*TYZ; *buff++ = -dz; *buff++ = -dz*TXZ+TXY*dy+dx; *buff++ = +dy-dz*TYZ; *buff++ = -dz; *buff++ = -dz*TXZ+TXY*dy-dx; *buff++ = +dy-dz*TYZ; *buff++ = -dz; *buff++ = +dz*TXZ-TXY*dy-dx; *buff++ = -dy+dz*TYZ; *buff++ = +dz; *buff++ = +dz*TXZ-TXY*dy+dx; *buff++ = -dy+dz*TYZ; *buff++ = +dz; *buff++ = +dz*TXZ+TXY*dy+dx; *buff++ = +dy+dz*TYZ; *buff++ = +dz; *buff++ = +dz*TXZ+TXY*dy-dx; *buff++ = +dy+dz*TYZ; *buff++ = +dz; }


ROOT page - Class index - Top of the page

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.