#include "TPARA.h"
#include "TNode.h"
#include "TMath.h"
ClassImp(TPARA)
TPARA::TPARA()
{
}
TPARA::TPARA(const char *name, const char *title, const char *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)
{
fAlpha = alpha;
fTheta = theta;
fPhi = phi;
}
TPARA::~TPARA()
{
}
void TPARA::SetPoints(Double_t *points) const
{
if (!points) 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;
Double_t txy = TMath::Tan(alpha);
Double_t tth = TMath::Tan(theta);
Double_t txz = tth*TMath::Cos(phi);
Double_t tyz = tth*TMath::Sin(phi);
*points++ = -dz*txz-txy*dy-dx ; *points++ = -dy-dz*tyz ; *points++ = -dz;
*points++ = -dz*txz+txy*dy-dx ; *points++ = +dy-dz*tyz ; *points++ = -dz;
*points++ = -dz*txz+txy*dy+dx ; *points++ = +dy-dz*tyz ; *points++ = -dz;
*points++ = -dz*txz-txy*dy+dx ; *points++ = -dy-dz*tyz ; *points++ = -dz;
*points++ = +dz*txz-txy*dy-dx ; *points++ = -dy+dz*tyz ; *points++ = +dz;
*points++ = +dz*txz+txy*dy-dx ; *points++ = +dy+dz*tyz ; *points++ = +dz;
*points++ = +dz*txz+txy*dy+dx ; *points++ = +dy+dz*tyz ; *points++ = +dz;
*points++ = +dz*txz-txy*dy+dx ; *points++ = -dy+dz*tyz ; *points++ = +dz;
}
Last change: Wed Jun 25 08:50:05 2008
Last generated: 2008-06-25 08:50
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.