Logo ROOT   6.16/01
Reference Guide
TEveProjections.cxx
Go to the documentation of this file.
1// @(#)root/eve:$Id$
2// Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
3
4/*************************************************************************
5 * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12#include "TError.h"
13
14#include "TEveProjections.h"
15#include "TEveTrans.h"
16#include "TEveUtil.h"
17
18#include <limits>
19
20/** \class TEveProjection
21\ingroup TEve
22Base-class for non-linear projections.
23
24Enables to define an external center of distortion and a scale to
25fixate a bounding box of a projected point.
26*/
27
29
32
33////////////////////////////////////////////////////////////////////////////////
34/// Constructor.
35
37 fType (kPT_Unknown),
38 fGeoMode (kGM_Unknown),
39 fName (0),
40 fCenter (),
41 fDisplaceOrigin (kFALSE),
42 fUsePreScale (kFALSE),
43 fDistortion (0.0f),
44 fFixR (300), fFixZ (400),
45 fPastFixRFac (0), fPastFixZFac (0),
46 fScaleR (1), fScaleZ (1),
47 fPastFixRScale (1), fPastFixZScale (1),
48 fMaxTrackStep (5)
49{
50}
51
52////////////////////////////////////////////////////////////////////////////////
53/// Project float array.
54
56{
57 ProjectPoint(v[0], v[1], v[2], d);
58}
59
60////////////////////////////////////////////////////////////////////////////////
61/// Project double array.
62/// This is a bit piggish as we convert the doubles to floats and back.
63
65{
66 Float_t x = v[0], y = v[1], z = v[2];
67 ProjectPoint(x, y, z, d);
68 v[0] = x; v[1] = y; v[2] = z;
69}
70
71////////////////////////////////////////////////////////////////////////////////
72/// Project TEveVector.
73
75{
76 ProjectPoint(v.fX, v.fY, v.fZ, d);
77}
78
79////////////////////////////////////////////////////////////////////////////////
80/// Project float array, converting it to global coordinate system first if
81/// transformation matrix is set.
82
84{
85 v[0] = p[0]; v[1] = p[1]; v[2] = p[2];
86 if (t)
87 {
88 t->MultiplyIP(v);
89 }
90 ProjectPoint(v[0], v[1], v[2], d);
91}
92
93////////////////////////////////////////////////////////////////////////////////
94/// Project double array, converting it to global coordinate system first if
95/// transformation matrix is set.
96/// This is a bit piggish as we convert the doubles to floats and back.
97
99{
100 Float_t x, y, z;
101 if (t)
102 {
103 t->Multiply(p, v);
104 x = v[0]; y = v[1]; z = v[2];
105 }
106 else
107 {
108 x = p[0]; y = p[1]; z = p[2];
109 }
110 ProjectPoint(x, y, z, d);
111 v[0] = x; v[1] = y; v[2] = z;
112}
113
114////////////////////////////////////////////////////////////////////////////////
115/// Project TEveVector, converting it to global coordinate system first if
116/// transformation matrix is set.
117
119{
120 if (t)
121 {
122 t->MultiplyIP(v);
123 }
124 ProjectPoint(v.fX, v.fY, v.fZ, d);
125}
126
127////////////////////////////////////////////////////////////////////////////////
128/// Pre-scale single variable with pre-scale entry dim.
129
131{
132 if (!fPreScales[dim].empty())
133 {
134 Bool_t invp = kFALSE;
135 if (v < 0) {
136 v = -v;
137 invp = kTRUE;
138 }
139 vPreScale_i i = fPreScales[dim].begin();
140 while (v > i->fMax)
141 ++i;
142 v = i->fOffset + (v - i->fMin)*i->fScale;
143 if (invp)
144 v = -v;
145 }
146}
147
148////////////////////////////////////////////////////////////////////////////////
149/// Pre-scale point (x, y) in projected coordinates for 2D projections:
150/// - RhoZ ~ (rho, z)
151/// - RPhi ~ (r, phi), scaling phi doesn't make much sense.
152
154{
157}
158
159////////////////////////////////////////////////////////////////////////////////
160/// Pre-scale point (x, y, z) in projected coordinates for 3D projection.
161
163{
166 PreScaleVariable(2, z);
167}
168
169////////////////////////////////////////////////////////////////////////////////
170/// Add new scaling range for given coordinate.
171/// Arguments:
172/// - coord 0 ~ x, 1 ~ y, 2 ~ z
173/// - value value of input coordinate from which to apply this scale;
174/// - scale the scale to apply from value onwards.
175///
176/// NOTE: If pre-scaling is combined with center-displaced then
177/// the scale of the central region should be 1. This limitation
178/// can be removed but will cost CPU.
179
181{
182 static const TEveException eh("TEveProjection::AddPreScaleEntry ");
183
184 if (coord < 0 || coord > 2)
185 throw (eh + "coordinate out of range.");
186
187 const Float_t infty = std::numeric_limits<Float_t>::infinity();
188
189 vPreScale_t& vec = fPreScales[coord];
190
191 if (vec.empty())
192 {
193 if (value == 0)
194 {
195 vec.push_back(PreScaleEntry_t(0, infty, 0, scale));
196 }
197 else
198 {
199 vec.push_back(PreScaleEntry_t(0, value, 0, 1));
200 vec.push_back(PreScaleEntry_t(value, infty, value, scale));
201 }
202 }
203 else
204 {
205 PreScaleEntry_t& prev = vec.back();
206 if (value <= prev.fMin)
207 throw (eh + "minimum value not larger than previous one.");
208
209 prev.fMax = value;
210 Float_t offset = prev.fOffset + (prev.fMax - prev.fMin)*prev.fScale;
211 vec.push_back(PreScaleEntry_t(value, infty, offset, scale));
212 }
213}
214
215////////////////////////////////////////////////////////////////////////////////
216/// Change scale for given entry and coordinate.
217///
218/// NOTE: If the first entry you created used other value than 0,
219/// one entry (covering range from 0 to this value) was created
220/// automatically.
221
223 Float_t new_scale)
224{
225 static const TEveException eh("TEveProjection::ChangePreScaleEntry ");
226
227 if (coord < 0 || coord > 2)
228 throw (eh + "coordinate out of range.");
229
230 vPreScale_t& vec = fPreScales[coord];
231 Int_t vs = vec.size();
232 if (entry < 0 || entry >= vs)
233 throw (eh + "entry out of range.");
234
235 vec[entry].fScale = new_scale;
236 Int_t i0 = entry, i1 = entry + 1;
237 while (i1 < vs)
238 {
239 PreScaleEntry_t e0 = vec[i0];
240 vec[i1].fOffset = e0.fOffset + (e0.fMax - e0.fMin)*e0.fScale;
241 i0 = i1++;
242 }
243}
244
245////////////////////////////////////////////////////////////////////////////////
246/// Clear all pre-scaling information.
247
249{
250 fPreScales[0].clear();
251 fPreScales[1].clear();
252 fPreScales[2].clear();
253}
254
255////////////////////////////////////////////////////////////////////////////////
256/// Set distortion.
257
259{
260 fDistortion = d;
261 fScaleR = 1.0f + fFixR*fDistortion;
262 fScaleZ = 1.0f + fFixZ*fDistortion;
265}
266
267////////////////////////////////////////////////////////////////////////////////
268/// Set fixed radius.
269
271{
272 fFixR = r;
275}
276
277////////////////////////////////////////////////////////////////////////////////
278/// Set fixed radius.
279
281{
282 fFixZ = z;
285}
286
287////////////////////////////////////////////////////////////////////////////////
288/// Set 2's-exponent for relative scaling beyond FixR.
289
291{
292 fPastFixRFac = x;
294}
295
296////////////////////////////////////////////////////////////////////////////////
297/// Get projected center.
298
300{
301 static TEveVector zero;
302
303 if (fDisplaceOrigin)
304 return zero.Arr();
305 else
306 return fCenter.Arr();
307}
308
309////////////////////////////////////////////////////////////////////////////////
310/// Set flag to displace for center.
311/// This options is useful if want to have projected center
312/// at (0, 0) position in projected coordinates and want to dismiss
313/// gap around projected center in RhoZ projection.
314
316{
318 // update projected center
320}
321
322////////////////////////////////////////////////////////////////////////////////
323/// Set 2's-exponent for relative scaling beyond FixZ.
324
326{
327 fPastFixZFac = x;
329}
330
331////////////////////////////////////////////////////////////////////////////////
332/// Find break-point on both sides of the discontinuity.
333/// They still need to be projected after the call.
334/// This is an obsolete version of the method that required manual
335/// specification of precision -- this lead to (infrequent) infinite loops.
336
338{
339 static Bool_t warnedp = kFALSE;
340
341 if (!warnedp)
342 {
343 Warning("BisectBreakPoint", "call with eps_sqr argument is obsolete - please use the new signature.");
344 warnedp = kTRUE;
345 }
346
347 BisectBreakPoint(vL, vR, kFALSE);
348}
349
350////////////////////////////////////////////////////////////////////////////////
351/// Find break-point on both sides of the discontinuity.
352/// If project_result is true, the resulting break points will be projected
353/// with given depth value.
354
356 Bool_t project_result, Float_t depth)
357{
358 TEveVector vM, vLP, vMP;
359 Int_t n_loops = TMath::CeilNint(TMath::Log2(1e12 * (vL-vR).Mag2() / (0.5f*(vL+vR)).Mag2()) / 2);
360 while (--n_loops >= 0)
361 {
362 vM.Mult(vL + vR, 0.5f);
363 vLP.Set(vL); ProjectPoint(vLP.fX, vLP.fY, vLP.fZ, 0);
364 vMP.Set(vM); ProjectPoint(vMP.fX, vMP.fY, vMP.fZ, 0);
365
366 if (IsOnSubSpaceBoundrary(vMP))
367 {
368 vL.Set(vM);
369 vR.Set(vM);
370 break;
371 }
372
373 if (AcceptSegment(vLP, vMP, 0.0f))
374 {
375 vL.Set(vM);
376 }
377 else
378 {
379 vR.Set(vM);
380 }
381 }
382
383 if (project_result)
384 {
385 ProjectVector(vL, depth);
386 ProjectVector(vR, depth);
387 }
388}
389
390////////////////////////////////////////////////////////////////////////////////
391/// Method previously used by TEveProjectionAxesGL. Now obsolete.
392
394{
395 ::Warning("TEveProjection::GetLimits", "method is obsolete");
396
397 return 0;
398}
399
400////////////////////////////////////////////////////////////////////////////////
401/// Get vector for axis in a projected space.
402
404{
405 for (Int_t i=0; i<3; i++)
406 {
407 vec[i] = (i==screenAxis) ? 1.0f : 0.0f;
408 }
409}
410
411////////////////////////////////////////////////////////////////////////////////
412/// Get center ortogonal to given axis index.
413
415{
416 TEveVector dirVec;
417 SetDirectionalVector(i, dirVec);
418
419 TEveVector dirCenter;
420 dirCenter.Mult(dirVec, fCenter.Dot(dirVec));
421 centerOO = fCenter - dirCenter;
422
423
424 return centerOO;
425}
426
427////////////////////////////////////////////////////////////////////////////////
428/// Inverse projection.
429
431{
432 static const TEveException eH("TEveProjection::GetValForScreenPos ");
433
434 static const int kMaxSteps = 5000;
435 static const int kMaxVal = 10;
436
437 Float_t xL, xM, xR;
438 TEveVector vec;
439
440 TEveVector dirVec;
441 SetDirectionalVector(axisIdx, dirVec);
442
443 TEveVector zero;
444 if (fDisplaceOrigin) zero = fCenter;
445
446 TEveVector zeroProjected = zero;
447 ProjectVector(zeroProjected, 0.f);
448
449 // search from -/+ infinity according to sign of screen value
450 if (sv > zeroProjected[axisIdx])
451 {
452 xL = 0;
453 xR = kMaxVal;
454
455 int cnt = 0;
456 while (cnt < kMaxSteps)
457 {
458 vec.Mult(dirVec, xR);
459 if (fDisplaceOrigin) vec += fCenter;
460
461 ProjectVector(vec, 0);
462 if (vec[axisIdx] >= sv) break;
463 xL = xR; xR *= 2;
464
465 if (++cnt >= kMaxSteps)
466 throw eH + Form("positive projected %f, value %f,xL, xR ( %f, %f)\n", vec[axisIdx], sv, xL, xR);
467 }
468 }
469 else if (sv < zeroProjected[axisIdx])
470 {
471 xR = 0;
472 xL = -kMaxVal;
473
474 int cnt = 0;
475 while (cnt < kMaxSteps)
476 {
477 vec.Mult(dirVec, xL);
478 if (fDisplaceOrigin) vec += fCenter;
479
480 ProjectVector(vec, 0);
481 if (vec[axisIdx] <= sv) break;
482 xR = xL; xL *= 2;
483 if (++cnt >= kMaxSteps)
484 throw eH + Form("negative projected %f, value %f,xL, xR ( %f, %f)\n", vec[axisIdx], sv, xL, xR);
485 }
486 }
487 else
488 {
489 return 0.0f;
490 }
491
492 // printf("search for value %f in rng[%f, %f] \n", sv, xL, xR);
493 int cnt = 0;
494 do
495 {
496 //printf("search value with bisection xL=%f, xR=%f; vec[axisIdx]=%f, sv=%f\n", xL, xR, vec[axisIdx], sv);
497 xM = 0.5f * (xL + xR);
498 vec.Mult(dirVec, xM);
499 if (fDisplaceOrigin) vec += fCenter;
500 ProjectVector(vec, 0);
501 if (vec[axisIdx] > sv)
502 xR = xM;
503 else
504 xL = xM;
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);
507
508 } while (TMath::Abs(vec[axisIdx] - sv) >= fgEps);
509
510
511 return xM;
512}
513
514////////////////////////////////////////////////////////////////////////////////
515/// Project point on given axis and return projected value.
516
518{
519 TEveVector pos = dirVec*x;
520
521 if (fDisplaceOrigin)
522 pos += fCenter;
523
524 ProjectVector(pos , 0.f);
525
526 return pos[i];
527}
528
529////////////////////////////////////////////////////////////////////////////////
530/// Project point on given axis and return projected value.
531
533{
534 TEveVector dirVec;
535 SetDirectionalVector(i, dirVec);
536 TEveVector oCenter;
537 // GetOrthogonalCenter(i, oCenter);
538 return GetScreenVal(i, x, dirVec, oCenter);
539}
540
541/** \class TEveRhoZProjection
542\ingroup TEve
543Transformation from 3D to 2D. X axis represent Z coordinate. Y axis have value of
544radius with a sign of Y coordinate.
545*/
546
548
549////////////////////////////////////////////////////////////////////////////////
550/// Constructor.
551
554{
555 fType = kPT_RhoZ;
556 fName = "RhoZ";
557}
558
559////////////////////////////////////////////////////////////////////////////////
560/// Project point.
561
563 Float_t d, EPProc_e proc)
564{
565 using namespace TMath;
566
567 if (fDisplaceOrigin) {
568 x -= fCenter.fX;
569 y -= fCenter.fY;
570 z -= fCenter.fZ;
571 }
572 if (proc == kPP_Plane || proc == kPP_Full)
573 {
574 // project
575 y = Sign((Float_t)Sqrt(x*x+y*y), y);
576 x = z;
577 }
578 if (proc == kPP_Distort || proc == kPP_Full)
579 {
580 if (fUsePreScale)
581 PreScalePoint(y, x);
582
583
584 // distort
585
586 if (!fDisplaceOrigin) {
589 }
590
591 if (x > fFixZ)
592 x = fFixZ + fPastFixZScale*(x - fFixZ);
593 else if (x < -fFixZ)
594 x = -fFixZ + fPastFixZScale*(x + fFixZ);
595 else
596 x = x * fScaleZ / (1.0f + Abs(x)*fDistortion);
597
598 if (y > fFixR)
599 y = fFixR + fPastFixRScale*(y - fFixR);
600 else if (y < -fFixR)
601 y = -fFixR + fPastFixRScale*(y + fFixR);
602 else
603 y = y * fScaleR / (1.0f + Abs(y)*fDistortion);
604
605 if (!fDisplaceOrigin) {
608 }
609 }
610 z = d;
611}
612
613////////////////////////////////////////////////////////////////////////////////
614/// Set center of distortion (virtual method).
615
617{
618 fCenter = v;
619
620 if (fDisplaceOrigin)
621 {
622 fProjectedCenter.Set(0.f, 0.f, 0.f);
623 }
624 else
625 {
626 Float_t r = TMath::Sqrt(v.fX*v.fX + v.fY*v.fY);
630 }
631}
632
633////////////////////////////////////////////////////////////////////////////////
634/// Get direction in the unprojected space for axis index in the
635/// projected space.
636/// This is virtual method from base-class TEveProjection.
637
639{
640 if (screenAxis == 0)
641 vec.Set(0.0f, 0.0f, 1.0f);
642 else if (screenAxis == 1)
643 vec.Set(0.0f, 1.0f, 0.0f);
644
645}
646
647////////////////////////////////////////////////////////////////////////////////
648/// Check if segment of two projected points is valid.
649///
650/// Move slightly one of the points if by shifting it by no more than
651/// tolerance the segment can become acceptable.
652
654 Float_t tolerance) const
655{
657 Bool_t val = kTRUE;
658 if ((v1.fY < a && v2.fY > a) || (v1.fY > a && v2.fY < a))
659 {
660 val = kFALSE;
661 if (tolerance > 0)
662 {
663 Float_t a1 = TMath::Abs(v1.fY - a), a2 = TMath::Abs(v2.fY - a);
664 if (a1 < a2)
665 {
666 if (a1 < tolerance) { v1.fY = a; val = kTRUE; }
667 }
668 else
669 {
670 if (a2 < tolerance) { v2.fY = a; val = kTRUE; }
671 }
672 }
673 }
674 return val;
675}
676
677////////////////////////////////////////////////////////////////////////////////
678/// Return sub-space id for the point.
679/// 0 - upper half-space
680/// 1 - lower half-space
681
683{
684 return v.fY > fProjectedCenter.fY ? 0 : 1;
685}
686
687////////////////////////////////////////////////////////////////////////////////
688/// Checks if point is on sub-space boundary.
689
691{
692 return v.fY == fProjectedCenter.fY;
693}
694
695/** \class TEveRPhiProjection
696\ingroup TEve
697XY projection with distortion around given center.
698*/
699
701
702////////////////////////////////////////////////////////////////////////////////
703/// Constructor.
704
707{
708 fType = kPT_RPhi;
710 fName = "RhoPhi";
711}
712
713////////////////////////////////////////////////////////////////////////////////
714/// Project point.
715
717 Float_t d, EPProc_e proc)
718{
719 using namespace TMath;
720
721 if (fDisplaceOrigin)
722 {
723 x -= fCenter.fX;
724 y -= fCenter.fY;
725 z -= fCenter.fZ;
726 }
727
728 if (proc != kPP_Plane)
729 {
730 Float_t r, phi;
731 if (fUsePreScale)
732 {
733 r = Sqrt(x*x + y*y);
734 phi = (x == 0.0f && y == 0.0f) ? 0.0f : ATan2(y, x);
735 PreScalePoint(r, phi);
736 x = r*Cos(phi);
737 y = r*Sin(phi);
738 }
739
740 if (!fDisplaceOrigin)
741 {
742 x -= fCenter.fX;
743 y -= fCenter.fY;
744 }
745
746 r = Sqrt(x*x + y*y);
747 phi = (x == 0.0f && y == 0.0f) ? 0.0f : ATan2(y, x);
748
749 if (r > fFixR)
750 r = fFixR + fPastFixRScale*(r - fFixR);
751 else if (r < -fFixR)
752 r = -fFixR + fPastFixRScale*(r + fFixR);
753 else
754 r = r * fScaleR / (1.0f + r*fDistortion);
755
756 x = r*Cos(phi);
757 y = r*Sin(phi);
758
759 if (!fDisplaceOrigin)
760 {
761 x += fCenter.fX;
762 y += fCenter.fY;
763 }
764 }
765 z = d;
766}
767
768/** \class TEve3DProjection
769\ingroup TEve
7703D scaling projection. One has to use pre-scaling to make any ise of this.
771*/
772
774
775////////////////////////////////////////////////////////////////////////////////
776/// Constructor.
777
780{
781 fType = kPT_3D;
783 fName = "3D";
784}
785
786////////////////////////////////////////////////////////////////////////////////
787/// Project point.
788
790 Float_t /*d*/, EPProc_e proc)
791{
792 using namespace TMath;
793
794 if (proc != kPP_Plane)
795 {
796 if (fUsePreScale)
797 {
798 PreScalePoint(x, y, z);
799 }
800
801 x -= fCenter.fX;
802 y -= fCenter.fY;
803 z -= fCenter.fZ;
804 }
805}
SVector< double, 2 > v
Definition: Dict.h:5
PyObject * fType
ROOT::R::TRInterface & r
Definition: Object.C:4
#define d(i)
Definition: RSha256.hxx:102
int Int_t
Definition: RtypesCore.h:41
const Bool_t kFALSE
Definition: RtypesCore.h:88
bool Bool_t
Definition: RtypesCore.h:59
double Double_t
Definition: RtypesCore.h:55
float Float_t
Definition: RtypesCore.h:53
const Bool_t kTRUE
Definition: RtypesCore.h:87
#define ClassImp(name)
Definition: Rtypes.h:363
void Warning(const char *location, const char *msgfmt,...)
char * Form(const char *fmt,...)
3D scaling projection.
virtual void ProjectPoint(Float_t &x, Float_t &y, Float_t &z, Float_t d, EPProc_e proc=kPP_Full)
Project point.
TEve3DProjection()
Constructor.
Exception class thrown by TEve classes and macros.
Definition: TEveUtil.h:103
Base-class for non-linear projections.
virtual void SetCenter(TEveVector &v)
virtual void ProjectPoint(Float_t &x, Float_t &y, Float_t &z, Float_t d, EPProc_e p=kPP_Full)=0
static Float_t fgEpsSqr
void SetDistortion(Float_t d)
Set distortion.
static Float_t fgEps
Float_t GetLimit(Int_t i, Bool_t pos)
Method previously used by TEveProjectionAxesGL. Now obsolete.
void AddPreScaleEntry(Int_t coord, Float_t max_val, Float_t scale)
Add new scaling range for given coordinate.
virtual Float_t GetValForScreenPos(Int_t ax, Float_t value)
Inverse projection.
void SetPastFixRFac(Float_t x)
Set 2's-exponent for relative scaling beyond FixR.
virtual Float_t GetScreenVal(Int_t ax, Float_t value)
Project point on given axis and return projected value.
vPreScale_t fPreScales[3]
virtual void SetDirectionalVector(Int_t screenAxis, TEveVector &vec)
Get vector for axis in a projected space.
virtual void BisectBreakPoint(TEveVector &vL, TEveVector &vR, Float_t eps_sqr)
Find break-point on both sides of the discontinuity.
EGeoMode_e fGeoMode
void SetFixR(Float_t x)
Set fixed radius.
TEveVector GetOrthogonalCenter(int idx, TEveVector &out)
Get center ortogonal to given axis index.
Float_t fPastFixRScale
Float_t fPastFixZFac
void ProjectPointfv(Float_t *v, Float_t d)
Project float array.
void SetPastFixZFac(Float_t x)
Set 2's-exponent for relative scaling beyond FixZ.
void ChangePreScaleEntry(Int_t coord, Int_t entry, Float_t new_scale)
Change scale for given entry and coordinate.
TEveVector fCenter
void SetDisplaceOrigin(bool)
Set flag to displace for center.
std::vector< PreScaleEntry_t > vPreScale_t
void PreScalePoint(Float_t &x, Float_t &y)
Pre-scale point (x, y) in projected coordinates for 2D projections:
std::vector< PreScaleEntry_t >::iterator vPreScale_i
TEveProjection()
Constructor.
void ProjectVector(TEveVector &v, Float_t d)
Project TEveVector.
void ProjectPointdv(Double_t *v, Float_t d)
Project double array.
virtual Bool_t IsOnSubSpaceBoundrary(const TEveVector &) const
Float_t fPastFixRFac
Float_t fPastFixZScale
void SetFixZ(Float_t x)
Set fixed radius.
void ClearPreScales()
Clear all pre-scaling information.
void PreScaleVariable(Int_t dim, Float_t &v)
Pre-scale single variable with pre-scale entry dim.
virtual Bool_t AcceptSegment(TEveVector &, TEveVector &, Float_t) const
virtual Float_t * GetProjectedCenter()
Get projected center.
XY projection with distortion around given center.
TEveRPhiProjection()
Constructor.
virtual void ProjectPoint(Float_t &x, Float_t &y, Float_t &z, Float_t d, EPProc_e proc=kPP_Full)
Project point.
Transformation from 3D to 2D.
TEveVector fProjectedCenter
virtual Bool_t IsOnSubSpaceBoundrary(const TEveVector &v) const
Checks if point is on sub-space boundary.
virtual Bool_t AcceptSegment(TEveVector &v1, TEveVector &v2, Float_t tolerance) const
Check if segment of two projected points is valid.
virtual void SetDirectionalVector(Int_t screenAxis, TEveVector &vec)
Get direction in the unprojected space for axis index in the projected space.
TEveRhoZProjection()
Constructor.
virtual void SetCenter(TEveVector &v)
Set center of distortion (virtual method).
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 proc=kPP_Full)
Project point.
TEveTrans is a 4x4 transformation matrix for homogeneous coordinates stored internally in a column-ma...
Definition: TEveTrans.h:27
TVector3 Multiply(const TVector3 &v, Double_t w=1) const
Multiply vector and return it.
Definition: TEveTrans.cxx:761
void MultiplyIP(TVector3 &v, Double_t w=1) const
Multiply vector in-place.
Definition: TEveTrans.cxx:729
const TT * Arr() const
Definition: TEveVector.h:54
TEveVectorT & Mult(const TEveVectorT &a, TT af)
Definition: TEveVector.h:192
TT Dot(const TEveVectorT &a) const
Definition: TEveVector.h:164
void Set(const Float_t *v)
Definition: TEveVector.h:78
T Mag2(const SVector< T, D > &rhs)
Vector magnitude square Template to compute .
Definition: Functions.h:229
Double_t y[n]
Definition: legend1.C:17
Double_t x[n]
Definition: legend1.C:17
Double_t Sqrt(Double_t x)
TMath.
Definition: TMathBase.h:35
Double_t Log2(Double_t x)
Definition: TMath.cxx:101
T1 Sign(T1 a, T2 b)
Definition: TMathBase.h:165
Double_t ATan2(Double_t, Double_t)
Definition: TMath.h:667
Double_t Sqrt(Double_t x)
Definition: TMath.h:679
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
Definition: TMath.h:723
Int_t CeilNint(Double_t x)
Definition: TMath.h:687
Double_t Cos(Double_t)
Definition: TMath.h:629
Double_t Sin(Double_t)
Definition: TMath.h:625
Short_t Abs(Short_t d)
Definition: TMathBase.h:120
const char * cnt
Definition: TXMLSetup.cxx:74
auto * a
Definition: textangle.C:12