12#ifndef ROOT_TGeoTessellated 
   13#define ROOT_TGeoTessellated 
  131   void CloseShape(
bool check = 
true, 
bool fixFlipped = 
true, 
bool verbose = 
true);
 
  135   bool AddFacet(
int i1, 
int i2, 
int i3);
 
  136   bool AddFacet(
int i1, 
int i2, 
int i3, 
int i4);
 
  150   virtual void GetMeshNumbers(
int &nvert, 
int &nsegs, 
int &npols) 
const;
 
  171   bool CheckClosure(
bool fixFlipped = 
true, 
bool verbose = 
true);
 
#define ClassDef(name, id)
 
TBuffer & operator<<(TBuffer &buf, const Tmpl *obj)
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t points
 
Generic 3D primitive description class.
 
TGeoFacet(const Vertex_t &pt0, const Vertex_t &pt1, const Vertex_t &pt2)
 
Tessellated::VertexVec_t VertexVec_t
 
bool IsNeighbour(const TGeoFacet &other, bool &flip) const
Check if a connected neighbour facet has compatible normal.
 
TGeoFacet(VertexVec_t *vertices, int nvert, int i0=-1, int i1=-1, int i2=-1, int i3=-1)
 
static int CompactFacet(Vertex_t *vert, int nvertices)
 
int GetVertexIndex(int ivert) const
 
Vertex_t & GetVertex(int ivert)
 
TGeoFacet(const Vertex_t &pt0, const Vertex_t &pt1, const Vertex_t &pt2, const Vertex_t &pt3)
 
void SetVertices(VertexVec_t *vertices, int nvert=0, int i0=-1, int i1=-1, int i2=-1, int i3=-1)
 
int fNvert
array of vertices
 
const Vertex_t & GetVertex(int ivert) const
 
Vertex_t ComputeNormal(bool °enerated) const
 
const TGeoFacet & operator=(const TGeoFacet &other)
 
void ResizeCenter(double maxsize)
Resize and center the shape in a box of size maxsize.
 
virtual int DistancetoPrimitive(int, int)
Compute closest distance from point px,py to each corner.
 
virtual void Sizeof3D() const
 
virtual void Print(Option_t *option="") const
Prints basic info.
 
TGeoTessellated(const TGeoTessellated &)=delete
 
TGeoTessellated & operator=(const TGeoTessellated &)=delete
 
bool IsClosedBody() const
 
virtual const TBuffer3D & GetBuffer3D(int reqSections, Bool_t localFrame) const
Fills a static 3D buffer and returns a reference.
 
virtual void SetSegsAndPols(TBuffer3D &buff) const
Fills TBuffer3D structure for segments and polygons.
 
bool CheckClosure(bool fixFlipped=true, bool verbose=true)
Check closure of the solid and check/fix flipped normals.
 
const Vertex_t & GetVertex(int i)
 
virtual int GetNmeshVertices() const
 
virtual void SetPoints(double *points) const
Fill tessellated points to an array.
 
virtual ~TGeoTessellated()
 
virtual TBuffer3D * MakeBuffer3D() const
Creates a TBuffer3D describing this shape.
 
void CloseShape(bool check=true, bool fixFlipped=true, bool verbose=true)
Close the shape: calculate bounding box and compact vertices.
 
std::vector< TGeoFacet > fFacets
 
static TGeoTessellated * ImportFromObjFormat(const char *objfile, bool check=false, bool verbose=false)
Reader from .obj format.
 
void ComputeBBox()
Compute bounding box.
 
virtual void AfterStreamer()
Function to be called after reading tessellated volumes from the geometry file.
 
virtual void SavePrimitive(std::ostream &, Option_t *)
Save a primitive as a C++ statement(s) on output stream "out".
 
bool AddFacet(const Vertex_t &pt0, const Vertex_t &pt1, const Vertex_t &pt2)
Adding a triangular facet from vertex positions in absolute coordinates.
 
virtual void GetMeshNumbers(int &nvert, int &nsegs, int &npols) const
Returns numbers of vertices, segments and polygons composing the shape mesh.
 
virtual void InspectShape() const
Prints shape parameters.
 
void FlipFacets()
Flip all facets.
 
std::vector< Vertex_t > fVertices
 
const TGeoFacet & GetFacet(int i)
 
bool fClosedBody
Shape fully defined.
 
ROOT::Geom::Vertex_t Vertex_t
 
std::vector< Vertex_t > VertexVec_t
 
void flip(struct mesh *m, struct behavior *b, struct otri *flipedge)