![]() |
Project
|
#include <O2Tessellated.h>
Inherits TGeoBBox.
Public Types | |
| using | Vertex_t = Tessellated::Vertex_t |
Public Member Functions | |
| O2Tessellated () | |
| O2Tessellated (const char *name, int nfacets=0) | |
| O2Tessellated (const char *name, const std::vector< Vertex_t > &vertices) | |
| O2Tessellated (TGeoTessellated const &, bool check=false) | |
| Construct from TGeoTessellated. | |
| ~O2Tessellated () override | |
| void | ComputeBBox () override |
| Compute bounding box. | |
| void | CloseShape (bool check=true, bool fixFlipped=true, bool verbose=true) |
| Close the shape: calculate bounding box and compact vertices. | |
| bool | AddFacet (const Vertex_t &pt0, const Vertex_t &pt1, const Vertex_t &pt2) |
| Adding a triangular facet from vertex positions in absolute coordinates. | |
| bool | AddFacet (const Vertex_t &pt0, const Vertex_t &pt1, const Vertex_t &pt2, const Vertex_t &pt3) |
| Adding a quadrilateral facet from vertex positions in absolute coordinates. | |
| bool | AddFacet (int i1, int i2, int i3) |
| Adding a triangular facet from indices of vertices. | |
| bool | AddFacet (int i1, int i2, int i3, int i4) |
| Adding a quadrilateral facet from indices of vertices. | |
| int | AddVertex (const Vertex_t &vert) |
| Add a vertex checking for duplicates, returning the vertex index. | |
| bool | FacetCheck (int ifacet) const |
| Check validity of facet. | |
| Vertex_t | FacetComputeNormal (int ifacet, bool °enerated) const |
| Compute normal for a given facet. | |
| int | GetNfacets () const |
| int | GetNsegments () const |
| int | GetNvertices () const |
| bool | IsClosedBody () const |
| bool | IsDefined () const |
| const TGeoFacet & | GetFacet (int i) const |
| const Vertex_t & | GetVertex (int i) const |
| int | DistancetoPrimitive (int, int) override |
| const TBuffer3D & | GetBuffer3D (int reqSections, Bool_t localFrame) const override |
| Fills a static 3D buffer and returns a reference. | |
| void | GetMeshNumbers (int &nvert, int &nsegs, int &npols) const override |
| Returns numbers of vertices, segments and polygons composing the shape mesh. | |
| int | GetNmeshVertices () const override |
| void | InspectShape () const override |
| TBuffer3D * | MakeBuffer3D () const override |
| void | Print (Option_t *option="") const override |
| Prints basic info. | |
| void | SavePrimitive (std::ostream &, Option_t *) override |
| void | SetPoints (double *points) const override |
| Fill tessellated points to an array. | |
| void | SetPoints (Float_t *points) const override |
| Fill tessellated points in float. | |
| void | SetSegsAndPols (TBuffer3D &buff) const override |
| Fills TBuffer3D structure for segments and polygons. | |
| void | Sizeof3D () const override |
| void | ResizeCenter (double maxsize) |
| Resize and center the shape in a box of size maxsize. | |
| void | FlipFacets () |
| Flip all facets. | |
| bool | CheckClosure (bool fixFlipped=true, bool verbose=true) |
| Check closure of the solid and check/fix flipped normals. | |
| Double_t | DistFromOutside (const Double_t *point, const Double_t *dir, Int_t iact=1, Double_t step=TGeoShape::Big(), Double_t *safe=nullptr) const override |
| DistFromOutside. | |
| Double_t | DistFromInside (const Double_t *point, const Double_t *dir, Int_t iact=1, Double_t step=TGeoShape::Big(), Double_t *safe=nullptr) const override |
| DistFromOutside. | |
| bool | Contains (const Double_t *point) const override |
| Contains. | |
| Double_t | Safety (const Double_t *point, Bool_t in=kTRUE) const override |
| Safety. | |
| void | ComputeNormal (const Double_t *point, const Double_t *dir, Double_t *norm) const override |
| ComputeNormal interface. | |
| Double_t | DistFromInside_Loop (const Double_t *point, const Double_t *dir) const |
| trivial (non-BVH) DistFromInside function | |
| Double_t | DistFromOutside_Loop (const Double_t *point, const Double_t *dir) const |
| trivial (non-BVH) DistFromOutside function | |
| bool | Contains_Loop (const Double_t *point) const |
| trivial (non-BVH) Contains | |
| Double_t | Capacity () const override |
| Capacity. | |
Static Public Member Functions | |
| static O2Tessellated * | ImportFromObjFormat (const char *objfile, bool check=false, bool verbose=false) |
| Reader from .obj format. | |
Definition at line 26 of file O2Tessellated.h.
| using o2::base::O2Tessellated::Vertex_t = Tessellated::Vertex_t |
Definition at line 30 of file O2Tessellated.h.
|
inline |
Definition at line 57 of file O2Tessellated.h.
Constructor. In case nfacets is zero, it is user's responsibility to call CloseShape once all faces are defined.
Definition at line 106 of file O2Tessellated.cxx.
Constructor providing directly the array of vertices. Facets have to be added providing vertex indices rather than coordinates.
Definition at line 117 of file O2Tessellated.cxx.
| O2Tessellated::O2Tessellated | ( | TGeoTessellated const & | tsl, |
| bool | check = false |
||
| ) |
Construct from TGeoTessellated.
Definition at line 126 of file O2Tessellated.cxx.
|
inlineoverride |
Definition at line 64 of file O2Tessellated.h.
Adding a triangular facet from vertex positions in absolute coordinates.
Definition at line 188 of file O2Tessellated.cxx.
| bool O2Tessellated::AddFacet | ( | const Vertex_t & | pt0, |
| const Vertex_t & | pt1, | ||
| const Vertex_t & | pt2, | ||
| const Vertex_t & | pt3 | ||
| ) |
Adding a quadrilateral facet from vertex positions in absolute coordinates.
Definition at line 235 of file O2Tessellated.cxx.
Adding a triangular facet from indices of vertices.
Definition at line 216 of file O2Tessellated.cxx.
Adding a quadrilateral facet from indices of vertices.
Definition at line 269 of file O2Tessellated.cxx.
Add a vertex checking for duplicates, returning the vertex index.
Definition at line 148 of file O2Tessellated.cxx.
|
override |
Capacity.
Definition at line 1059 of file O2Tessellated.cxx.
| bool O2Tessellated::CheckClosure | ( | bool | fixFlipped = true, |
| bool | verbose = true |
||
| ) |
Check closure of the solid and check/fix flipped normals.
Definition at line 391 of file O2Tessellated.cxx.
| void O2Tessellated::CloseShape | ( | bool | check = true, |
| bool | fixFlipped = true, |
||
| bool | verbose = true |
||
| ) |
Close the shape: calculate bounding box and compact vertices.
Definition at line 351 of file O2Tessellated.cxx.
|
override |
Compute bounding box.
Definition at line 457 of file O2Tessellated.cxx.
|
override |
ComputeNormal interface.
Definition at line 1359 of file O2Tessellated.cxx.
|
override |
Contains.
Definition at line 1142 of file O2Tessellated.cxx.
| bool O2Tessellated::Contains_Loop | ( | const Double_t * | point | ) | const |
trivial (non-BVH) Contains
Definition at line 1456 of file O2Tessellated.cxx.
Definition at line 87 of file O2Tessellated.h.
|
override |
DistFromOutside.
Definition at line 993 of file O2Tessellated.cxx.
| Double_t O2Tessellated::DistFromInside_Loop | ( | const Double_t * | point, |
| const Double_t * | dir | ||
| ) | const |
trivial (non-BVH) DistFromInside function
Definition at line 1394 of file O2Tessellated.cxx.
|
override |
DistFromOutside.
Definition at line 909 of file O2Tessellated.cxx.
| Double_t O2Tessellated::DistFromOutside_Loop | ( | const Double_t * | point, |
| const Double_t * | dir | ||
| ) | const |
trivial (non-BVH) DistFromOutside function
Definition at line 1425 of file O2Tessellated.cxx.
| bool O2Tessellated::FacetCheck | ( | int | ifacet | ) | const |
Check validity of facet.
Definition at line 321 of file O2Tessellated.cxx.
Compute normal for a given facet.
Definition at line 288 of file O2Tessellated.cxx.
|
inline |
Flip all facets.
Definition at line 104 of file O2Tessellated.h.
|
override |
Fills a static 3D buffer and returns a reference.
Definition at line 593 of file O2Tessellated.cxx.
|
inline |
Definition at line 84 of file O2Tessellated.h.
Returns numbers of vertices, segments and polygons composing the shape mesh.
Definition at line 480 of file O2Tessellated.cxx.
|
inline |
Definition at line 78 of file O2Tessellated.h.
|
inlineoverride |
Definition at line 90 of file O2Tessellated.h.
|
inline |
Definition at line 79 of file O2Tessellated.h.
|
inline |
Definition at line 80 of file O2Tessellated.h.
Definition at line 85 of file O2Tessellated.h.
|
static |
Reader from .obj format.
Reads a single tessellated solid from an .obj file.
Definition at line 624 of file O2Tessellated.cxx.
|
inlineoverride |
Definition at line 91 of file O2Tessellated.h.
|
inline |
Definition at line 81 of file O2Tessellated.h.
|
inline |
Definition at line 82 of file O2Tessellated.h.
|
override |
Creates a TBuffer3D describing this shape. Coordinates are in local reference frame.
Definition at line 491 of file O2Tessellated.cxx.
|
override |
Prints basic info.
Definition at line 507 of file O2Tessellated.cxx.
| void O2Tessellated::ResizeCenter | ( | double | maxsize | ) |
Resize and center the shape in a box of size maxsize.
Resize the shape by scaling vertices within maxsize and center to origin.
Definition at line 570 of file O2Tessellated.cxx.
|
override |
Safety.
Definition at line 1347 of file O2Tessellated.cxx.
|
inlineoverride |
Definition at line 94 of file O2Tessellated.h.
|
override |
Fill tessellated points to an array.
Definition at line 545 of file O2Tessellated.cxx.
Fill tessellated points in float.
Definition at line 557 of file O2Tessellated.cxx.
|
override |
Fills TBuffer3D structure for segments and polygons.
Definition at line 516 of file O2Tessellated.cxx.
|
inlineoverride |
Definition at line 98 of file O2Tessellated.h.