Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches

Detailed Description

Demonstrates usage of class TEveStraightLineSet.

#include "TRandom.h"
namespace REX = ROOT::Experimental;
{
TRandom r(0);
Float_t s = 100;
auto ls = new REX::REveStraightLineSet();
for (Int_t i = 0; i < nlines; i++) {
ls->AddLine(r.Uniform(-s, s), r.Uniform(-s, s), r.Uniform(-s, s), r.Uniform(-s, s), r.Uniform(-s, s),
r.Uniform(-s, s));
// add random number of markers
Int_t nm = 1 + Int_t(nmarkers * r.Rndm());
for (Int_t m = 0; m < nm; m++)
ls->AddMarker(i, r.Rndm());
}
ls->SetMarkerSize(5);
ls->SetMarkerStyle(1);
ls->SetAlwaysSecSelect(sc);
return ls;
}
void lineset(bool secondarySelect = true)
{
auto eveMng = REX::REveManager::Create();
// eveMng->AllowMultipleRemoteConnections(false, false);
auto ls1 = makeLineSet(50, 10, secondarySelect);
ls1->SetLineWidth(2);
ls1->SetMarkerSize(8);
ls1->SetMainColor(kViolet);
ls1->SetMarkerColor(kMagenta);
ls1->SetName("LineSet Violet");
auto ls2 = makeLineSet(10, 10, secondarySelect);
ls2->SetLineWidth(2);
ls2->SetMarkerSize(8);
ls2->SetMainColor(kBlue);
ls2->SetMarkerColor(kCyan + 2);
ls2->SetName("LineSet Blue");
ls2->InitMainTrans();
ls2->RefMainTrans().Move3LF(40, 200, 200);
eveMng->Show();
}
int Int_t
Signed integer 4 bytes (int)
Definition RtypesCore.h:60
float Float_t
Float 4 bytes (float)
Definition RtypesCore.h:72
@ kMagenta
Definition Rtypes.h:67
@ kCyan
Definition Rtypes.h:67
@ kBlue
Definition Rtypes.h:67
@ kViolet
Definition Rtypes.h:68
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
virtual void AddElement(REveElement *el)
Add el to the list of children.
REveScene * GetEventScene() const
REveStraightLineSet Set of straight lines with optional markers along the lines.
This is the base class for the ROOT Random number generators.
Definition TRandom.h:28
Namespace for ROOT features in testing.
Definition TROOT.h:100
R__EXTERN REveManager * gEve
TMarker m
Definition textangle.C:8
Author
Matevz Tadel

Definition in file lineset.C.