library: libGraf3d
#include "TPoints3DABC.h"

TPoints3DABC


class description - header file - source file - inheritance tree (.pdf)

class TPoints3DABC : public TObject

Inheritance Chart:
TObject
<-
TPoints3DABC
<-
TPoints3D
TPointsArray3D
TTablePoints
<-
TTable3Points
 
    This is an abstract class, constructors will not be documented.
    Look at the header to check for available constructors.


    public:
virtual ~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) virtual Float_t GetY(Int_t idx) const virtual Float_t GetZ(Int_t idx) const virtual TClass* IsA() const TPoints3DABC& operator=(const TPoints3DABC&) 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) void StreamerNVirtual(TBuffer& b)

Data Members




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     a2=a**2
               b = distance BM     b2=b**2
               c = distance AB     c2=c**2
               d = distance PM     d2=d**2
               u = distance AP     u2=u**2
               v = distance BP     v2=v**2     c = u + v

  d2 = a2 - u2
  d2 = b2 - v2  = b2 -(c-u)**2
     ==> u = (a2 -b2 +c2)/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()
 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()
 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)
 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
virtual ~TPoints3DABC()
Int_t DistancetoPrimitive(Int_t px, Int_t py)
Int_t GetLastPosition()
Float_t GetX(Int_t idx)
Float_t GetY(Int_t idx)
Float_t GetZ(Int_t idx)
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()

Author: Valery Fine(fine@mail.cern.ch) 04/05/99
Last update: root/g3d:$Name: $:$Id: TPoints3DABC.cxx,v 1.5 2005/11/24 17:28:07 couet Exp $


ROOT page - Class index - Class Hierarchy - 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.