// @(#)root/eve:$Id: lineset_test.C 26876 2008-12-12 14:45:40Z matevz $
// Author: Matevz Tadel

// Demonstrates usage of class TEveStraightLineSet.

TEveStraightLineSet* lineset_test(Int_t nlines = 40, Int_t nmarkers = 4) 
{
   TEveManager::Create();

   TRandom r(0);
   Float_t s = 100;

   TEveStraightLineSet* ls = new TEveStraightLineSet();

   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 = Int_t(nmarkers* r.Rndm());
      for(Int_t m = 0; m < nm; m++) {
         ls->AddMarker(i, r.Rndm());
      }
   }

   ls->SetMarkerSize(1.5);
   ls->SetMarkerStyle(4);

   gEve->AddElement(ls);
   gEve->Redraw3D();

   return ls;
}
thumb

Last change: Wed Dec 17 10:56:27 2008
Last generated: 2008-12-17 10:56

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.