38 fGeoMode (kGM_Unknown),
44 fFixR (300), fFixZ (400),
45 fPastFixRFac (0), fPastFixZFac (0),
46 fScaleR (1), fScaleZ (1),
47 fPastFixRScale (1), fPastFixZScale (1),
68 v[0] =
x; v[1] =
y; v[2] =
z;
85 v[0] = p[0]; v[1] = p[1]; v[2] = p[2];
104 x = v[0]; y = v[1]; z = v[2];
108 x = p[0]; y = p[1]; z = p[2];
111 v[0] =
x; v[1] =
y; v[2] =
z;
142 v = i->fOffset + (v - i->fMin)*i->fScale;
182 static const TEveException eh(
"TEveProjection::AddPreScaleEntry ");
184 if (coord < 0 || coord > 2)
185 throw (eh +
"coordinate out of range.");
187 const Float_t infty = std::numeric_limits<Float_t>::infinity();
206 if (value <= prev.
fMin)
207 throw (eh +
"minimum value not larger than previous one.");
225 static const TEveException eh(
"TEveProjection::ChangePreScaleEntry ");
227 if (coord < 0 || coord > 2)
228 throw (eh +
"coordinate out of range.");
231 Int_t vs = vec.size();
232 if (entry < 0 || entry >= vs)
233 throw (eh +
"entry out of range.");
235 vec[entry].fScale = new_scale;
236 Int_t i0 = entry, i1 = entry + 1;
343 Warning(
"BisectBreakPoint",
"call with eps_sqr argument is obsolete - please use the new signature.");
360 while (--n_loops >= 0)
362 vM.
Mult(vL + vR, 0.5
f);
395 ::Warning(
"TEveProjection::GetLimits",
"method is obsolete");
405 for (
Int_t i=0; i<3; i++)
407 vec[i] = (i==screenAxis) ? 1.0
f : 0.0
f;
421 centerOO =
fCenter - dirCenter;
432 static const TEveException eH(
"TEveProjection::GetValForScreenPos ");
434 static const int kMaxSteps = 5000;
435 static const int kMaxVal = 10;
450 if (sv > zeroProjected[axisIdx])
456 while (cnt < kMaxSteps)
458 vec.
Mult(dirVec, xR);
462 if (vec[axisIdx] >= sv)
break;
465 if (++cnt >= kMaxSteps)
466 throw eH +
Form(
"positive projected %f, value %f,xL, xR ( %f, %f)\n", vec[axisIdx], sv, xL, xR);
469 else if (sv < zeroProjected[axisIdx])
475 while (cnt < kMaxSteps)
477 vec.
Mult(dirVec, xL);
481 if (vec[axisIdx] <= sv)
break;
483 if (++cnt >= kMaxSteps)
484 throw eH +
Form(
"negative projected %f, value %f,xL, xR ( %f, %f)\n", vec[axisIdx], sv, xL, xR);
497 xM = 0.5f * (xL + xR);
498 vec.
Mult(dirVec, xM);
501 if (vec[axisIdx] > sv)
505 if (++cnt >= kMaxSteps)
506 throw eH +
Form(
"can't converge %f %f, l/r %f/%f, idx=%d\n", vec[axisIdx], sv, xL, xR, axisIdx);
565 using namespace TMath;
641 vec.
Set(0.0
f, 0.0
f, 1.0
f);
642 else if (screenAxis == 1)
643 vec.
Set(0.0
f, 1.0
f, 0.0
f);
658 if ((v1.
fY < a && v2.
fY > a) || (v1.
fY > a && v2.
fY < a))
666 if (a1 < tolerance) { v1.
fY =
a; val =
kTRUE; }
670 if (a2 < tolerance) { v2.
fY =
a; val =
kTRUE; }
719 using namespace TMath;
734 phi = (x == 0.0f && y == 0.0f) ? 0.0
f :
ATan2(y, x);
747 phi = (x == 0.0f && y == 0.0f) ? 0.0
f :
ATan2(y, x);
792 using namespace TMath;
TEveTrans is a 4x4 transformation matrix for homogeneous coordinates stored internally in a column-ma...
TEve3DProjection()
Constructor.
virtual void SetDirectionalVector(Int_t screenAxis, TEveVector &vec)
Get vector for axis in a projected space.
vPreScale_t fPreScales[3]
void Set(const Float_t *v)
virtual void SetCenter(TEveVector &v)
Set center of distortion (virtual method).
void ClearPreScales()
Clear all pre-scaling information.
virtual void SetDirectionalVector(Int_t screenAxis, TEveVector &vec)
Get direction in the unprojected space for axis index in the projected space.
TT Dot(const TEveVectorT &a) const
Float_t GetLimit(Int_t i, Bool_t pos)
Method previously used by TEveProjectionAxesGL. Now obsolete.
void ProjectPointdv(Double_t *v, Float_t d)
Project double array.
virtual void ProjectPoint(Float_t &x, Float_t &y, Float_t &z, Float_t d, EPProc_e proc=kPP_Full)
Project point.
std::vector< PreScaleEntry_t >::iterator vPreScale_i
Double_t Log2(Double_t x)
virtual Float_t GetScreenVal(Int_t ax, Float_t value)
Project point on given axis and return projected value.
void MultiplyIP(TVector3 &v, Double_t w=1) const
Multiply vector in-place.
virtual Bool_t AcceptSegment(TEveVector &, TEveVector &, Float_t) const
virtual void ProjectPoint(Float_t &x, Float_t &y, Float_t &z, Float_t d, EPProc_e proc=kPP_Full)
Project point.
TEveRPhiProjection()
Constructor.
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
virtual Bool_t IsOnSubSpaceBoundrary(const TEveVector &v) const
Checks if point is on sub-space boundary.
virtual Int_t SubSpaceId(const TEveVector &v) const
Return sub-space id for the point.
virtual void ProjectPoint(Float_t &x, Float_t &y, Float_t &z, Float_t d, EPProc_e p=kPP_Full)=0
XY projection with distortion around given center.
void PreScalePoint(Float_t &x, Float_t &y)
Pre-scale point (x, y) in projected coordinates for 2D projections:
void ProjectVector(TEveVector &v, Float_t d)
Project TEveVector.
Double_t ATan2(Double_t, Double_t)
Base-class for non-linear projections.
std::vector< PreScaleEntry_t > vPreScale_t
TEveVector fProjectedCenter
void SetFixR(Float_t x)
Set fixed radius.
virtual Bool_t IsOnSubSpaceBoundrary(const TEveVector &) const
void SetFixZ(Float_t x)
Set fixed radius.
TEveProjection()
Constructor.
Double_t Sqrt(Double_t x)
void SetPastFixRFac(Float_t x)
Set 2's-exponent for relative scaling beyond FixR.
virtual Float_t GetValForScreenPos(Int_t ax, Float_t value)
Inverse projection.
char * Form(const char *fmt,...)
virtual void BisectBreakPoint(TEveVector &vL, TEveVector &vR, Float_t eps_sqr)
Find break-point on both sides of the discontinuity.
T Mag2(const SVector< T, D > &rhs)
Vector magnitude square Template to compute .
void Warning(const char *location, const char *msgfmt,...)
TEveVectorT & Mult(const TEveVectorT &a, TT af)
void ProjectPointfv(Float_t *v, Float_t d)
Project float array.
void SetDisplaceOrigin(bool)
Set flag to displace for center.
virtual Float_t * GetProjectedCenter()
Get projected center.
virtual void SetCenter(TEveVector &v)
void SetDistortion(Float_t d)
Set distortion.
TVector3 Multiply(const TVector3 &v, Double_t w=1) const
Multiply vector and return it.
virtual void ProjectPoint(Float_t &x, Float_t &y, Float_t &z, Float_t d, EPProc_e proc=kPP_Full)
Project point.
TEveVector GetOrthogonalCenter(int idx, TEveVector &out)
Get center ortogonal to given axis index.
you should not use this method at all Int_t Int_t z
Exception class thrown by TEve classes and macros.
void PreScaleVariable(Int_t dim, Float_t &v)
Pre-scale single variable with pre-scale entry dim.
void ChangePreScaleEntry(Int_t coord, Int_t entry, Float_t new_scale)
Change scale for given entry and coordinate.
TEveRhoZProjection()
Constructor.
Double_t Sqrt(Double_t x)
void SetPastFixZFac(Float_t x)
Set 2's-exponent for relative scaling beyond FixZ.
virtual Bool_t AcceptSegment(TEveVector &v1, TEveVector &v2, Float_t tolerance) const
Check if segment of two projected points is valid.
Int_t CeilNint(Double_t x)
Transformation from 3D to 2D.
void AddPreScaleEntry(Int_t coord, Float_t max_val, Float_t scale)
Add new scaling range for given coordinate.