ROOT  6.06/09
Reference Guide
CsgOps.h
Go to the documentation of this file.
1 // @(#)root/gl:$Id$
2 // Author: Timur Pocheptsov 01/04/2005
3 
4 #ifndef ROOT_CsgOps
5 #define ROOT_CsgOps
6 
7 #ifndef ROOT_Rtype
8 #include "Rtypes.h"
9 #endif
10 
11 class TBuffer3D;
12 
13 namespace RootCsg {
14 
15  // I need TBaseMesh to have an opaque pointer
16  // to hidden representation of resulting mesh.
17 
18 class TBaseMesh {
19 public:
20 
21  virtual ~TBaseMesh(){}
22  virtual UInt_t NumberOfPolys()const = 0;
23  virtual UInt_t NumberOfVertices()const = 0;
24  virtual UInt_t SizeOfPoly(UInt_t polyIndex)const = 0;
25  virtual const Double_t *GetVertex(UInt_t vertNum)const = 0;
26  virtual Int_t GetVertexIndex(UInt_t polyNum, UInt_t vertNum)const = 0; };
27 
28  TBaseMesh *ConvertToMesh(const TBuffer3D &buff);
29  TBaseMesh *BuildUnion(const TBaseMesh *leftOperand, const TBaseMesh *rightOperand);
30  TBaseMesh *BuildIntersection(const TBaseMesh *leftOperand, const TBaseMesh *rightOperand);
31  TBaseMesh *BuildDifference(const TBaseMesh *leftOperand, const TBaseMesh *rightOperand);
32 }
33 
34 #endif
int Int_t
Definition: RtypesCore.h:41
virtual UInt_t NumberOfVertices() const =0
virtual UInt_t SizeOfPoly(UInt_t polyIndex) const =0
TBaseMesh * BuildDifference(const TBaseMesh *leftOperand, const TBaseMesh *rightOperand)
Definition: CsgOps.cxx:2737
TBaseMesh * BuildIntersection(const TBaseMesh *leftOperand, const TBaseMesh *rightOperand)
Definition: CsgOps.cxx:2730
virtual Int_t GetVertexIndex(UInt_t polyNum, UInt_t vertNum) const =0
unsigned int UInt_t
Definition: RtypesCore.h:42
Generic 3D primitive description class.
Definition: TBuffer3D.h:19
I've modified some very nice bounding box tree code from Gino van der Bergen's Free Solid Library bel...
Definition: CsgOps.h:13
double Double_t
Definition: RtypesCore.h:55
TBaseMesh * ConvertToMesh(const TBuffer3D &buff)
Definition: CsgOps.cxx:2656
virtual ~TBaseMesh()
Definition: CsgOps.h:21
virtual const Double_t * GetVertex(UInt_t vertNum) const =0
virtual UInt_t NumberOfPolys() const =0
TBaseMesh * BuildUnion(const TBaseMesh *leftOperand, const TBaseMesh *rightOperand)
Definition: CsgOps.cxx:2723