Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/root/CsgOps.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // @(#)root/csg:$Id$
0002 // Author:  Timur Pocheptsov  01/04/2005
0003 
0004 #ifndef ROOT_CsgOps
0005 #define ROOT_CsgOps
0006 
0007 #include "RtypesCore.h"
0008 
0009 class TBuffer3D;
0010 
0011 namespace RootCsg {
0012 
0013 // I need TBaseMesh to have an opaque pointer
0014 // to hidden representation of resulting mesh.
0015 
0016 class TBaseMesh {
0017 public:
0018    TBaseMesh() = default;
0019    virtual ~TBaseMesh() = default;
0020 
0021    virtual UInt_t NumberOfPolys() const = 0;
0022    virtual UInt_t NumberOfVertices() const = 0;
0023    virtual UInt_t SizeOfPoly(UInt_t polyIndex) const = 0;
0024    virtual const Double_t *GetVertex(UInt_t vertNum) const = 0;
0025    virtual Int_t GetVertexIndex(UInt_t polyNum, UInt_t vertNum) const = 0;
0026 };
0027 
0028 TBaseMesh *ConvertToMesh(const TBuffer3D &buff);
0029 TBaseMesh *BuildUnion(const TBaseMesh *leftOperand, const TBaseMesh *rightOperand);
0030 TBaseMesh *BuildIntersection(const TBaseMesh *leftOperand, const TBaseMesh *rightOperand);
0031 TBaseMesh *BuildDifference(const TBaseMesh *leftOperand, const TBaseMesh *rightOperand);
0032 
0033 } // namespace RootCsg
0034 
0035 #endif