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 (  )  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]

Definition at line 22 of file TridPOV.h.

References fDist.

Referenced by AsString(), TridGLFrame::DrawHUD(), TridStereoGLFrame::TransformToPOV(), TridGLFrame::TransformToPOV(), TridFlatGLFrame::TransformToPOV(), and TridAnaglyphGLFrame::TransformToPOV().

00022 { return fDist; };

Double_t TridPOV::GetPhi (  )  const [inline]

Definition at line 24 of file TridPOV.h.

References fPhi.

Referenced by AsString(), TridGLFrame::DrawHUD(), TridStereoGLFrame::TransformToPOV(), TridGLFrame::TransformToPOV(), TridFlatGLFrame::TransformToPOV(), and TridAnaglyphGLFrame::TransformToPOV().

00024 { return fPhi; };

Double_t TridPOV::GetTheta (  )  const [inline]

Definition at line 23 of file TridPOV.h.

References fTheta.

Referenced by AsString(), TridGLFrame::DrawHUD(), TridStereoGLFrame::TransformToPOV(), TridGLFrame::TransformToPOV(), TridFlatGLFrame::TransformToPOV(), and TridAnaglyphGLFrame::TransformToPOV().

00023 { return fTheta; };

Double_t TridPOV::GetX ( void   )  const [inline]

Definition at line 19 of file TridPOV.h.

References fx.

Referenced by AsString(), TridGLFrame::DrawHUD(), TridStereoGLFrame::TransformToPOV(), TridGLFrame::TransformToPOV(), TridFlatGLFrame::TransformToPOV(), and TridAnaglyphGLFrame::TransformToPOV().

00019 { return fx; };

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]

Definition at line 20 of file TridPOV.h.

References fy.

Referenced by AsString(), TridGLFrame::DrawHUD(), TridStereoGLFrame::TransformToPOV(), TridGLFrame::TransformToPOV(), TridFlatGLFrame::TransformToPOV(), and TridAnaglyphGLFrame::TransformToPOV().

00020 { return fy; };

Double_t TridPOV::GetZ (  )  const [inline]

Definition at line 21 of file TridPOV.h.

References fz.

Referenced by AsString(), TridGLFrame::DrawHUD(), TridStereoGLFrame::TransformToPOV(), TridGLFrame::TransformToPOV(), TridFlatGLFrame::TransformToPOV(), and TridAnaglyphGLFrame::TransformToPOV().

00021 { return fz; };

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

Definition at line 26 of file TridPOV.h.

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

Referenced by TridUVPage::CreateSketches(), TridPageDetector::CreateSketches(), TridCratePage::CreateSketches(), TridGLFrame::SetPOV(), TridCratePage::TridCratePage(), TridPageSlice::TridPageSlice(), TridPmtPage::TridPmtPage(), and TridPOV().

00027     { fx=x; fy=y; fz=z; fDist=dist; fTheta=theta; fPhi=phi; };

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

Definition at line 46 of file TridPOV.h.

Referenced by Copy(), GetDist(), TridGLFrame::HandleButton(), TridGLFrame::HandleKey(), TridGLFrame::HandleMotion(), TridFlatGLFrame::HandleMotion(), TridGLFrame::NormalizeAndClipPOV(), Set(), and SetDist().

Double_t TridPOV::fPhi

Definition at line 48 of file TridPOV.h.

Referenced by Copy(), GetPhi(), TridGLFrame::HandleKey(), TridGLFrame::HandleMotion(), TridGLFrame::NormalizeAndClipPOV(), Set(), SetPhi(), and ShiftLateral().

Double_t TridPOV::fTheta

Definition at line 47 of file TridPOV.h.

Referenced by Copy(), GetTheta(), TridGLFrame::HandleMotion(), TridGLFrame::NormalizeAndClipPOV(), Set(), and SetTheta().

Double_t TridPOV::fx

Definition at line 43 of file TridPOV.h.

Referenced by Copy(), GetX(), GetXYZ(), TridGLFrame::HandleKey(), TridGLFrame::HandleMotion(), TridFlatGLFrame::HandleMotion(), TridGLFrame::NormalizeAndClipPOV(), Set(), SetX(), SetXYZ(), and ShiftLateral().

Double_t TridPOV::fy

Definition at line 44 of file TridPOV.h.

Referenced by Copy(), GetXYZ(), GetY(), TridGLFrame::HandleKey(), TridGLFrame::HandleMotion(), TridFlatGLFrame::HandleMotion(), TridGLFrame::NormalizeAndClipPOV(), Set(), SetXYZ(), SetY(), and ShiftLateral().

Double_t TridPOV::fz

Definition at line 45 of file TridPOV.h.

Referenced by Copy(), GetXYZ(), GetZ(), TridGLFrame::HandleKey(), TridGLFrame::HandleMotion(), TridFlatGLFrame::HandleMotion(), TridGLFrame::NormalizeAndClipPOV(), Set(), SetXYZ(), SetZ(), and ShiftLateral().


The documentation for this class was generated from the following files:
Generated on Mon Aug 11 01:07:03 2014 for loon by  doxygen 1.4.7