14#include <nlohmann/json.hpp>
33REveShape::REveShape(
const std::string &
n,
const std::string &t) :
106 out << t <<
"SetFillColor(" <<
fFillColor <<
");\n";
107 out << t <<
"SetLineColor(" <<
fLineColor <<
");\n";
108 out << t <<
"SetLineWidth(" <<
fLineWidth <<
");\n";
127 for (
Int_t i = 1; i <
N; ++i)
134 std::vector<Float_t>
angles(
N);
135 for (
Int_t i = 0; i <
N; ++i)
139 std::vector<Int_t>
idcs(
N);
171 std::vector<Int_t>
hull;
196 ::Warning(
"REveShape::FindConvexHull()",
"Polygon reduced to %d points. for '%s'.",
205 for (
Int_t i = 0; i <
N; ++i)
231 return up.Dot(
f1.Cross(f2)) < 0;
246 return up.Dot(
f1.Cross(f2)) < 0;
256 std::swap(
box[1],
box[3]);
257 std::swap(
box[5],
box[7]);
268 std::swap(
box[1][0],
box[3][0]);
269 std::swap(
box[1][1],
box[3][1]);
270 std::swap(
box[1][2],
box[3][2]);
271 std::swap(
box[5][0],
box[7][0]);
272 std::swap(
box[5][1],
box[7][1]);
273 std::swap(
box[5][2],
box[7][2]);
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
void Warning(const char *location, const char *msgfmt,...)
Use this function in warning situations.
TGLVector3 Cross(const TGLVector3 &v1, const TGLVector3 &v2)
void SetMainColorPtr(Color_t *colptr)
Bool_t fCanEditMainTransparency
virtual Int_t WriteCoreJson(nlohmann::json &cj, Int_t rnr_offset)
Write core json.
virtual void WriteVizParams(std::ostream &out, const TString &var)
Write-out visual parameters for this object.
static const std::string & ToString(Bool_t b)
Convert Bool_t to string - kTRUE or kFALSE.
virtual void CopyVizParams(const REveElement *el)
Copy visualization parameters from element el.
virtual void SetMainColor(Color_t color)
Set main color of the element.
void WriteVizParams(std::ostream &out, const TString &var) override
Write visualization parameters.
static Int_t FindConvexHull(const vVector2_t &pin, vVector2_t &pout, REveElement *caller=nullptr)
Determines the convex-hull of points in pin.
void CopyVizParams(const REveElement *el) override
Copy visualization parameters from element el.
std::vector< REveVector2 > vVector2_t
static void CheckAndFixBoxOrientationFv(Float_t box[8][3])
Make sure box orientation is consistent with standard arrangement.
static Bool_t IsBoxOrientationConsistentEv(const REveVector box[8])
Checks if the first face normal is pointing into the other direction as the vector pointing towards t...
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...
Int_t WriteCoreJson(nlohmann::json &j, Int_t rnr_offset) override
Fill core part of JSON representation.
static void CheckAndFixBoxOrientationEv(REveVector box[8])
Make sure box orientation is consistent with standard arrangement.
~REveShape() override
Destructor.
void SetMainColor(Color_t color) override
Set main color.
const_iterator begin() const
const_iterator end() const
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)
Sort the n elements of the array a of generic templated type Element.
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.