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]];
228 return up.
Dot(
f1.Cross(f2)) < 0;
243 return up.
Dot(
f1.Cross(f2)) < 0;
253 std::swap(
box[1],
box[3]);
254 std::swap(
box[5],
box[7]);
265 std::swap(
box[1][0],
box[3][0]);
266 std::swap(
box[1][1],
box[3][1]);
267 std::swap(
box[1][2],
box[3][2]);
268 std::swap(
box[5][0],
box[7][0]);
269 std::swap(
box[5][1],
box[7][1]);
270 std::swap(
box[5][2],
box[7][2]);
TGLVector3 Cross(const TGLVector3 &v1, const TGLVector3 &v2)
Base class for TEveUtil visualization elements, providing hierarchy management, rendering control and...
Bool_t fCanEditMainTransparency
virtual void SetMainColor(Color_t color)
Set main color of the element.
void SetMainColorPtr(Color_t *color)
virtual const char * GetElementName() const
Virtual function for retrieving name of the element.
virtual void CopyVizParams(const TEveElement *el)
Copy visualization parameters from element el.
static const char * ToString(Bool_t b)
Convert Bool_t to string - kTRUE or kFALSE.
virtual void WriteVizParams(std::ostream &out, const TString &var)
Write-out visual parameters for this object.
virtual void PaintStandard(TObject *id)
Paint object – a generic implementation for EVE elements.
Abstract base-class for 2D/3D shapes.
static Int_t FindConvexHull(const vVector2_t &pin, vVector2_t &pout, TEveElement *caller=0)
Determines the convex-hull of points in pin.
TEveShape(const TEveShape &)=delete
virtual void CopyVizParams(const TEveElement *el)
Copy visualization parameters from element el.
virtual void WriteVizParams(std::ostream &out, const TString &var)
Write visualization parameters.
static void CheckAndFixBoxOrientationFv(Float_t box[8][3])
Make sure box orientation is consistent with standard arrangement.
virtual ~TEveShape()
Destructor.
static void CheckAndFixBoxOrientationEv(TEveVector box[8])
Make sure box orientation is consistent with standard arrangement.
virtual void SetMainColor(Color_t color)
Set main color.
std::vector< TEveVector2 > vVector2_t
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...
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...
TT Dot(const TEveVectorT &a) const
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
void Sort(Index n, const Element *a, Index *index, Bool_t down=kTRUE)