TPoints3DABC


class description - source file - inheritance tree

class TPoints3DABC : public TObject


    public:
virtual void ~TPoints3DABC() virtual Int_t Add(Float_t x, Float_t y, Float_t z) virtual Int_t AddLast(Float_t x, Float_t y, Float_t z) static TClass* Class() static Int_t DistancetoLine(Int_t px, Int_t py, Float_t x1, Float_t y1, Float_t x2, Float_t y2, Int_t lineWidth = 1) virtual Int_t DistancetoPrimitive(Int_t px, Int_t py) virtual Int_t GetLastPosition() const virtual Int_t GetN() const virtual Option_t* GetOption() const virtual Float_t* GetP() const virtual Float_t GetX(Int_t idx) const virtual Float_t* GetXYZ(Float_t* xyz, Int_t idx, Int_t num = 1) const virtual const Float_t* GetXYZ(Int_t idx) const virtual Float_t GetY(Int_t idx) const virtual Float_t GetZ(Int_t idx) const virtual TClass* IsA() const virtual void PaintPoints(Int_t n, Float_t* p, Option_t* option) virtual Int_t SetLastPosition(Int_t idx) virtual Int_t SetNextPoint(Float_t x, Float_t y, Float_t z) virtual void SetOption(Option_t* option) virtual Int_t SetPoint(Int_t point, Float_t x, Float_t y, Float_t z) virtual Int_t SetPoints(Int_t n, Float_t* p = 0, Option_t* option) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual Int_t Size() const virtual void Streamer(TBuffer& b)

Data Members



See also

TPoints3D, TPointsArray3D, TTablePoints

Class Description

                                                                      
 TPoints3DABC                                                         
                                                                      
 Abstract class to define Arrays of 3D points                         
                                                                      


Int_t Add(Float_t x, Float_t y, Float_t z)
 Add one 3D point defined by x,y,z to the array of the points
 as its last element

Int_t AddLast(Float_t x, Float_t y, Float_t z)
 Add one 3D point defined by x,y,z to the array of the points
 as its last element

Int_t DistancetoLine(Int_t px, Int_t py, Float_t x1, Float_t y1, Float_t x2, Float_t y2, Int_t lineWidth )
*-*-*-*-*Compute distance from point px,py to an axis of the band defined*-*-*-*
*-*  by pair points  (x1,y1),(x2,y2) where lineWidth is the width of the band
*-*  ========================================================================
*-*
*-*  Compute the closest distance of approach from point px,py to this line.
*-*  The distance is computed in pixels units.
*-*
*-*
*-*  Algorithm:
*-*
*-*    A(x1,y1)         P                             B(x2,y2)
*-*    ------------------------------------------------
*-*                     I
*-*                     I
*-*                     I
*-*                     I
*-*                    M(x,y)
*-*
*-*  Let us call  a = distance AM     A=a**2
*-*               b = distance BM     B=b**2
*-*               c = distance AB     C=c**2
*-*               d = distance PM     D=d**2
*-*               u = distance AP     U=u**2
*-*               v = distance BP     V=v**2     c = u + v
*-*
*-*  D = A - U
*-*  D = B - V  = B -(c-u)**2
*-*     ==> u = (A -B +C)/2c
*-*
*-*   Float_t x1    = gPad->XtoAbsPixel(xp1);
*-*   Float_t y1    = gPad->YtoAbsPixel(yp1);
*-*   Float_t x2    = gPad->XtoAbsPixel(xp2);
*-*   Float_t y2    = gPad->YtoAbsPixel(yp2);
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

Int_t SetNextPoint(Float_t x, Float_t y, Float_t z)
 Add one 3D point defined by x,y,z to the array of the points
 as its last element

Int_t GetN() const
 GetN()  returns the number of allocated cells if any.
         GetN() > 0 shows how many cells
         can be available via GetP() method.
         GetN() == 0 then GetP() must return 0 as well

Float_t* GetP() const
 GetP()  returns the pointer to the float point array
         of points if available
         The number of the available celss can be found via
         GetN() method.
         GetN() > 0 shows how many cells

Float_t* GetXYZ(Float_t *xyz,Int_t idx,Int_t num) const
 GetXYZ(Float_t *xyz,Int_t idx,Int_t num=1) fills the buffer supplied
 by the calling code with the points information.

  Input parameters:
  ----------------
   Float_t *xyz - an external user supplied floating point array.
   Int_t    num - the total number of the points to be copied
                  the dimension of that array the size of the
                  array is num*sizeof(Float_t) at least
   Int_t    idx - The index of the first copy to be taken.

  Return: The pointer to the buffer array supplied
  ------



Inline Functions


                 Int_t DistancetoPrimitive(Int_t px, Int_t py)
                 Int_t GetLastPosition() const
               Float_t GetX(Int_t idx) const
               Float_t GetY(Int_t idx) const
               Float_t GetZ(Int_t idx) const
        const Float_t* GetXYZ(Int_t idx) const
             Option_t* GetOption() const
                  void PaintPoints(Int_t n, Float_t* p, Option_t* option)
                 Int_t SetLastPosition(Int_t idx)
                  void SetOption(Option_t* option)
                 Int_t SetPoint(Int_t point, Float_t x, Float_t y, Float_t z)
                 Int_t SetPoints(Int_t n, Float_t* p = 0, Option_t* option)
                 Int_t Size() const
               TClass* Class()
               TClass* IsA() const
                  void ShowMembers(TMemberInspector& insp, char* parent)
                  void Streamer(TBuffer& b)
                  void ~TPoints3DABC()


Author: Valery Fine(fine@mail.cern.ch) 04/05/99
Last update: root/g3d:$Name: $:$Id: TPoints3DABC.cxx,v 1.1.1.1 2000/05/16 17:00:43 rdm Exp $


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.