22#include <nlohmann/json.hpp>
46REvePointSet::REvePointSet(
const std::string&
name,
const std::string& title,
Int_t n_points) :
115 assert(n_points >= 0);
118 Int_t new_size = old_size + n_points;
156 pt->SetMarkerStyle(mstyle);
173 pt->SetMarkerSize(msize);
189 TAttMarker::operator=(*
m);
210 return TClass::GetClass<REvePointSetProjected>();
243 for (
int i = 0; i <
fSize; ++i) {
308 const std::string& title) :
311 fBins(nullptr), fDefPointSetCapacity(128), fNBins(0), fLastBin(-1),
312 fMin(0), fCurMin(0), fMax(0), fCurMax(0),
335 if (
fBins[i] == el) {
400 const Int_t min = under ? 0 : 1;
402 for (
Int_t i = min; i < max; ++i)
418 static const REveException eh(
"REvePointSetArray::InitBins ");
420 if (nbins < 1)
throw eh +
"nbins < 1.";
421 if (min > max)
throw eh +
"min > max.";
508 using namespace TMath;
557 for (
Int_t i = 0; i <
n; ++i,
p+=3)
584 for (
Int_t i = 0; i <
n; ++i, o+=3,
p+=3)
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
winID h TVirtualViewer3D TVirtualGLPainter p
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
void SetMainColorPtr(Color_t *colptr)
virtual Int_t WriteCoreJson(nlohmann::json &cj, Int_t rnr_offset)
Write core json.
virtual void AddElement(REveElement *el)
Add el to the list of children.
virtual void WriteVizParams(std::ostream &out, const TString &var)
Write-out visual parameters for this object.
void SetTitle(const std::string &title)
Set title of an element.
std::unique_ptr< REveRenderData > fRenderData
Externally assigned and controlled user data.
virtual REveTrans * PtrMainTrans(Bool_t create=kTRUE)
Return pointer to main transformation.
virtual Bool_t SetRnrSelf(Bool_t rnr)
Set render state of this element, i.e.
virtual void CopyVizParams(const REveElement *el)
Copy visualization parameters from element el.
virtual void RemoveElements()
Remove all elements.
void SetName(const std::string &name)
Set name of an element.
REveException Exception-type thrown by Eve classes.
Double_t fMin
Index of the last filled REvePointSet.
void CloseBins()
Call this after all the points have been filled.
void SetMarkerSize(Size_t msize=1) override
Set marker size, propagate to children.
REvePointSetArray(const REvePointSetArray &)=delete
void SetMarkerColor(Color_t tcolor=1) override
Set marker color, propagate to children.
void RemoveElementsLocal() override
Virtual from REveElement, provide bin management.
void InitBins(const std::string &quant_name, Int_t nbins, Double_t min, Double_t max)
Initialize internal point-sets with given binning parameters.
Bool_t Fill(Double_t x, Double_t y, Double_t z, Double_t quant)
Add a new point.
~REvePointSetArray() override
Destructor: deletes the fBins array.
Int_t fDefPointSetCapacity
void SetRange(Double_t min, Double_t max)
Set active range of the separating quantity.
void RemoveElementLocal(REveElement *el) override
Virtual from REveElement, provide bin management.
void SetMarkerStyle(Style_t mstyle=1) override
Set marker style, propagate to children.
Int_t Size(Bool_t under=kFALSE, Bool_t over=kFALSE) const
Get the total number of filled points.
void PointSelected(Int_t id)
Virtual method of base class TPointSet3D.
void SetProjection(REveProjectionManager *proj, REveProjectable *model) override
Set projection manager and projection model.
REvePointSetProjected()
Default contructor.
void UpdateProjection() override
Re-apply the projection.
void SetDepthLocal(Float_t d) override
Set depth (z-coordinate) of the projected points.
void PointSelected(Int_t id)
Virtual method of base class TPointSet3D.
virtual void ClonePoints(const REvePointSet &e)
Clone points and all point-related information from point-set 'e'.
void WriteVizParams(std::ostream &out, const TString &var) override
Write visualization parameters.
~REvePointSet() override
Destructor.
REveVector & RefPoint(int n)
void SetMarkerColor(Color_t col) override
Set the marker color.
Int_t WriteCoreJson(nlohmann::json &j, Int_t rnr_offset) override
Write core json.
void ComputeBBox() override
Compute bounding box.
void SetMarkerSize(Size_t msize=1) override
Set marker size, propagate to projecteds.
void CopyVizParams(const REveElement *el) override
Copy visualization parameters from element el.
REvePointSet(const std::string &name="", const std::string &title="", Int_t n_points=0)
Constructor.
std::vector< REveVector > fPoints
int SetPoint(int n, float x, float y, float z)
int SetNextPoint(float x, float y, float z)
void Reset(Int_t n_points=0)
Drop all data and set-up the data structures to recive new data.
void SetMarkerStyle(Style_t mstyle=1) override
Set marker style, propagate to projecteds.
void BuildRenderData() override
Crates 3D point array for rendering.
TClass * ProjectedClass(const REveProjection *p) const override
Virtual from REveProjectable, returns REvePointSetProjected class.
Int_t GrowFor(Int_t n_points)
Resizes internal array to allow additional n_points to be stored.
ProjList_t fProjectedList
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.
REveProjectable * fProjectable
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.
void ProjectPointfv(Float_t *v, Float_t d)
Project float array.
static void CalcTextureSize(int nel, int align, int &sx, int &sy)
Calculate texture dimensions to hold nel elements with given alignment on x axis.
Bool_t GetAlwaysSecSelect() const
Helper for management of bounding-box information.
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)
virtual void SaveMarkerAttributes(std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1, Int_t sizdef=1)
Save line attributes as C++ statement(s) on output stream out.
virtual Style_t GetMarkerStyle() const
Return the marker style.
virtual void SetMarkerColor(Color_t mcolor=1)
Set the marker color.
virtual Color_t GetMarkerColor() const
Return the marker color.
Color_t fMarkerColor
Marker color.
virtual Size_t GetMarkerSize() const
Return the marker size.
virtual void SetMarkerStyle(Style_t mstyle=1)
Set the marker style.
virtual void SetMarkerSize(Size_t msize=1)
Set the marker size.
Size_t fMarkerSize
Marker size.
Style_t fMarkerStyle
Marker style.
TClass instances represent classes, structs and namespaces in the ROOT type system.
R__EXTERN REveManager * gEve
Int_t FloorNint(Double_t x)
Returns the nearest integer of TMath::Floor(x).