23#include <nlohmann/json.hpp> 
   38   typedef std::list<Seg_t>           
LSeg_t;
 
   53REvePolygonSetProjected::REvePolygonSetProjected(
const std::string &
n, 
const std::string &t) :
 
 
   75   j[
"fNPnts"] = 
fPnts.size();
 
 
   90   fRenderData = std::make_unique<REveRenderData>(
"makePolygonSetProjected", 3 * 
fPnts.size());
 
   96   std::vector<Double_t> 
verts;
 
   98   std::vector<UInt_t>    
polys;
 
  103      polys.emplace_back(
p.NPoints());
 
  107   for (
unsigned i = 0; i < 
fPnts.size(); ++i)
 
 
  157   if (!
fPnts.empty()) {
 
  159      for (
unsigned pi = 0; pi < 
fPnts.size(); ++pi)
 
 
  186   for (
unsigned i = 0; i < 
fPnts.size(); ++i)
 
 
  230   std::vector<UInt_t> 
idxMap;
 
 
  276   if (pp.size() <= 2) 
return 0;
 
  281      if (
fPnts[idx].fX < bbox[0]) bbox[0] = 
fPnts[idx].fX;
 
  282      if (
fPnts[idx].fX > bbox[1]) bbox[1] = 
fPnts[idx].fX;
 
  284      if (
fPnts[idx].fY < bbox[2]) bbox[2] = 
fPnts[idx].fY;
 
  285      if (
fPnts[idx].fY > bbox[3]) bbox[3] = 
fPnts[idx].fY;
 
  288   if ((bbox[1]-bbox[0]) < eps || (bbox[3]-bbox[2]) < eps) 
return 0;
 
  303         auto u = ++pp.begin();
 
  305         while (
u != pp.end())
 
  312         if (
u == pp.end()) 
return 0;
 
  318         while (
u != pp.begin())
 
  325         if (
u == pp.begin()) 
return 0;
 
  329   std::vector<UInt_t> 
pv(pp.size(), 0);
 
  331   for (
auto &&
u : pp) {
 
  335   pols.emplace_back(std::move(
pv));
 
  337   return (bbox[1]-bbox[0]) * (bbox[3]-bbox[2]);
 
 
  350      std::list<UInt_t> pp; 
 
  365      pp.emplace_back(head);
 
  381         if (tail != pp.back()) pp.push_back(tail);
 
  388         if (pp.front() == pp.back()) pp.pop_front();
 
 
  431   while (!
segs.empty())
 
  433      std::list<UInt_t> pp; 
 
  434      pp.push_back(
segs.front().fV1);
 
  438      while (match && ! 
segs.empty())
 
  444            if (
cv1 == tail || 
cv2 == tail)
 
  446               pp.emplace_back(tail);
 
  457         if (tail == pp.front())
 
 
  530      printf(
"Points of polygon %d [Np = %d]:\n", ++cnt, 
nPnts);
 
 
  549      printf(
"%d polygon of %d has %d segments \n", pi, 
fBuff->NbPols(), 
segN);
 
  557         printf(
"ORIG points :(%f, %f, %f)  (%f, %f, %f)\n",
 
 
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
 
winID h TVirtualViewer3D TVirtualGLPainter p
 
Option_t Option_t TPoint TPoint const char mode
 
virtual Int_t WriteCoreJson(nlohmann::json &cj, Int_t rnr_offset)
Write core json.
 
std::unique_ptr< REveRenderData > fRenderData
Externally assigned and controlled user data.
 
void SetProjection(REveProjectionManager *mng, REveProjectable *model) override
This is virtual method from base-class REveProjected.
 
virtual void DumpPolys() const
Dump information about built polygons.
 
Bool_t IsFirstIdxHead(Int_t s0, Int_t s1)
Compare the two segments and check if the first index of first segment is starting.
 
vpPolygon_t fPolsBS
! polygons build from TBuffer3D segments
 
void BuildRenderData() override
Crates representation for rendering.
 
void DumpBuffer3D()
Dump information about currently projected buffer.
 
void UpdateProjection() override
This is virtual method from base-class REveProjected.
 
std::list< Polygon_t > vpPolygon_t
 
vpPolygon_t fPolsBP
! polygons build from TBuffer3D polygons
 
std::vector< UInt_t > ProjectAndReducePoints()
Project and reduce buffer points.
 
vpPolygon_t fPols
! polygons
 
std::vector< REveVector > fPnts
! reduced and projected points
 
void ProjectBuffer3D()
Project current buffer.
 
Float_t PolygonSurfaceXY(const Polygon_t &poly) const
Calculate XY surface of a polygon.
 
void ComputeBBox() override
Override of virtual method from TAttBBox.
 
Float_t MakePolygonsFromBS(std::vector< UInt_t > &idxMap)
Build polygons from the set of buffer segments.
 
Int_t WriteCoreJson(nlohmann::json &j, Int_t rnr_offset) override
Fill core part of JSON representation.
 
void SetDepthLocal(Float_t d) override
Set depth (z-coordinate) of the projected points.
 
Float_t MakePolygonsFromBP(std::vector< UInt_t > &idxMap)
Build polygons from list of buffer polygons.
 
std::unique_ptr< TBuffer3D > fBuff
 
~REvePolygonSetProjected() override
Destructor.
 
Float_t AddPolygon(std::list< UInt_t > &pp, std::list< Polygon_t > &p)
Check if polygon has dimensions above REveProjection::fgEps and add it to a list if it is not a dupli...
 
virtual void SetProjection(REveProjectionManager *mng, REveProjectable *model)
Sets projection manager and reference in the projectable object.
 
void SetDepthCommon(Float_t d, REveElement *el, Float_t *bbox)
Utility function to update the z-values of the bounding-box.
 
REveProjectionManager * fManager
 
REveProjectionManager Manager class for steering of projections and managing projected objects.
 
REveProjection * GetProjection()
 
REveProjection Base for specific classes that implement non-linear projections.
 
EGeoMode_e GetGeoMode() const
 
void CopyVizParams(const REveElement *el) override
Copy visualization parameters from element el.
 
const_iterator begin() const
 
const_iterator end() const
 
void BBoxCheckPoint(Float_t x, Float_t y, Float_t z)
 
void BBoxZero(Float_t epsilon=0, Float_t x=0, Float_t y=0, Float_t z=0)
Create cube of volume (2*epsilon)^3 at (x,y,z).
 
void BBoxInit(Float_t infinity=1e6)
Dynamic Float_t[6] X(min,max), Y(min,max), Z(min,max)
 
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.