JG ROOT Tools libraries  version 5.0 - august 2014
RContourBasePolygon Class Reference

#include <RContourBasePolygon.hh>

Inheritance diagram for RContourBasePolygon:
RContourBase2D RContourBase

Public Member Functions

 RContourBasePolygon ()
 
 RContourBasePolygon (const UInt_t n, const Double_t r=1.)
 
 RContourBasePolygon (const UInt_t n, const RPoint2D *pts)
 
 RContourBasePolygon (const UInt_t n, const Double_t x[], const Double_t y[])
 
 RContourBasePolygon (const RContourBasePolygon &ct)
 
RContourBasePolygonoperator= (const RContourBasePolygon &ct)
 
virtual ~RContourBasePolygon ()
 
virtual bool Compare (const RContourBase *ct_ptr) const
 
virtual TList * CreateObjectList () const
 
virtual bool WriteData (ostream &os) const
 
virtual bool WriteData (FILE *fptr) const
 
virtual bool CheckPoint (const Double_t x, const Double_t y) const
 
virtual bool CheckPoint (const RPoint2D &p) const
 
virtual Int_t Type () const
 
virtual string TypeName () const
 
virtual UInt_t GetPointsNumber () const
 
virtual RPoint2D GetPoint (const UInt_t n) const
 
virtual void SetPoint (const UInt_t n, const RPoint2D &p)
 
 ClassDef (RContourBasePolygon, 0)
 
- Public Member Functions inherited from RContourBase2D
 RContourBase2D ()
 
 RContourBase2D (const RContourBase2D &ct)
 
RContourBase2Doperator= (const RContourBase2D &ct)
 
virtual ~RContourBase2D ()
 
virtual bool CheckValue (const Double_t val) const
 
virtual Int_t Dimension () const
 
 ClassDef (RContourBase2D, 0)
 
- Public Member Functions inherited from RContourBase
 RContourBase ()
 
 RContourBase (const RContourBase &ct)
 
RContourBaseoperator= (const RContourBase &ct)
 
virtual ~RContourBase ()
 
virtual bool operator== (const RContourBase &ct) const
 
virtual bool operator!= (const RContourBase &ct) const
 
virtual void SetFlipAxis (const bool flip=true)
 
virtual bool GetFlipAxis () const
 
virtual bool Write (ostream &os) const
 
virtual bool Write (FILE *fptr) const
 
 ClassDef (RContourBase, 0)
 

Static Public Member Functions

static RContourBasePolygonReadNew (istream &is)
 
static RContourBasePolygonReadNew (FILE *fptr)
 
- Static Public Member Functions inherited from RContourBase
static RContourBaseReadNew (istream &is)
 
static RContourBaseReadNew (FILE *fptr)
 

Protected Attributes

UInt_t points_num
 Number of points.
 
RPoint2Dpoints_ptr
 Array of points.
 
- Protected Attributes inherited from RContourBase
bool flip_axis
 Axis inversion.
 

Private Member Functions

 GObject (RContourBasePolygon)
 

Additional Inherited Members

Detailed Description

Class for polygon contour parameters.

Constructor & Destructor Documentation

RContourBasePolygon::RContourBasePolygon ( )

Default constructor: no point.

References points_num, and points_ptr.

Referenced by ReadNew().

RContourBasePolygon::RContourBasePolygon ( const UInt_t  n,
const Double_t  r = 1. 
)

Construction of a regular polygon.

Parameters
npoints number
rradius of circle containing the polygon

References points_num, and points_ptr.

RContourBasePolygon::RContourBasePolygon ( const UInt_t  n,
const RPoint2D pts 
)

Constructor from points array.

Parameters
npoints number
ptspoints array

References points_num, and points_ptr.

RContourBasePolygon::RContourBasePolygon ( const UInt_t  n,
const Double_t  x[],
const Double_t  y[] 
)

Constructor from points coordinates arrays.

Parameters
npoints number
xpoints X positions array
ypoints Y positions array

References points_num, and points_ptr.

RContourBasePolygon::RContourBasePolygon ( const RContourBasePolygon ct)

Copy constructor.

Parameters
ctcontour to copy

References points_num, and points_ptr.

RContourBasePolygon::~RContourBasePolygon ( )
virtual

Destructor.

References points_num, and points_ptr.

Member Function Documentation

RContourBasePolygon::GObject ( RContourBasePolygon  )
private

Macro from GCpp library that defines the following functions:

  • ClassName(): return the real class name of the object
  • StaticClassName(): return the used class name of the object (that may be a base class of the real object).
  • IsInstanceOf<T>(): return true if the current object is an instance of the template class name argument
  • Clone(): return an allocated copy of the object.
RContourBasePolygon & RContourBasePolygon::operator= ( const RContourBasePolygon ct)

Affectation operator.

Parameters
ctcontour to copy

References points_num, and points_ptr.

bool RContourBasePolygon::Compare ( const RContourBase ct_ptr) const
virtual

Comparison function, operating only on content, not on name.

Parameters
ct_ptrpointer to compared contour

Implements RContourBase.

References GetPoint(), GetPointsNumber(), RContourBase::Type(), and RVector2D::zero.

TList * RContourBasePolygon::CreateObjectList ( ) const
virtual

Creation of associated ROOT objects list: a new list is created (allocated) and its pointer is returned.

Implements RContourBase.

References RContourBase::flip_axis, GetPoint(), and GetPointsNumber().

bool RContourBasePolygon::WriteData ( ostream &  os) const
virtual

Write contour data in an output C++ stream.

Parameters
osoutput C++ stream

Implements RContourBase.

References GetPoint(), and GetPointsNumber().

bool RContourBasePolygon::WriteData ( FILE *  fptr) const
virtual

Write contour data in an output C-style file.

Parameters
fptrC-style file pointer

Implements RContourBase.

References GetPoint(), and GetPointsNumber().

RContourBasePolygon * RContourBasePolygon::ReadNew ( istream &  is)
static

Read contour data from an input C++ stream, and return the allocated pointer.

Parameters
isinput C++ stream

References RContourBasePolygon().

Referenced by RContourBase::ReadNew().

RContourBasePolygon * RContourBasePolygon::ReadNew ( FILE *  fptr)
static

Read contour data from an input C-style file, and return the allocated pointer.

Parameters
fptrinput C-style file pointer

References RContourBasePolygon(), and SetPoint().

bool RContourBasePolygon::CheckPoint ( const Double_t  x,
const Double_t  y 
) const
inlinevirtual

Check whether a point (x,y) is inside a contour.

Parameters
xpoint X position
ypoint Y position

Reimplemented from RContourBase2D.

bool RContourBasePolygon::CheckPoint ( const RPoint2D p) const
virtual

Check whether a point is inside a contour.

Parameters
ppoint

Implements RContourBase2D.

References RVector2D::Angle(), points_num, and points_ptr.

Int_t RContourBasePolygon::Type ( ) const
inlinevirtual

Return contour type identifier.

Implements RContourBase.

string RContourBasePolygon::TypeName ( ) const
inlinevirtual

Return contour type name.

Implements RContourBase.

UInt_t RContourBasePolygon::GetPointsNumber ( ) const
inlinevirtual

Get number of points in the contour.

References points_num.

Referenced by Compare(), CreateObjectList(), and WriteData().

RPoint2D RContourBasePolygon::GetPoint ( const UInt_t  n) const
inlinevirtual

Get a point from the contour.

Parameters
npoint number

References points_num, and points_ptr.

Referenced by Compare(), CreateObjectList(), and WriteData().

void RContourBasePolygon::SetPoint ( const UInt_t  n,
const RPoint2D p 
)
inlinevirtual

Set a point from the contour.

Parameters
npoint number
ppoint data

References points_num, and points_ptr.

Referenced by ReadNew(), and RGContourEdit::UpdateContour().

RContourBasePolygon::ClassDef ( RContourBasePolygon  ,
 
)

For ROOT dictionary.


The documentation for this class was generated from the following files: