ROOT logo
// $Id: GTSurf.h 2088 2008-11-23 20:26:46Z matevz $

// Copyright (C) 1999-2008, Matevz Tadel. All rights reserved.
// This file is part of GLED, released under GNU General Public License version 2.
// For the licensing terms see $GLEDSYS/LICENSE or http://www.gnu.org/.

#ifndef GTS_GTSurf_H
#define GTS_GTSurf_H

#include <Glasses/ZNode.h>
#include <Stones/ZColor.h>
#include <Stones/SGTSRange.h>

//#ifndef __CINT__
//#include <GTS/GTS.h>
//#endif

namespace GTS {
  struct _GtsSurface;
  typedef struct _GtsSurface GtsSurface;
}

class GTSurf : public ZNode {

  MAC_RNR_FRIENDS(GTSurf);

private:
  void	_init();

protected:
  GTS::GtsSurface*	pSurf;  //! X{g}

  TString		mFile;  // X{GS}   7 Filor()

  bool			bPoints;// X{GS}   7 Bool()
  ZColor		mColor;	// X{PGST} 7 ColorButt()

  UInt_t		mVerts; //! X{G}   7 ValOut(-width=>6, -join=>1)
  UInt_t		mEdges; //! X{G}   7 ValOut(-width=>6, -join=>1)
  UInt_t		mFaces; //! X{G}   7 ValOut(-width=>6)

  SGTSRange		mFaceQuality; //! X{RGS} 7 StoneOutput(Fmt=>"%4.2le | %4.2le : %4.2le | %4.2le", Args=>[Min, Avg, Sigma, Max])
  SGTSRange		mFaceArea;    //! X{RGS} 7 StoneOutput(Fmt=>"%4.2le | %4.2le : %4.2le | %4.2le", Args=>[Min, Avg, Sigma, Max])
  SGTSRange		mEdgeLength;  //! X{RGS} 7 StoneOutput(Fmt=>"%4.2le | %4.2le : %4.2le | %4.2le", Args=>[Min, Avg, Sigma, Max])
  SGTSRange		mEdgeAngle;   //! X{RGS} 7 StoneOutput(Fmt=>"%4.2le | %4.2le : %4.2le | %4.2le", Args=>[Min, Avg, Sigma, Max])

public:
  GTSurf(const Text_t* n="GTSurf", const Text_t* t=0) : ZNode(n,t) { _init(); }

  void ReplaceSurface(GTS::GtsSurface* new_surf);
  GTS::GtsSurface* CopySurface();

  void Load();                //  X{E} 7 MButt(-join=>1)
  void Save();                //  X{E} 7 MButt()

  void CalcStats();           //! X{E} 7 MButt(-join=>1)
  void PrintStats();          //! X{E} 7 MButt()

  void Destroy();             //  X{E} 7 MButt(-join=>1)
  void Invert();              //  X{E} 7 MButt()

  void Rescale(Double_t s=2); // X{E} 7 MCWButt()

  void Tessellate(UInt_t order=1, Bool_t mid_edge=true); // X{E} 7 MCWButt()

  void GenerateSphere(UInt_t order=1); // X{E} 7 MCWButt()
  void GenerateTriangle(Double_t s=1); // X{E} 7 MCWButt()

  void Legendrofy(Int_t max_l, Double_t abs_scale=0.1,Double_t pow_scale=2.7); // X{E} 7 MCWButt()

  void ExportTring(const Text_t* fname=0);

#include "GTSurf.h7"
  ClassDef(GTSurf, 1);
}; // endclass GTSurf


#endif
 GTSurf.h:1
 GTSurf.h:2
 GTSurf.h:3
 GTSurf.h:4
 GTSurf.h:5
 GTSurf.h:6
 GTSurf.h:7
 GTSurf.h:8
 GTSurf.h:9
 GTSurf.h:10
 GTSurf.h:11
 GTSurf.h:12
 GTSurf.h:13
 GTSurf.h:14
 GTSurf.h:15
 GTSurf.h:16
 GTSurf.h:17
 GTSurf.h:18
 GTSurf.h:19
 GTSurf.h:20
 GTSurf.h:21
 GTSurf.h:22
 GTSurf.h:23
 GTSurf.h:24
 GTSurf.h:25
 GTSurf.h:26
 GTSurf.h:27
 GTSurf.h:28
 GTSurf.h:29
 GTSurf.h:30
 GTSurf.h:31
 GTSurf.h:32
 GTSurf.h:33
 GTSurf.h:34
 GTSurf.h:35
 GTSurf.h:36
 GTSurf.h:37
 GTSurf.h:38
 GTSurf.h:39
 GTSurf.h:40
 GTSurf.h:41
 GTSurf.h:42
 GTSurf.h:43
 GTSurf.h:44
 GTSurf.h:45
 GTSurf.h:46
 GTSurf.h:47
 GTSurf.h:48
 GTSurf.h:49
 GTSurf.h:50
 GTSurf.h:51
 GTSurf.h:52
 GTSurf.h:53
 GTSurf.h:54
 GTSurf.h:55
 GTSurf.h:56
 GTSurf.h:57
 GTSurf.h:58
 GTSurf.h:59
 GTSurf.h:60
 GTSurf.h:61
 GTSurf.h:62
 GTSurf.h:63
 GTSurf.h:64
 GTSurf.h:65
 GTSurf.h:66
 GTSurf.h:67
 GTSurf.h:68
 GTSurf.h:69
 GTSurf.h:70
 GTSurf.h:71
 GTSurf.h:72
 GTSurf.h:73
 GTSurf.h:74
 GTSurf.h:75
 GTSurf.h:76
 GTSurf.h:77
 GTSurf.h:78