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

#include <RSolidTesselation.hh>

Public Member Functions

Constructors, affectation, destructor
 RTesselationPoint ()
 
 RTesselationPoint (const RTesselationPoint &original)
 
RTesselationPointoperator= (const RTesselationPoint &original)
 
virtual ~RTesselationPoint ()
 
Data setting
virtual void ResetData ()
 
virtual void CopyData (const RTesselationPoint &original)
 
void SetPosition (const TVector3 &p)
 
void SetNeighboursNum (int n)
 
void SetNeighbour (int i, int ip)
 
Points information
const TVector3 & GetPosition () const
 
TVector3 & GetPosition ()
 
double GetX () const
 
double GetY () const
 
double GetZ () const
 
double GetTheta (bool deg=false) const
 
double GetPhi (bool deg=false) const
 
int GetNeighbourNum () const
 
int GetNeighbourIndex (int i) const
 
const int * GetNeighbourTab () const
 
int * GetNeighbourTab ()
 
ROOT related functions
 ClassDef (RTesselationPoint, 0)
 

Protected Attributes

TVector3 position
 Position of the point.
 
int neighbour_num
 Number of neighbouring points.
 
int * neighbour_tab
 Array of index of neighbouring points.
 

Private Member Functions

 GObject (RTesselationPoint)
 

Friends

class RSolidTesselation
 

Detailed Description

This class defines the information associated to a point in the tesselation of solids:

  • the point position
  • the indexes of related neighbours

Constructor & Destructor Documentation

RTesselationPoint::RTesselationPoint ( )

Default constructor.

RTesselationPoint::RTesselationPoint ( const RTesselationPoint original)

Copy constructor.

Parameters
originalobject to copy

References CopyData(), neighbour_num, and neighbour_tab.

RTesselationPoint::~RTesselationPoint ( )
virtual

Destructor.

References ResetData().

Member Function Documentation

RTesselationPoint::GObject ( RTesselationPoint  )
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.
RTesselationPoint & RTesselationPoint::operator= ( const RTesselationPoint original)

Affectation operator.

Parameters
originalobject to copy

References CopyData().

void RTesselationPoint::ResetData ( )
virtual

Function that destroys data associated to the point.

References neighbour_num, and neighbour_tab.

Referenced by CopyData(), SetNeighboursNum(), and ~RTesselationPoint().

void RTesselationPoint::CopyData ( const RTesselationPoint original)
virtual

Function that copies the data from a point.

Parameters
originalobject to copy

References GetNeighbourNum(), GetNeighbourTab(), GetPosition(), neighbour_num, neighbour_tab, position, and ResetData().

Referenced by operator=(), and RTesselationPoint().

void RTesselationPoint::SetPosition ( const TVector3 &  p)
inline

Set the point position.

Parameters
pposition vector

References position.

Referenced by RSphereTesselation::InitData(), and RSphereTesselation::SubDivide().

void RTesselationPoint::SetNeighboursNum ( int  n)

Set the number of neighbours (previous data are resetted if defined).

Parameters
nnumber of neighbours

References neighbour_num, neighbour_tab, and ResetData().

Referenced by RSphereTesselation::InitData(), and RSphereTesselation::SubDivide().

void RTesselationPoint::SetNeighbour ( int  i,
int  ip 
)
inline

Set the index of a neighbouring point.

Parameters
ineighbour number
ipneighbour point index

References neighbour_tab.

Referenced by RSphereTesselation::InitData(), and RSphereTesselation::SubDivide().

const TVector3 & RTesselationPoint::GetPosition ( ) const
inline

Return the point position.

References position.

Referenced by CopyData(), RSphereTesselation::InitData(), and RSphereTesselation::SubDivide().

TVector3 & RTesselationPoint::GetPosition ( )
inline

Return the point position.

References position.

double RTesselationPoint::GetX ( ) const
inline
double RTesselationPoint::GetY ( ) const
inline
double RTesselationPoint::GetZ ( ) const
inline
double RTesselationPoint::GetTheta ( bool  deg = false) const

Return the Theta angle of the point.

Parameters
degwhether the angle is return in degrees

References position.

double RTesselationPoint::GetPhi ( bool  deg = false) const

Return the Phi angle of the point.

Parameters
degwhether the angle is return in degrees

References position.

int RTesselationPoint::GetNeighbourNum ( ) const
inline

Return the number of neighbours of the point.

References neighbour_num.

Referenced by CopyData().

int RTesselationPoint::GetNeighbourIndex ( int  i) const
inline

Return the index of a neighbours point.

Parameters
ineighbour number

References neighbour_tab.

const int * RTesselationPoint::GetNeighbourTab ( ) const
inline

Return the pointer of neighbours array.

References neighbour_tab.

Referenced by CopyData().

int * RTesselationPoint::GetNeighbourTab ( )
inline

Return the pointer of neighbours array.

References neighbour_tab.

RTesselationPoint::ClassDef ( RTesselationPoint  ,
 
)

For ROOT dictionary.


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