TPolyLine3D
class description - source file - inheritance tree
public:
TPolyLine3D TPolyLine3D(Int_t n, Option_t* option)
TPolyLine3D TPolyLine3D(Int_t n, Float_t* p, Option_t* option)
TPolyLine3D TPolyLine3D()
TPolyLine3D TPolyLine3D(Int_t n, Float_t* x, Float_t* y, Float_t* z, Option_t* option)
TPolyLine3D TPolyLine3D(const TPolyLine3D& polylin)
virtual void ~TPolyLine3D()
TClass* Class()
virtual void Copy(TObject& polyline)
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
virtual void Draw(Option_t* option)
void DrawOutlineCube(TList* outline, Float_t* rmin, Float_t* rmax)
virtual void DrawPolyLine(Int_t n, Float_t* p, Option_t* option)
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Int_t GetLastPoint()
Int_t GetN()
virtual Option_t* GetOption() const
Float_t* GetP()
virtual TClass* IsA() const
virtual void ls(Option_t* option)
virtual void Paint(Option_t* option)
virtual void PaintPolyLine(Int_t n, Float_t* p, Option_t* option)
virtual void Print(Option_t* option)
virtual void SavePrimitive(ofstream& out, Option_t* option)
virtual Int_t SetNextPoint(Float_t x, Float_t y, Float_t z)
virtual void SetOption(Option_t* option)
virtual void SetPoint(Int_t point, Float_t x, Float_t y, Float_t z)
virtual void SetPolyLine(Int_t n, Float_t* p = 0, Option_t* option)
virtual void ShowMembers(TMemberInspector& insp, char* parent)
virtual Int_t Size() const
virtual void Sizeof3D() const
virtual void Streamer(TBuffer& b)
protected:
Int_t fN Number of points
Float_t* fP Array of 3-D coordinates (x,y,z)
TString fOption options
UInt_t fGLList The list number for OpenGL view
Int_t fLastPoint The index of the last filled point
See also
-
THelix
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);
TPolyLine3D()
*-*-*-*-*-*-*-*-*-*-*-*-*3-D PolyLine default constructor*-*-*-*-*-*-*-*-*-*-*
*-* ================================
TPolyLine3D(Int_t n, Option_t *option)
*-*-*-*-*-*3-D PolyLine normal constructor without initialisation*-*-*-*-*-*-*
*-* ======================================================
*-* 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*-*-*-*-*-*-*-*-*-*-*-*
*-* ===============================
*-* 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*-*-*-*-*-*-*-*-*-*-*-*
*-* ===============================
*-* If n < 0 the default size (2 points) is set
*-*
~TPolyLine3D()
*-*-*-*-*-*-*-*-*-*-*-*-*3-D PolyLine default destructor*-*-*-*-*-*-*-*-*-*-*-*
*-* ===============================
TPolyLine3D(const TPolyLine3D &polyline)
void Copy(TObject &obj)
*-*-*-*-*-*-*-*-*-*-*-*-*Copy this polyline to polyline*-*-*-*-*-*-*-*-*-*-*-*
*-* ==============================
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, Float_t *rmin, Float_t *rmax)
*-*-*-*-*-*-*-*Draw cube outline with 3d polylines*-*-*-*-*-*-*
*-* ===================================
*-* *
*-* x = fRmin[0] X = fRmax[0] *
*-* y = fRmin[1] Y = fRmax[1] *
*-* z = fRmin[2] Z = fRmax[2] *
*-* *
*-* *
*-* (x,Y,Z) +---------+ (X,Y,Z) *
*-* / /| *
*-* / / | *
*-* / / | *
*-* (x,y,Z) +---------+ | *
*-* | | + (X,Y,z) *
*-* | | / *
*-* | | / *
*-* | |/ *
*-* +---------+ *
*-* (x,y,z) (X,y,z) *
*-* *
*-* *
*-* *
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**
void DrawPolyLine(Int_t n, Float_t *p, Option_t *option)
*-*-*-*-*-*-*-*-*Draw this 3-D polyline with new coordinates*-*-*-*-*-*-*-*-*-*
*-* ============================================
void ExecuteEvent(Int_t event, Int_t px, Int_t py)
*-*-*-*-*-*-*-*-*-*Execute action corresponding to one event*-*-*-*-*-*-*-*-*-*
*-* =========================================
void ls(Option_t *option)
*-*-*-*-*-*-*-*-*-*List this 3-D polyline with its attributes*-*-*-*-*-*-*
*-* ==========================================
void Paint(Option_t *option)
*-*-*-*-*-*-*-*-*Paint this 3-D polyline with its current attributes*-*-*-*-*
*-* ===================================================
*-*
*-* Option could be 'x3d', and it means that output
*-* will be performed by X3D package.
*-*
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
void PaintPolyLine(Int_t n, Float_t *p, Option_t *)
*-*-*-*-*-*-*-*-*Draw this 3-D polyline with new coordinates*-*-*-*-*-*-*-*-*-*
*-* ===========================================
void Print(Option_t *option)
*-*-*-*-*-*-*-*-*-*Dump this 3-D polyline with its attributes*-*-*-*-*-*-*-*-*
*-* ==========================================
void SavePrimitive(ofstream &out, Option_t *)
Save primitive as a C++ statement(s) on output stream out
Int_t SetNextPoint(Float_t x, Float_t y, Float_t z)
Set point following LastPoint
void SetPoint(Int_t n, Float_t x, Float_t y, Float_t z)
*-*-*-*-*-*-*-*-*-*Initialize one point of the 3-D polyline*-*-*-*-*-*-*-*-*-*
*-* ========================================
*-* if n is more then the current TPolyLine3D size (n > fN) - re-allocate this
*-*
void SetPolyLine(Int_t n, Float_t *p, Option_t *option)
*-*-*-*-*-*-*-*-*-*-*Set new values for this 3-D polyline*-*-*-*-*-*-*-*-*-*-*
*-* ====================================
void Sizeof3D() const
*-*-*-*-*-*Return total X3D size of this shape with its attributes*-*-*-*-*-*-*
*-* =======================================================
void Streamer(TBuffer &b)
*-*-*-*-*-*-*-*-*Stream a class object*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-* =========================================
Inline Functions
Int_t GetLastPoint()
Int_t GetN()
Float_t* GetP()
Option_t* GetOption() const
void SetOption(Option_t* option)
Int_t Size() const
TClass* Class()
TClass* IsA() const
void ShowMembers(TMemberInspector& insp, char* parent)
Author: Nenad Buncic 17/08/95
Last update: 2.23/02 05/09/99 16.54.23 by Rene Brun
Copyright (c) 1995-1999, The ROOT System, All rights reserved. *
ROOT page - Class index - Top of the page
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.