File indexing completed on 2025-01-30 09:18:09
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #include "TEveManager.h"
0013 #include <iostream>
0014 #include "TEveStraightLineSet.h"
0015 #include "TRandom.h"
0016
0017 TEveStraightLineSet* lineset(Int_t nlines = 40, Int_t nmarkers = 4) ;
0018
0019 void next_event(){
0020
0021
0022
0023 std::cout << " next_event called - nothing to do ... " << std::endl ;
0024
0025 TEveElementList* tevent = (TEveElementList* ) gEve->GetCurrentEvent() ;
0026
0027 if( tevent )
0028 tevent->DestroyElements() ;
0029
0030
0031
0032
0033 gEve->Redraw3D();
0034
0035
0036 }
0037
0038
0039
0040 TEveStraightLineSet* lineset(Int_t nlines, Int_t nmarkers )
0041 {
0042 TEveManager::Create();
0043
0044 TRandom r(0);
0045 Float_t s = 100;
0046
0047 TEveStraightLineSet* ls = new TEveStraightLineSet();
0048
0049 for(Int_t i = 0; i<nlines; i++)
0050 {
0051 ls->AddLine( r.Uniform(-s,s), r.Uniform(-s,s), r.Uniform(-s,s),
0052 r.Uniform(-s,s), r.Uniform(-s,s), r.Uniform(-s,s));
0053
0054 Int_t nm = Int_t(nmarkers* r.Rndm());
0055 for(Int_t m = 0; m < nm; m++) {
0056 ls->AddMarker(i, r.Rndm());
0057 }
0058 }
0059
0060 ls->SetMarkerSize(1.5);
0061 ls->SetMarkerStyle(4);
0062
0063 gEve->AddElement(ls);
0064 gEve->Redraw3D();
0065
0066 return ls;
0067 }
0068