TridPOV Class Reference

#include <TridPOV.h>

Inheritance diagram for TridPOV:
TridUndoable< TridPOV > TridPOVUndoable

List of all members.

Public Member Functions

 TridPOV (double x=0, double y=0, double z=0, double dist=10, double theta=0, double phi=0)
 TridPOV (const TridPOV &other)
virtual ~TridPOV (void)
TVector3 GetXYZ () const
Double_t GetX () const
Double_t GetY () const
Double_t GetZ () const
Double_t GetDist () const
Double_t GetTheta () const
Double_t GetPhi () const
void Set (double x=0, double y=0, double z=0, double dist=10, double theta=0, double phi=0)
void SetXYZ (TVector3 &vect)
void SetX (Double_t in)
void SetY (Double_t in)
void SetZ (Double_t in)
void SetDist (Double_t in)
void SetTheta (Double_t in)
void SetPhi (Double_t in)
void ShiftLateral (Double_t lat)
void Copy (const TridPOV &other)
const char * AsString () const

Public Attributes

Double_t fx
Double_t fy
Double_t fz
Double_t fDist
Double_t fTheta
Double_t fPhi

Private Member Functions

 ClassDef (TridPOV, 0)

Detailed Description

Definition at line 9 of file TridPOV.h.


Constructor & Destructor Documentation

TridPOV::TridPOV ( double  x = 0,
double  y = 0,
double  z = 0,
double  dist = 10,
double  theta = 0,
double  phi = 0 
) [inline]

Definition at line 12 of file TridPOV.h.

References Set().

00013     { Set(x,y,z,dist,theta,phi); };

TridPOV::TridPOV ( const TridPOV other  )  [inline]

Definition at line 15 of file TridPOV.h.

References Copy().

00015 : TObject(other) { Copy(other); };

virtual TridPOV::~TridPOV ( void   )  [inline, virtual]

Definition at line 16 of file TridPOV.h.

00016 {};


Member Function Documentation

const char * TridPOV::AsString ( void   )  const

Definition at line 39 of file TridPOV.cxx.

References GetDist(), GetPhi(), GetTheta(), GetX(), GetY(), and GetZ().

00040 {
00041   static char buff[100];
00042   sprintf(buff,"POV: (%3.1f,%3.1f,%4.1f) D:%4.1f Th:%3f Phi:%3f",
00043            GetX(),GetY(),GetZ(),
00044            GetDist(),GetTheta(),GetPhi());
00045   return buff;
00046 }

TridPOV::ClassDef ( TridPOV  ,
 
) [private]
void TridPOV::Copy ( const TridPOV other  )  [inline]

Definition at line 39 of file TridPOV.h.

References fDist, fPhi, fTheta, fx, fy, and fz.

Referenced by TridGLFrame::SetMaxPOV(), TridGLFrame::SetMinPOV(), TridGLFrame::SetPOV(), TridPage::SetupFrame(), TridGLFrame::TridGLFrame(), and TridPOV().

00039 { fx=other.fx; fy=other.fy; fz=other.fz; fDist=other.fDist; fTheta=other.fTheta; fPhi=other.fPhi;};

Double_t TridPOV::GetDist (  )  const [inline]
Double_t TridPOV::GetPhi (  )  const [inline]
Double_t TridPOV::GetTheta (  )  const [inline]
Double_t TridPOV::GetX ( void   )  const [inline]
TVector3 TridPOV::GetXYZ (  )  const [inline]

Definition at line 18 of file TridPOV.h.

References fx, fy, and fz.

00018 { return TVector3(fx,fy,fz);};

Double_t TridPOV::GetY ( void   )  const [inline]
Double_t TridPOV::GetZ (  )  const [inline]
void TridPOV::Set ( double  x = 0,
double  y = 0,
double  z = 0,
double  dist = 10,
double  theta = 0,
double  phi = 0 
) [inline]
void TridPOV::SetDist ( Double_t  in  )  [inline]

Definition at line 33 of file TridPOV.h.

References fDist.

00033 { fDist  = in; };

void TridPOV::SetPhi ( Double_t  in  )  [inline]

Definition at line 35 of file TridPOV.h.

References fPhi.

00035 { fPhi   = in; };

void TridPOV::SetTheta ( Double_t  in  )  [inline]

Definition at line 34 of file TridPOV.h.

References fTheta.

00034 { fTheta = in; };

void TridPOV::SetX ( Double_t  in  )  [inline]

Definition at line 30 of file TridPOV.h.

References fx.

00030 { fx = in; };

void TridPOV::SetXYZ ( TVector3 &  vect  )  [inline]

Definition at line 29 of file TridPOV.h.

References fx, fy, and fz.

00029 { fx = vect.x(); fy = vect.y(); fz = vect.z(); }

void TridPOV::SetY ( Double_t  in  )  [inline]

Definition at line 31 of file TridPOV.h.

References fy.

00031 { fy = in; };

void TridPOV::SetZ ( Double_t  in  )  [inline]

Definition at line 32 of file TridPOV.h.

References fz.

00032 { fz = in; };

void TridPOV::ShiftLateral ( Double_t  lat  ) 

Definition at line 49 of file TridPOV.cxx.

References fPhi, fx, fy, and fz.

00050 {
00051   // Shift the POV so it's looking at a point LAT distance to the right
00052   // (in the viewer's frame) of the current look-at distance.
00053 
00054   /*
00055   // The old way: rotate phi for this eye.
00056   double dist = fDist;
00057   if(dist<0.2) dist = 0.2;
00058   double twist = atan( (lat) / (2. * dist)) * 57.295776843;
00059   fPhi += twist;
00060   return;
00061   */
00062   
00063   TVector3 rightdir(-1,0,0); // If no rotation, right is -x
00064   rightdir.Rotate(-fPhi*TMath::Pi()/180., // phi in radians. 
00065                   TVector3(0,1,0)); // Rotate about y axis
00066 
00067   // Move the lookat position.
00068   fx += lat * rightdir.x();
00069   fy += lat * rightdir.y();
00070   fz += lat * rightdir.z();
00071   
00072 }


Member Data Documentation

Double_t TridPOV::fDist
Double_t TridPOV::fPhi
Double_t TridPOV::fTheta
Double_t TridPOV::fx
Double_t TridPOV::fy
Double_t TridPOV::fz

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

Generated on 24 Apr 2017 for loon by  doxygen 1.6.1