class TPolyLine3D: public TObject, public TAttLine, public TAtt3D

 PolyLine3D is a 3-dimensional polyline. It has 4 different constructors.

   First one, without any parameters TPolyLine3D(), we call 'default
 constructor' and it's used in a case that just an initialisation is
 needed (i.e. pointer declaration).

       Example:
                 TPolyLine3D *pl1 = new TPolyLine3D;


   Second one is 'normal constructor' with, usually, one parameter
 n (number of points), and it just allocates a space for the points.

       Example:
                 TPolyLine3D pl1(150);


   Third one allocates a space for the points, and also makes
 initialisation from the given array.

       Example:
                 TPolyLine3D pl1(150, pointerToAnArray);


   Fourth one is, almost, similar to the constructor above, except
 initialisation is provided with three independent arrays (array of
 x coordinates, y coordinates and z coordinates).

       Example:
                 TPolyLine3D pl1(150, xArray, yArray, zArray);

 Example:
   void pl3() {
      TCanvas *c1 = new TCanvas("c1");
      TView *view = TView::CreateView(1);
      view->SetRange(0,0,0,2,2,2);
      const Int_t n = 100;
      TPolyLine3D *l = new TPolyLine3D(n);
      for (Int_t i=0;i<n;i++) {
         Double_t x = 2*gRandom->Rndm();
         Double_t y = 2*gRandom->Rndm();
         Double_t z = 2*gRandom->Rndm();
         l->SetPoint(i,x,y,z);
      }
      l->Draw();
   }

Function Members (Methods)

public:
TPolyLine3D()
TPolyLine3D(const TPolyLine3D& polylin)
TPolyLine3D(Int_t n, Option_t* option = "")
TPolyLine3D(Int_t n, Float_t* p, Option_t* option = "")
TPolyLine3D(Int_t n, Double_t* p, Option_t* option = "")
TPolyLine3D(Int_t n, Float_t* x, Float_t* y, Float_t* z, Option_t* option = "")
TPolyLine3D(Int_t n, Double_t* x, Double_t* y, Double_t* z, Option_t* option = "")
virtual~TPolyLine3D()
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTObject::Clear(Option_t* = "")
virtual TObject*TObject::Clone(const char* newname = "") const
virtual Int_tTObject::Compare(const TObject* obj) const
virtual voidCopy(TObject& polyline) const
virtual voidTObject::Delete(Option_t* option = "")MENU
Int_tTAttLine::DistancetoLine(Int_t px, Int_t py, Double_t xp1, Double_t yp1, Double_t xp2, Double_t yp2)
virtual Int_tDistancetoPrimitive(Int_t px, Int_t py)
virtual voidDraw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
static voidDrawOutlineCube(TList* outline, Double_t* rmin, Double_t* rmax)
virtual voidDrawPolyLine(Int_t n, Float_t* p, Option_t* option = "")
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
Int_tGetLastPoint() const
virtual Color_tTAttLine::GetLineColor() const
virtual Style_tTAttLine::GetLineStyle() const
virtual Width_tTAttLine::GetLineWidth() const
Int_tGetN() const
virtual const char*TObject::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*GetOption() const
Float_t*GetP() const
virtual const char*TObject::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTObject::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTObject::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Int_tMerge(TCollection* list)
virtual voidTAttLine::Modify()
virtual Bool_tTObject::Notify()
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
TPolyLine3D&operator=(const TPolyLine3D& polylin)
virtual voidPaint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidPrint(Option_t* option = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
virtual voidTAttLine::ResetAttLine(Option_t* option = "")
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTAttLine::SaveLineAttributes(ostream& out, const char* name, Int_t coldef = 1, Int_t stydef = 1, Int_t widdef = 1)
virtual voidSavePrimitive(ostream& out, Option_t* option = "")
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
virtual voidTAttLine::SetLineAttributes()MENU
virtual voidTAttLine::SetLineColor(Color_t lcolor)
virtual voidTAttLine::SetLineStyle(Style_t lstyle)
virtual voidTAttLine::SetLineWidth(Width_t lwidth)
virtual Int_tSetNextPoint(Double_t x, Double_t y, Double_t z)MENU
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidSetOption(Option_t* option = "")
virtual voidSetPoint(Int_t point, Double_t x, Double_t y, Double_t z)MENU
virtual voidSetPolyLine(Int_t n, Option_t* option = "")
virtual voidSetPolyLine(Int_t n, Float_t* p, Option_t* option = "")
virtual voidSetPolyLine(Int_t n, Double_t* p, Option_t* option = "")
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual Int_tSize() const
virtual voidTAtt3D::Sizeof3D() const
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()

Data Members

public:
enum TObject::EStatusBits { kCanDelete
kMustCleanup
kObjInCanvas
kIsReferenced
kHasUUID
kCannotPick
kNoContextMenu
kInvalidObject
};
enum TObject::[unnamed] { kIsOnHeap
kNotDeleted
kZombie
kBitMask
kSingleKey
kOverwrite
kWriteDelete
};
protected:
UInt_tfGLList!The list number for OpenGL view
Int_tfLastPointThe index of the last filled point
Color_tTAttLine::fLineColorline color
Style_tTAttLine::fLineStyleline style
Width_tTAttLine::fLineWidthline width
Int_tfNNumber of points
TStringfOptionoptions
Float_t*fP[3*fN] Array of 3-D coordinates (x,y,z)

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TPolyLine3D(const TPolyLine3D& polylin)
 3-D polyline default constructor.
TPolyLine3D(Int_t n, Option_t* option = "")
 3-D polyline normal constructor with initialization to 0.
 If n < 0 the default size (2 points) is set.
TPolyLine3D(Int_t n, Float_t *p, Option_t *option)
 3-D polyline normal constructor. Polyline is intialized with p.
 If n < 0 the default size (2 points) is set.
TPolyLine3D(Int_t n, Double_t *p, Option_t *option)
 3-D polyline normal constructor. Polyline is initialized with p
 (cast to float). If n < 0 the default size (2 points) is set.
TPolyLine3D(Int_t n, Float_t *x, Float_t *y, Float_t *z, Option_t *option)
 3-D polyline normal constructor. Polyline is initialized withe the
 x, y ,z arrays. If n < 0 the default size (2 points) is set.
TPolyLine3D(Int_t n, Double_t *x, Double_t *y, Double_t *z, Option_t *option)
 3-D polyline normal constructor. Polyline is initialized withe the
 x, y, z arrays (which are cast to float).
 If n < 0 the default size (2 points) is set.
TPolyLine3D& operator=(const TPolyLine3D& polylin)
assignement operator
~TPolyLine3D()
 3-D polyline destructor.
TPolyLine3D(const TPolyLine3D& polylin)
 3-D polyline copy ctor.
void Copy(TObject& polyline) const
 Copy polyline to polyline obj.
Int_t DistancetoPrimitive(Int_t px, Int_t py)
 Compute distance from point px,py to a 3-D polyline.
 Compute the closest distance of approach from point px,py to each segment
 of the polyline.
 Returns when the distance found is below DistanceMaximum.
 The distance is computed in pixels units.
void Draw(Option_t* option = "")
 Draw this 3-D polyline with its current attributes.
void DrawOutlineCube(TList* outline, Double_t* rmin, Double_t* rmax)
 Draw cube outline with 3d polylines.

      xmin = fRmin[0]        xmax = fRmax[0]
      ymin = fRmin[1]        ymax = fRmax[1]
      zmin = fRmin[2]        zmax = fRmax[2]


    (xmin,ymax,zmax) +---------+ (xmax,ymax,zmax)
                    /         /|
                   /         / |
                  /         /  |
(xmin,ymin,zmax) +---------+   |
                 |         |   + (xmax,ymax,zmin)


                 |         |
                 +---------+
  (xmin,ymin,zmin)         (xmax,ymin,zmin)

void DrawPolyLine(Int_t n, Float_t* p, Option_t* option = "")
 Draw 3-D polyline with new coordinates. Creates a new polyline which
 will be adopted by the pad in which it is drawn. Does not change the
 original polyline (should be static method).
void ExecuteEvent(Int_t event, Int_t px, Int_t py)
 Execute action corresponding to one event.
void ls(Option_t* option = "") const
 List this 3-D polyline.
Int_t Merge(TCollection* list)
 Merge polylines in the collection in this polyline
void Paint(Option_t* option = "")
 Paint a TPolyLine3D.
void Print(Option_t* option = "") const
 Dump this 3-D polyline with its attributes on stdout.
void SavePrimitive(ostream& out, Option_t* option = "")
 Save primitive as a C++ statement(s) on output stream.
Int_t SetNextPoint(Double_t x, Double_t y, Double_t z)
 Set point following LastPoint to x, y, z.
 Returns index of the point (new last point).
void SetPoint(Int_t point, Double_t x, Double_t y, Double_t z)
 Set point n to x, y, z.
 If n is more then the current TPolyLine3D size (n > fN) then
 the polyline will be resized to contain at least n points.
void SetPolyLine(Int_t n, Option_t* option = "")
 Re-initialize polyline with n points (0,0,0).
 if n <= 0 the current array of points is deleted.
void SetPolyLine(Int_t n, Float_t *p, Option_t *option)
 Re-initialize polyline with n points from p. If p=0 initialize with 0.
 if n <= 0 the current array of points is deleted.
void SetPolyLine(Int_t n, Double_t *p, Option_t *option)
 Re-initialize polyline with n points from p. If p=0 initialize with 0.
 if n <= 0 the current array of points is deleted.
void Streamer(TBuffer& b)
 Stream a 3-D polyline object.
Int_t GetLastPoint()
{return fLastPoint;}
Int_t GetN()
{return fN;}
Float_t * GetP()
{return fP;}
Option_t * GetOption()
{return fOption.Data();}
void SetOption(Option_t* option = "")
{fOption = option;}
Int_t Size()
{ return fLastPoint+1;}

Author: Nenad Buncic 17/08/95
Last change: root/g3d:$Id: TPolyLine3D.h 20882 2007-11-19 11:31:26Z rdm $
Last generated: 2008-06-25 08:50
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *

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.