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

#include <RSphereTesselation.hh>

Inheritance diagram for RSphereTesselation:
RSolidTesselation

Public Member Functions

Constructors, affectation, destructor
 RSphereTesselation ()
 
virtual ~RSphereTesselation ()
 
Tesselation data
virtual void InitData ()
 
virtual int SubDivide (int n)
 
virtual int SubDivide ()
 
double GetDistanceMin () const
 
double GetDistanceMax () const
 
double GetAngleMin (bool deg=false) const
 
double GetAngleMax (bool deg=false) const
 
TVector3 GetVectUx (int ip) const
 
TVector3 GetVectUy (int ip) const
 
ROOT related functions
 ClassDef (RSphereTesselation, 0)
 
- Public Member Functions inherited from RSolidTesselation
 RSolidTesselation ()
 
virtual ~RSolidTesselation ()
 
virtual void ResetData ()
 
virtual u_short GetDivision () const
 
int GetNpoints () const
 
int GetNsegments () const
 
const RTesselationPointGetPoint (int ip) const
 
const RTesselationSegmentGetSegment (int is) const
 
TPolyMarker3D * CreatePoints3D () const
 
TPolyLine3D * CreateSegment3D (int is) const
 
TList * CreateLines3D (const TAttLine latt=TAttLine(kRed+1, 2, 1)) const
 
 ClassDef (RSolidTesselation, 0)
 

Protected Attributes

double dmin
 Lower distance between points.
 
double dmax
 Upper distance between points.
 
- Protected Attributes inherited from RSolidTesselation
u_short subdiv
 Number of subdivisions since initial creation.
 
u_int npts
 Number of points.
 
u_int nseg
 Number of segments.
 
RTesselationPointtab_pts
 Array of points.
 
RTesselationSegmenttab_seg
 Array of segments.
 

Private Member Functions

 GObject (RSphereTesselation)
 

Detailed Description

This class defines a discretization of a sphere from the tesselation of a basic platon solid (icosahedron).

The points are all located on a unit radius sphere.

Tesselation0.png
Tesselation1.png
Tesselation2.png
Tesselation3.png

Constructor & Destructor Documentation

RSphereTesselation::RSphereTesselation ( )

Default constructor (no points).

RSphereTesselation::~RSphereTesselation ( )
virtual

Destructor.

Member Function Documentation

RSphereTesselation::GObject ( RSphereTesselation  )
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.
int RSphereTesselation::SubDivide ( int  n)
virtual

Function subdividing the points. The function returns the new number of points, or -1 in case of failure.

Parameters
nnumber of division iterations

References SubDivide().

Referenced by RHoughTransform3D::SetTesselation().

int RSphereTesselation::SubDivide ( )
virtual

Function subdividing the points.

For now, the algorithm uses the brute force to recreate the segments: it looks for points below a given distance. All points combitations are considered, which is not efficient. A better one should be searched for.

Implements RSolidTesselation.

References dmax, dmin, RTesselationSegment::GetP0(), RTesselationSegment::GetP1(), RTesselationPoint::GetPosition(), RSolidTesselation::npts, RSolidTesselation::nseg, RSolidTesselation::ResetData(), RGetString(), RTesselationPoint::SetNeighbour(), RTesselationPoint::SetNeighboursNum(), RTesselationSegment::SetPindex(), RTesselationPoint::SetPosition(), RSolidTesselation::subdiv, RSolidTesselation::tab_pts, and RSolidTesselation::tab_seg.

Referenced by SubDivide().

double RSphereTesselation::GetDistanceMin ( ) const
inline

Return the minimum distance between neighbouring points.

References dmin.

double RSphereTesselation::GetDistanceMax ( ) const
inline

Return the maximum distance between neighbouring points.

References dmax.

double RSphereTesselation::GetAngleMin ( bool  deg = false) const
inline

Return the minimum angle between neighbouring points.

Parameters
degwhether the angle is returned in degrees

References dmin.

Referenced by RHoughTransform3D::SetTransformLocal().

double RSphereTesselation::GetAngleMax ( bool  deg = false) const
inline

Return the maximum angle between neighbouring points.

Parameters
degwhether the angle is returned in degrees

References dmax.

TVector3 RSphereTesselation::GetVectUx ( int  ip) const
inline

Return the normal unit vector X.

Parameters
ippoint number

References RNormalUx(), and RSolidTesselation::tab_pts.

Referenced by RHoughTransform3D::SetTesselation().

TVector3 RSphereTesselation::GetVectUy ( int  ip) const
inline

Return the normal unit vector Y.

Parameters
ippoint number

References RNormalUy(), and RSolidTesselation::tab_pts.

Referenced by RHoughTransform3D::SetTesselation().

RSphereTesselation::ClassDef ( RSphereTesselation  ,
 
)

For ROOT dictionary.


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