94 out << t <<
"SetFillColor(" <<
fFillColor <<
");\n";
95 out << t <<
"SetLineColor(" <<
fLineColor <<
");\n";
96 out << t <<
"SetLineWidth(" <<
fLineWidth <<
");\n";
123 for (
Int_t i = 1; i <
N; ++i)
125 if (pin[i].fY < pin[min_point].fY || (pin[i].fY == pin[min_point].fY && pin[i].fX < pin[min_point].fX))
130 std::vector<Float_t> angles(N);
131 for (
Int_t i = 0; i <
N; ++i)
133 angles[i] = (pin[i] - pin[min_point]).Phi();
135 std::vector<Int_t> idcs(N);
142 std::vector<Int_t> new_idcs;
143 new_idcs.push_back(idcs[0]);
144 std::vector<Int_t>::iterator
a,
b;
145 a = idcs.begin(); ++
a;
147 while (b != idcs.end())
151 if (pin[idcs[0]].SquareDistance(pin[*a]) < pin[idcs[0]].SquareDistance(pin[*b]))
156 new_idcs.push_back(*a);
161 new_idcs.push_back(*a);
168 std::vector<Int_t> hull;
171 hull.push_back(idcs[0]);
172 hull.push_back(idcs[1]);
173 hull.push_back(idcs[2]);
178 Int_t n = hull.size() - 1;
179 if ((pin[hull[n]] - pin[hull[n-1]]).
Cross(pin[idcs[i]] - pin[hull[n]]) > 0)
181 hull.push_back(idcs[i]);
193 ::Warning(
"TEveShape::FindConvexHull()",
"Polygon reduced to %d points. for '%s'.",
200 Int_t Nold = pout.size();
201 pout.resize(Nold + N);
202 for (
Int_t i = 0; i <
N; ++i)
204 pout[Nold + i] = pin[hull[i]];
Abstract base-class for 2D/3D shapes.
std::vector< TEveVector2 > vVector2_t
void swap(TDirectoryEntry &e1, TDirectoryEntry &e2) noexcept
TT Dot(const TEveVectorT &a) const
virtual void PaintStandard(TObject *id)
Paint object – a generic implementation for EVE elements.
TEveVectorT Cross(const TEveVectorT &a) const
virtual void CopyVizParams(const TEveElement *el)
Copy visualization parameters from element el.
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
static const char * ToString(Bool_t b)
Convert Bool_t to string - kTRUE or kFALSE.
void SetMainColorPtr(Color_t *color)
static void CheckAndFixBoxOrientationFv(Float_t box[8][3])
Make sure box orientation is consistent with standard arrangement.
Bool_t fCanEditMainTransparency
void Sort(Index n, const Element *a, Index *index, Bool_t down=kTRUE)
Sort the n elements of the array a of generic templated type Element.
virtual void WriteVizParams(std::ostream &out, const TString &var)
Write visualization parameters.
virtual void SetMainColor(Color_t color)
Set main color.
virtual ~TEveShape()
Destructor.
virtual void Paint(Option_t *option="")
Paint this object. Only direct rendering is supported.
static Bool_t IsBoxOrientationConsistentFv(const Float_t box[8][3])
Checks if the first face normal is pointing into the other direction as the vector pointing towards t...
virtual void SetMainColor(Color_t color)
Set main color of the element.
virtual const char * GetElementName() const
Virtual function for retrieving name of the element.
TEveShape(const TEveShape &)
virtual void CopyVizParams(const TEveElement *el)
Copy visualization parameters from element el.
you should not use this method at all Int_t Int_t Double_t Double_t Double_t e
virtual void WriteVizParams(std::ostream &out, const TString &var)
Write-out visual parameters for this object.
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
TGLVector3 Cross(const TGLVector3 &v1, const TGLVector3 &v2)
static Int_t FindConvexHull(const vVector2_t &pin, vVector2_t &pout, TEveElement *caller=0)
Determines the convex-hull of points in pin.
static Bool_t IsBoxOrientationConsistentEv(const TEveVector box[8])
Checks if the first face normal is pointing into the other direction as the vector pointing towards t...
static void CheckAndFixBoxOrientationEv(TEveVector box[8])
Make sure box orientation is consistent with standard arrangement.
Base class for TEveUtil visualization elements, providing hierarchy management, rendering control and...
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.