12#ifndef ROOT_TGeoTessellated 
   13#define ROOT_TGeoTessellated 
#define ClassDefOverride(name, id)
 
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
 
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.
 
void SetVertices(int nvert=0, int i0=-1, int i1=-1, int i2=-1, int i3=-1)
 
Tessellated::VertexVec_t VertexVec_t
 
bool IsNeighbour(const TGeoFacet &other, bool &flip) const
Check if a connected neighbour facet has compatible normal.
 
static int CompactFacet(Vertex_t *vert, int nvertices)
Compact consecutive equal vertices.
 
int operator[](int ivert) const
 
TGeoFacet(int i0, int i1, int i2, int i3)
 
TGeoFacet(int i0, int i1, int i2)
 
void ResizeCenter(double maxsize)
Resize and center the shape in a box of size maxsize.
 
const TGeoFacet & GetFacet(int i) const
 
int DistancetoPrimitive(int, int) override
Compute closest distance from point px,py to each corner.
 
int AddVertex(const Vertex_t &vert)
Add a vertex checking for duplicates, returning the vertex index.
 
void Sizeof3D() const override
 
bool FacetCheck(int ifacet) const
Check validity of facet.
 
const Vertex_t & GetVertex(int i) const
 
void InspectShape() const override
Prints shape parameters.
 
void Print(Option_t *option="") const override
Prints basic info.
 
void SetSegsAndPols(TBuffer3D &buff) const override
Fills TBuffer3D structure for segments and polygons.
 
const TBuffer3D & GetBuffer3D(int reqSections, Bool_t localFrame) const override
Fills a static 3D buffer and returns a reference.
 
TGeoTessellated(const TGeoTessellated &)=delete
Temporary map used to deduplicate vertices.
 
void SetPoints(double *points) const override
Fill tessellated points to an array.
 
TGeoTessellated & operator=(const TGeoTessellated &)=delete
 
bool IsClosedBody() const
 
bool CheckClosure(bool fixFlipped=true, bool verbose=true)
Check closure of the solid and check/fix flipped normals.
 
void SavePrimitive(std::ostream &, Option_t *) override
Save a primitive as a C++ statement(s) on output stream "out".
 
int GetNmeshVertices() const override
 
Vertex_t FacetComputeNormal(int ifacet, bool °enerated) const
Compute normal for a given facet.
 
void CloseShape(bool check=true, bool fixFlipped=true, bool verbose=true)
Close the shape: calculate bounding box and compact vertices.
 
void GetMeshNumbers(int &nvert, int &nsegs, int &npols) const override
Returns numbers of vertices, segments and polygons composing the shape mesh.
 
std::vector< TGeoFacet > fFacets
 
static TGeoTessellated * ImportFromObjFormat(const char *objfile, bool check=false, bool verbose=false)
Reader from .obj format.
 
TBuffer3D * MakeBuffer3D() const override
Creates a TBuffer3D describing this shape.
 
void ComputeBBox() override
Compute bounding box.
 
std::multimap< long, int > fVerticesMap
 
~TGeoTessellated() override
 
bool AddFacet(const Vertex_t &pt0, const Vertex_t &pt1, const Vertex_t &pt2)
Adding a triangular facet from vertex positions in absolute coordinates.
 
void FlipFacets()
Flip all facets.
 
std::vector< Vertex_t > fVertices
 
bool fClosedBody
Shape fully defined.
 
std::vector< Vertex_t > VertexVec_t
 
ROOT::Geom::Vertex_t Vertex_t