7#ifndef G4OCCT_TGeoOCCTSolid_hh
8#define G4OCCT_TGeoOCCTSolid_hh
10#ifndef G4OCCT_WITH_ROOT_TGEO_SUPPORT
11#error "G4OCCT/TGeoOCCTSolid.hh requires BUILD_ROOT_TGEO_SUPPORT=ON when G4OCCT is built."
29class TGeoOCCTSolidBridge;
56 void ComputeNormal(
const Double_t* point,
const Double_t* dir, Double_t* norm)
const override;
57 Bool_t
Contains(
const Double_t* point)
const override;
58 Bool_t
CouldBeCrossed(
const Double_t* point,
const Double_t* dir)
const override;
60 Double_t
DistFromInside(
const Double_t* point,
const Double_t* dir, Int_t iact = 1,
61 Double_t step = TGeoShape::Big(),
62 Double_t* safe =
nullptr)
const override;
63 Double_t
DistFromOutside(
const Double_t* point,
const Double_t* dir, Int_t iact = 1,
64 Double_t step = TGeoShape::Big(),
65 Double_t* safe =
nullptr)
const override;
66 TGeoVolume*
Divide(TGeoVolume* voldiv,
const char* divname, Int_t iaxis, Int_t ndiv,
67 Double_t start, Double_t step)
override;
68 const char*
GetAxisName(Int_t iaxis)
const override;
69 Double_t
GetAxisRange(Int_t iaxis, Double_t& xlo, Double_t& xhi)
const override;
71 const TBuffer3D&
GetBuffer3D(Int_t reqSections, Bool_t localFrame)
const override;
74 Int_t
GetFittingBox(
const TGeoBBox* parambox, TGeoMatrix* mat, Double_t& dx, Double_t& dy,
75 Double_t& dz)
const override;
76 void GetMeshNumbers(Int_t& nvert, Int_t& nsegs, Int_t& npols)
const override;
82 Double_t
Safety(
const Double_t* point, Bool_t in = kTRUE)
const override;
84 void SetPoints(Double_t* points)
const override;
85 void SetPoints(Float_t* points)
const override;
93 TGeoBBox BuildBBoxHelper()
const;
94 void EnsureDisplayHelper()
const;
96 std::unique_ptr<g4occt::detail::TGeoOCCTSolidBridge> fBridge;
97 mutable std::unique_ptr<TGeoTessellated> fDisplayHelper;
98 mutable std::uint64_t fDisplayGeneration{std::numeric_limits<std::uint64_t>::max()};
ROOT/TGeo adapter backed by the shared G4OCCT solid-query kernel.
Double_t Safety(const Double_t *point, Bool_t in=kTRUE) const override
void ComputeNormal(const Double_t *point, const Double_t *dir, Double_t *norm) const override
void SetDimensions(Double_t *param) override
Int_t GetFittingBox(const TGeoBBox *parambox, TGeoMatrix *mat, Double_t &dx, Double_t &dy, Double_t &dz) const override
TGeoShape * GetMakeRuntimeShape(TGeoShape *mother, TGeoMatrix *mat) const override
void SetSegsAndPols(TBuffer3D &buff) const override
Bool_t CouldBeCrossed(const Double_t *point, const Double_t *dir) const override
const TopoDS_Shape & GetOCCTShape() const
Int_t DistancetoPrimitive(Int_t px, Int_t py) override
~TGeoOCCTSolid() override
TGeoOCCTSolid & operator=(const TGeoOCCTSolid &)=delete
Bool_t IsValidBox() const override
Int_t GetByteCount() const override
TGeoVolume * Divide(TGeoVolume *voldiv, const char *divname, Int_t iaxis, Int_t ndiv, Double_t start, Double_t step) override
const TBuffer3D & GetBuffer3D(Int_t reqSections, Bool_t localFrame) const override
Bool_t GetPointsOnSegments(Int_t npoints, Double_t *array) const override
void SetOCCTShape(const TopoDS_Shape &shape)
Double_t Capacity() const override
void ComputeBBox() override
TBuffer3D * MakeBuffer3D() const override
void InspectShape() const override
Double_t GetAxisRange(Int_t iaxis, Double_t &xlo, Double_t &xhi) const override
Bool_t IsCylType() const override
Bool_t Contains(const Double_t *point) const override
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
void SetPoints(Double_t *points) const override
static TGeoOCCTSolid * FromSTEP(const char *name, const std::string &path)
void GetBoundingCylinder(Double_t *param) const override
const char * GetAxisName(Int_t iaxis) const override
void Sizeof3D() const override
TGeoOCCTSolid(const TGeoOCCTSolid &)=delete
void GetMeshNumbers(Int_t &nvert, Int_t &nsegs, Int_t &npols) const override
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