87 std::lock_guard<std::mutex> guard(
fMutex);
88 std::vector<ThreadData_t *>::iterator
i =
fThreadData.begin();
102 std::lock_guard<std::mutex> guard(
fMutex);
105 for (
Int_t tid = 0; tid < nthreads; tid++) {
112 fLeft->CreateThreadData(nthreads);
114 fRight->CreateThreadData(nthreads);
183 Error(
"ctor",
"left shape is NULL");
187 Error(
"ctor",
"right shape is NULL");
226 TString sleft, sright, stransf;
229 Error(
"MakeBranch",
"invalid expression");
236 if (stransf.
Length() == 0) {
242 Error(
"MakeBranch",
"transformation %s not found", stransf.
Data());
250 Error(
"MakeBranch",
"shape %s not found", sleft.
Data());
276 if (boolop && (!shape || !shape->
IsValid())) {
277 Error(
"MakeBranch",
"Shape %s not valid", newshape.
Data());
318 left->PaintComposite(
option);
329 right->PaintComposite(
option);
347 if (
fLeft->IsComposite())
349 if (
fRight->IsComposite())
360 Error(
"ReplaceMatrix",
361 "Matrices should not be gGeoIdentity. Use default matrix constructor to represent identities.");
364 if (!mat || !newmat) {
365 Error(
"ReplaceMatrix",
"Matrices should not be null pointers.");
414 for (
Int_t i = 0;
i < 3 * npoints;
i++)
445 Error(
"Paint",
"gPad->GetViewer3D() returned 0, cannot work with composite!\n");
471 Fatal(
"TGeoUnion",
"Unions with a half-space (%s + %s) not allowed", left->GetName(), right->GetName());
487 fLeft->ComputeBBox();
498 for (
i = 0;
i < 8;
i++) {
513 for (
i = 8;
i < 16;
i++) {
532 dz = 0.5 * (zmax - zmin);
533 origin[2] = 0.5 * (zmin + zmax);
542 fLeftMat->MasterToLocal(point, &local[0]);
546 fRightMat->MasterToLocal(point, &local[0]);
547 inside =
fRight->Contains(&local[0]);
557 norm[0] = norm[1] = 0.;
562 fLeftMat->MasterToLocal(point, local);
563 fLeftMat->MasterToLocalVect(dir, ldir);
564 fLeft->ComputeNormal(local, ldir, lnorm);
565 fLeftMat->LocalToMasterVect(lnorm, norm);
571 fRight->ComputeNormal(local, ldir, lnorm);
572 fRightMat->LocalToMasterVect(lnorm, norm);
575 fLeftMat->MasterToLocal(point, local);
576 if (
fLeft->Contains(local)) {
577 fLeftMat->MasterToLocalVect(dir, ldir);
578 fLeft->ComputeNormal(local, ldir, lnorm);
579 fLeftMat->LocalToMasterVect(lnorm, norm);
583 if (
fRight->Contains(local)) {
585 fRight->ComputeNormal(local, ldir, lnorm);
586 fRightMat->LocalToMasterVect(lnorm, norm);
590 local[0] = point[0] + 1E-5 * dir[0];
591 local[1] = point[1] + 1E-5 * dir[1];
592 local[2] = point[2] + 1E-5 * dir[2];
595 local[0] = point[0] - 1E-5 * dir[0];
596 local[1] = point[1] - 1E-5 * dir[1];
597 local[2] = point[2] - 1E-5 * dir[2];
618 if (iact < 3 && safe) {
623 if (iact == 1 && step < *safe)
627 Double_t local[3], local1[3], master[3], ldir[3], rdir[3], pushed[3];
628 memcpy(master, point, 3 *
sizeof(
Double_t));
631 Double_t d1 = 0., d2 = 0., snxt = 0., eps = 0.;
632 fLeftMat->MasterToLocalVect(dir, ldir);
634 fLeftMat->MasterToLocal(point, local);
637 d1 =
fLeft->DistFromInside(local, ldir, 3);
639 memcpy(local1, local, 3 *
sizeof(
Double_t));
643 d2 =
fRight->DistFromInside(local, rdir, 3);
644 if (!(inside1 | inside2)) {
646 d1 =
fLeft->DistFromOutside(local1, ldir, 3);
649 for (
i = 0;
i < 3;
i++)
650 local1[
i] += eps * ldir[
i];
652 d1 =
fLeft->DistFromInside(local1, ldir, 3);
655 d2 =
fRight->DistFromOutside(local, rdir, 3);
658 for (
i = 0;
i < 3;
i++)
659 local[
i] += eps * rdir[
i];
661 d2 =
fRight->DistFromInside(local, rdir, 3);
666 while (inside1 || inside2) {
667 if (inside1 && inside2) {
673 for (
i = 0;
i < 3;
i++)
674 master[
i] += d1 * dir[
i];
677 inside2 =
fRight->Contains(local);
680 d2 =
fRight->DistFromInside(local, rdir, 3);
688 for (
i = 0;
i < 3;
i++)
689 master[
i] += d2 * dir[
i];
691 fLeftMat->MasterToLocal(master, local);
692 inside1 =
fLeft->Contains(local);
695 d1 =
fLeft->DistFromInside(local, ldir, 3);
705 for (
i = 0;
i < 3;
i++) {
706 master[
i] += d1 * dir[
i];
711 inside2 =
fRight->Contains(local);
714 d2 =
fRight->DistFromInside(local, rdir, 3);
724 for (
i = 0;
i < 3;
i++) {
725 master[
i] += d2 * dir[
i];
729 fLeftMat->MasterToLocal(pushed, local);
730 inside1 =
fLeft->Contains(local);
733 d1 =
fLeft->DistFromInside(local, ldir, 3);
748 if (iact < 3 && safe) {
753 if (iact == 1 && step < *safe)
757 Double_t local[3], ldir[3], rdir[3];
759 fLeftMat->MasterToLocal(point, &local[0]);
760 fLeftMat->MasterToLocalVect(dir, &ldir[0]);
761 fRightMat->MasterToLocalVect(dir, &rdir[0]);
762 d1 =
fLeft->DistFromOutside(&local[0], &ldir[0], iact, step, safe);
763 fRightMat->MasterToLocal(point, &local[0]);
764 d2 =
fRight->DistFromOutside(&local[0], &rdir[0], iact, step, safe);
788 fLeft->SetPoints(points1);
792 fRight->SetPoints(points2);
799 if (!
fRight->Contains(point))
802 for (
Int_t i = 0;
i < nright;
i++) {
807 if (!
fLeft->Contains(point))
825 fLeftMat->MasterToLocal(point, local1);
829 Bool_t intrue = in1 | in2;
849 out <<
" pBoolNode = new TGeoUnion(";
850 out <<
fLeft->GetPointerName() <<
",";
851 out <<
fRight->GetPointerName() <<
",";
853 out <<
fLeftMat->GetPointerName() <<
",";
857 out <<
fRightMat->GetPointerName() <<
");" << std::endl;
859 out <<
"0);" << std::endl;
888 Error(
"Paint",
"gPad->GetViewer3D() returned 0, cannot work with composite!\n");
914 Fatal(
"TGeoSubstraction",
"Subtractions from a half-space (%s) not allowed", left->GetName());
930 if (
box->IsNullBox())
931 fLeft->ComputeBBox();
938 box->SetBoxPoints(&vert[0]);
939 for (
i = 0;
i < 8;
i++) {
958 dz = 0.5 * (zmax - zmin);
959 origin[2] = 0.5 * (zmin + zmax);
968 norm[0] = norm[1] = 0.;
970 Double_t local[3], ldir[3], lnorm[3];
972 fLeftMat->MasterToLocal(point, local);
973 fLeftMat->MasterToLocalVect(dir, ldir);
974 fLeft->ComputeNormal(local, ldir, lnorm);
975 fLeftMat->LocalToMasterVect(lnorm, norm);
981 fRight->ComputeNormal(local, ldir, lnorm);
982 fRightMat->LocalToMasterVect(lnorm, norm);
986 if (
fRight->Contains(local)) {
988 fRight->ComputeNormal(local, ldir, lnorm);
989 fRightMat->LocalToMasterVect(lnorm, norm);
992 fLeftMat->MasterToLocal(point, local);
993 if (!
fLeft->Contains(local)) {
994 fLeftMat->MasterToLocalVect(dir, ldir);
995 fLeft->ComputeNormal(local, ldir, lnorm);
996 fLeftMat->LocalToMasterVect(lnorm, norm);
1000 local[0] = point[0] + 1E-5 * dir[0];
1001 local[1] = point[1] + 1E-5 * dir[1];
1002 local[2] = point[2] + 1E-5 * dir[2];
1004 local[0] = point[0] - 1E-5 * dir[0];
1005 local[1] = point[1] - 1E-5 * dir[1];
1006 local[2] = point[2] - 1E-5 * dir[2];
1019 fLeftMat->MasterToLocal(point, &local[0]);
1023 fRightMat->MasterToLocal(point, &local[0]);
1024 inside = !
fRight->Contains(&local[0]);
1042 if (iact < 3 && safe) {
1047 if (iact == 1 && step < *safe)
1051 Double_t local[3], ldir[3], rdir[3];
1053 fLeftMat->MasterToLocal(point, &local[0]);
1054 fLeftMat->MasterToLocalVect(dir, &ldir[0]);
1055 fRightMat->MasterToLocalVect(dir, &rdir[0]);
1056 d1 =
fLeft->DistFromInside(&local[0], &ldir[0], iact, step, safe);
1057 fRightMat->MasterToLocal(point, &local[0]);
1058 d2 =
fRight->DistFromOutside(&local[0], &rdir[0], iact, step, safe);
1075 if (iact < 3 && safe) {
1080 if (iact == 1 && step < *safe)
1084 Double_t local[3], master[3], ldir[3], rdir[3];
1085 memcpy(&master[0], point, 3 *
sizeof(
Double_t));
1088 fRightMat->MasterToLocal(point, &local[0]);
1089 fLeftMat->MasterToLocalVect(dir, &ldir[0]);
1090 fRightMat->MasterToLocalVect(dir, &rdir[0]);
1098 d1 =
fRight->DistFromInside(&local[0], &rdir[0], iact, step, safe);
1100 for (
i = 0;
i < 3;
i++)
1101 master[
i] += (d1 + 1E-8) * dir[
i];
1104 fLeftMat->MasterToLocal(&master[0], &local[0]);
1105 if (
fLeft->Contains(&local[0]))
1110 fLeftMat->MasterToLocal(&master[0], &local[0]);
1111 d2 =
fLeft->DistFromOutside(&local[0], &ldir[0], iact, step, safe);
1115 fRightMat->MasterToLocal(&master[0], &local[0]);
1116 d1 =
fRight->DistFromOutside(&local[0], &rdir[0], iact, step, safe);
1123 for (
i = 0;
i < 3;
i++)
1124 master[
i] += (d1 + 1E-8) * dir[
i];
1127 fRightMat->MasterToLocal(&master[0], &local[0]);
1146 fLeft->SetPoints(points1);
1147 for (
Int_t i = 0;
i < nleft;
i++) {
1152 if (!
fRight->Contains(point))
1156 fRight->SetPoints(points2);
1157 for (
Int_t i = 0;
i < nright;
i++) {
1162 if (
fLeft->Contains(point))
1180 fLeftMat->MasterToLocal(point, local1);
1182 fRightMat->MasterToLocal(point, local2);
1184 Bool_t intrue = in1 && (!in2);
1204 out <<
" pBoolNode = new TGeoSubtraction(";
1205 out <<
fLeft->GetPointerName() <<
",";
1206 out <<
fRight->GetPointerName() <<
",";
1208 out <<
fLeftMat->GetPointerName() <<
",";
1212 out <<
fRightMat->GetPointerName() <<
");" << std::endl;
1214 out <<
"0);" << std::endl;
1243 Error(
"Paint",
"gPad->GetViewer3D() returned 0, cannot work with composite!\n");
1271 Fatal(
"ctor",
"cannot intersect two half-spaces: %s * %s", left->
GetName(), right->
GetName());
1290 Double_t xmin1, xmax1, ymin1, ymax1, zmin1, zmax1;
1291 Double_t xmin2, xmax2, ymin2, ymax2, zmin2, zmax2;
1292 xmin1 = ymin1 = zmin1 = xmin2 = ymin2 = zmin2 =
TGeoShape::Big();
1293 xmax1 = ymax1 = zmax1 = xmax2 = ymax2 = zmax2 = -
TGeoShape::Big();
1296 fLeft->ComputeBBox();
1298 for (
i = 0;
i < 8;
i++) {
1318 for (
i = 8;
i < 16;
i++) {
1335 dx = 0.5 * (xmax2 - xmin2);
1336 origin[0] = 0.5 * (xmax2 + xmin2);
1337 dy = 0.5 * (ymax2 - ymin2);
1338 origin[1] = 0.5 * (ymax2 + ymin2);
1339 dz = 0.5 * (zmax2 - zmin2);
1340 origin[2] = 0.5 * (zmax2 + zmin2);
1344 dx = 0.5 * (xmax1 - xmin1);
1345 origin[0] = 0.5 * (xmax1 + xmin1);
1346 dy = 0.5 * (ymax1 - ymin1);
1347 origin[1] = 0.5 * (ymax1 + ymin1);
1348 dz = 0.5 * (zmax1 - zmin1);
1349 origin[2] = 0.5 * (zmax1 + zmin1);
1360 Warning(
"ComputeBBox",
"shapes %s and %s do not intersect",
fLeft->GetName(),
fRight->GetName());
1362 memset(origin, 0, 3 *
sizeof(
Double_t));
1365 dx = 0.5 * (sort[isort[2]] - sort[isort[1]]);
1366 origin[0] = 0.5 * (sort[isort[1]] + sort[isort[2]]);
1373 Warning(
"ComputeBBox",
"shapes %s and %s do not intersect",
fLeft->GetName(),
fRight->GetName());
1375 memset(origin, 0, 3 *
sizeof(
Double_t));
1378 dy = 0.5 * (sort[isort[2]] - sort[isort[1]]);
1379 origin[1] = 0.5 * (sort[isort[1]] + sort[isort[2]]);
1386 Warning(
"ComputeBBox",
"shapes %s and %s do not intersect",
fLeft->GetName(),
fRight->GetName());
1388 memset(origin, 0, 3 *
sizeof(
Double_t));
1391 dz = 0.5 * (sort[isort[2]] - sort[isort[1]]);
1392 origin[2] = 0.5 * (sort[isort[1]] + sort[isort[2]]);
1401 Double_t local[3], ldir[3], lnorm[3];
1402 norm[0] = norm[1] = 0.;
1405 fLeftMat->MasterToLocal(point, local);
1406 fLeftMat->MasterToLocalVect(dir, ldir);
1407 fLeft->ComputeNormal(local, ldir, lnorm);
1408 fLeftMat->LocalToMasterVect(lnorm, norm);
1413 fRightMat->MasterToLocalVect(dir, ldir);
1414 fRight->ComputeNormal(local, ldir, lnorm);
1415 fRightMat->LocalToMasterVect(lnorm, norm);
1418 fLeftMat->MasterToLocal(point, local);
1419 if (!
fLeft->Contains(local)) {
1420 fLeftMat->MasterToLocalVect(dir, ldir);
1421 fLeft->ComputeNormal(local, ldir, lnorm);
1422 fLeftMat->LocalToMasterVect(lnorm, norm);
1426 if (!
fRight->Contains(local)) {
1427 fRightMat->MasterToLocalVect(dir, ldir);
1428 fRight->ComputeNormal(local, ldir, lnorm);
1429 fRightMat->LocalToMasterVect(lnorm, norm);
1433 local[0] = point[0] + 1E-5 * dir[0];
1434 local[1] = point[1] + 1E-5 * dir[1];
1435 local[2] = point[2] + 1E-5 * dir[2];
1437 local[0] = point[0] - 1E-5 * dir[0];
1438 local[1] = point[1] - 1E-5 * dir[1];
1439 local[2] = point[2] - 1E-5 * dir[2];
1452 fLeftMat->MasterToLocal(point, &local[0]);
1456 fRightMat->MasterToLocal(point, &local[0]);
1457 inside =
fRight->Contains(&local[0]);
1475 if (iact < 3 && safe) {
1480 if (iact == 1 && step < *safe)
1484 Double_t local[3], ldir[3], rdir[3];
1486 fLeftMat->MasterToLocal(point, &local[0]);
1487 fLeftMat->MasterToLocalVect(dir, &ldir[0]);
1488 fRightMat->MasterToLocalVect(dir, &rdir[0]);
1489 d1 =
fLeft->DistFromInside(&local[0], &ldir[0], iact, step, safe);
1490 fRightMat->MasterToLocal(point, &local[0]);
1491 d2 =
fRight->DistFromInside(&local[0], &rdir[0], iact, step, safe);
1509 if (iact < 3 && safe) {
1514 if (iact == 1 && step < *safe)
1518 Double_t lpt[3], rpt[3], master[3], ldir[3], rdir[3];
1519 memcpy(master, point, 3 *
sizeof(
Double_t));
1523 fLeftMat->MasterToLocal(point, lpt);
1525 fLeftMat->MasterToLocalVect(dir, ldir);
1526 fRightMat->MasterToLocalVect(dir, rdir);
1531 if (inleft && inright) {
1534 d1 =
fLeft->DistFromInside(lpt, ldir, 3);
1535 d2 =
fRight->DistFromInside(rpt, rdir, 3);
1540 if (inleft && inright)
1547 d1 =
fLeft->DistFromOutside(lpt, ldir, 3);
1553 d2 =
fRight->DistFromOutside(rpt, rdir, 3);
1564 for (
i = 0;
i < 3;
i++)
1565 master[
i] += d1 * dir[
i];
1568 for (
i = 0;
i < 3;
i++)
1569 rpt[
i] += tol * rdir[
i];
1571 inright =
fRight->Contains(rpt);
1580 for (
i = 0;
i < 3;
i++)
1581 master[
i] += d2 * dir[
i];
1582 fLeftMat->MasterToLocal(master, lpt);
1584 for (
i = 0;
i < 3;
i++)
1585 lpt[
i] += tol * ldir[
i];
1587 inleft =
fLeft->Contains(lpt);
1610 fLeft->SetPoints(points1);
1611 for (
Int_t i = 0;
i < nleft;
i++) {
1616 if (
fRight->Contains(point))
1620 fRight->SetPoints(points2);
1621 for (
Int_t i = 0;
i < nright;
i++) {
1626 if (
fLeft->Contains(point))
1644 fLeftMat->MasterToLocal(point, local1);
1646 fRightMat->MasterToLocal(point, local2);
1648 Bool_t intrue = in1 & in2;
1668 out <<
" pBoolNode = new TGeoIntersection(";
1669 out <<
fLeft->GetPointerName() <<
",";
1670 out <<
fRight->GetPointerName() <<
",";
1672 out <<
fLeftMat->GetPointerName() <<
",";
1676 out <<
fRightMat->GetPointerName() <<
");" << std::endl;
1678 out <<
"0);" << std::endl;
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t sel
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t points
R__EXTERN TGeoManager * gGeoManager
R__EXTERN TGeoIdentity * gGeoIdentity
Generic 3D primitive description class.
Base class for Boolean operations between two shapes.
virtual void Sizeof3D() const
Register size of this 3D object.
Bool_t MakeBranch(const char *expr, Bool_t left)
Mutex for thread data access.
void ClearThreadData() const
std::vector< ThreadData_t * > fThreadData
array of mesh points
~TGeoBoolNode() override
Destructor.
Bool_t ReplaceMatrix(TGeoMatrix *mat, TGeoMatrix *newmat)
Replace one of the matrices.
void AssignPoints(Int_t npoints, Double_t *points)
Set fPoints array.
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a primitive as a C++ statement(s) on output stream "out".
void CreateThreadData(Int_t nthreads)
Create thread data for n threads max.
void Paint(Option_t *option) override
Special schema for feeding the 3D buffers to the painter client.
TGeoBoolNode(const TGeoBoolNode &)=delete
virtual void SetPoints(Double_t *points) const
Fill buffer with shape vertices.
Int_t fThreadSize
Navigation data per thread.
std::mutex fMutex
Size for the navigation data array.
void RegisterMatrices()
Register all matrices of the boolean node and descendents.
virtual Int_t GetNpoints()=0
Double_t * fPoints
number of points on the mesh
TGeoBoolNode()
Default constructor.
ThreadData_t & GetThreadData() const
void SetSelected(Int_t sel)
Set the selected branch.
Composite shapes are Boolean combinations of two or more shape components.
Matrix class used for computing global transformations Should NOT be used for node definition.
void Multiply(const TGeoMatrix *right)
multiply to the right with an other transformation if right is identity matrix, just return
Int_t DistanceToPrimitive(Int_t px, Int_t py) override
Compute minimum distance to shape vertices.
TGeoBoolNode * MakeClone() const override
Make a clone of this. Pointers are preserved.
TGeoIntersection()
Default constructor.
void Sizeof3D() const override
Register 3D size of this shape.
void ComputeBBox(Double_t &dx, Double_t &dy, Double_t &dz, Double_t *origin) override
Compute bounding box corresponding to a intersection of two shapes.
Double_t DistFromOutside(const Double_t *point, const Double_t *dir, Int_t iact=1, Double_t step=0, Double_t *safe=nullptr) const override
Compute distance from a given point outside to the shape.
Double_t Safety(const Double_t *point, Bool_t in=kTRUE) const override
Compute safety distance for a union node;.
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a primitive as a C++ statement(s) on output stream "out".
Double_t DistFromInside(const Double_t *point, const Double_t *dir, Int_t iact=1, Double_t step=0, Double_t *safe=nullptr) const override
Compute distance from a given point inside to the shape boundary.
void Paint(Option_t *option) override
Paint method.
~TGeoIntersection() override
Destructor — deletion of components handled by TGeoManager class.
void ComputeNormal(const Double_t *point, const Double_t *dir, Double_t *norm) override
Normal computation in POINT. The orientation is chosen so that DIR.dot.NORM>0.
Bool_t Contains(const Double_t *point) const override
Find if a intersection of two shapes contains a given point.
Int_t GetNpoints() override
Returns number of vertices for the composite shape described by this intersection.
static Int_t Parse(const char *expr, TString &expr1, TString &expr2, TString &expr3)
Parse a string boolean expression and do a syntax check.
static Int_t ThreadId()
Translates the current thread id to an ordinal number.
Geometrical transformation package.
Base abstract class for all shapes.
const char * GetName() const override
Get the shape name.
static TGeoMatrix * GetTransform()
Returns current transformation matrix that applies to shape.
static Double_t Tolerance()
Bool_t TestShapeBit(UInt_t f) const
TGeoSubtraction()
Default constructor.
void ComputeBBox(Double_t &dx, Double_t &dy, Double_t &dz, Double_t *origin) override
Compute bounding box corresponding to a subtraction of two shapes.
~TGeoSubtraction() override
Destructor — deletion of components handled by TGeoManager class.
Double_t Safety(const Double_t *point, Bool_t in=kTRUE) const override
Compute safety distance for a union node;.
void ComputeNormal(const Double_t *point, const Double_t *dir, Double_t *norm) override
Normal computation in POINT. The orientation is chosen so that DIR.dot.NORM>0.
TGeoBoolNode * MakeClone() const override
Make a clone of this. Pointers are preserved.
Double_t DistFromOutside(const Double_t *point, const Double_t *dir, Int_t iact=1, Double_t step=0, Double_t *safe=nullptr) const override
Compute distance from a given point outside to the shape.
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a primitive as a C++ statement(s) on output stream "out".
Bool_t Contains(const Double_t *point) const override
Find if a subtraction of two shapes contains a given point.
void Sizeof3D() const override
Register 3D size of this shape.
Double_t DistFromInside(const Double_t *point, const Double_t *dir, Int_t iact=1, Double_t step=0, Double_t *safe=nullptr) const override
Compute distance from a given point inside to the shape boundary.
void Paint(Option_t *option) override
Paint method.
Int_t DistanceToPrimitive(Int_t px, Int_t py) override
Compute minimum distance to shape vertices.
Int_t GetNpoints() override
Returns number of vertices for the composite shape described by this subtraction.
Int_t DistanceToPrimitive(Int_t px, Int_t py) override
Compute minimum distance to shape vertices.
TGeoBoolNode * MakeClone() const override
Make a clone of this. Pointers are preserved.
void ComputeBBox(Double_t &dx, Double_t &dy, Double_t &dz, Double_t *origin) override
Compute bounding box corresponding to a union of two shapes.
Int_t GetNpoints() override
Returns number of vertices for the composite shape described by this union.
Double_t DistFromOutside(const Double_t *point, const Double_t *dir, Int_t iact=1, Double_t step=0, Double_t *safe=nullptr) const override
Compute distance from a given outside point to the shape.
Bool_t Contains(const Double_t *point) const override
Find if a union of two shapes contains a given point.
Double_t Safety(const Double_t *point, Bool_t in=kTRUE) const override
Compute safety distance for a union node;.
Double_t DistFromInside(const Double_t *point, const Double_t *dir, Int_t iact=1, Double_t step=0, Double_t *safe=nullptr) const override
Computes distance from a given point inside the shape to its boundary.
~TGeoUnion() override
Destructor — deletion of components handled by TGeoManager class.
TGeoUnion()
Default constructor.
void ComputeNormal(const Double_t *point, const Double_t *dir, Double_t *norm) override
Normal computation in POINT. The orientation is chosen so that DIR.dot.NORM>0.
void Paint(Option_t *option) override
Paint method.
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a primitive as a C++ statement(s) on output stream "out".
void Sizeof3D() const override
Register 3D size of this shape.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual void Fatal(const char *method, const char *msgfmt,...) const
Issue fatal error message.
const char * Data() const
Abstract 3D shapes viewer.
virtual void AddCompositeOp(UInt_t operation)=0
virtual Int_t AddObject(const TBuffer3D &buffer, Bool_t *addChildren=nullptr)=0
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Short_t Max(Short_t a, Short_t b)
Returns the largest of a and b.
Short_t Min(Short_t a, Short_t b)
Returns the smallest of a and b.
void Sort(Index n, const Element *a, Index *index, Bool_t down=kTRUE)
Sort the n elements of the array a of generic templated type Element.
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.
ThreadData_t()
Constructor.
~ThreadData_t()
Destructor.