library: libGeom #include "TGeoXtru.h" |
Inheritance Chart: | |||||||||||||||||||||
|
protected:
TGeoXtru(const TGeoXtru&) Double_t DistToPlane(Double_t* point, Double_t* dir, Int_t iz, Int_t ivert, Double_t stepmax, Bool_t in) const void GetPlaneNormal(const Double_t* vert, Double_t* norm) const void GetPlaneVertices(Int_t iz, Int_t ivert, Double_t* vert) const Bool_t IsPointInsidePlane(Double_t* point, Double_t* vert, Double_t* norm) const TGeoXtru& operator=(const TGeoXtru&) Double_t SafetyToSector(Double_t* point, Int_t iz, Double_t safmin) void SetIz(Int_t iz) void SetSeg(Int_t iseg) public:
TGeoXtru() TGeoXtru(Int_t nz) TGeoXtru(Double_t* param) virtual ~TGeoXtru() virtual Double_t Capacity() const static TClass* Class() virtual void ComputeBBox() virtual void ComputeNormal(Double_t* point, Double_t* dir, Double_t* norm) virtual Bool_t Contains(Double_t* point) const Bool_t DefinePolygon(Int_t nvert, const Double_t* xv, const Double_t* yv) virtual void DefineSection(Int_t snum, Double_t z, Double_t x0 = 0., Double_t y0 = 0., Double_t scale = 1.) virtual Int_t DistancetoPrimitive(Int_t px, Int_t py) virtual Double_t DistFromInside(Double_t* point, Double_t* dir, Int_t iact = 1, Double_t step = TGeoShape::Big(), Double_t* safe = 0) const virtual Double_t DistFromOutside(Double_t* point, Double_t* dir, Int_t iact = 1, Double_t step = TGeoShape::Big(), Double_t* safe = 0) const virtual const TBuffer3D& GetBuffer3D(Int_t reqSections, Bool_t localFrame) const virtual TGeoShape* GetMakeRuntimeShape(TGeoShape*, TGeoMatrix*) const virtual Int_t GetNmeshVertices() const Int_t GetNvert() const Int_t GetNz() const Double_t GetScale(Int_t i) const Double_t GetX(Int_t i) const Double_t GetXOffset(Int_t i) const Double_t GetY(Int_t i) const Double_t GetYOffset(Int_t i) const Double_t* GetZ() const Double_t GetZ(Int_t ipl) const virtual void InspectShape() const virtual TClass* IsA() const virtual TBuffer3D* MakeBuffer3D() const virtual Double_t Safety(Double_t* point, Bool_t in = kTRUE) const virtual void SavePrimitive(ostream& out, Option_t* option = "") void SetCurrentVertices(Double_t x0, Double_t y0, Double_t scale) void SetCurrentZ(Double_t z, Int_t iz) virtual void SetDimensions(Double_t* param) virtual void SetPoints(Double_t* points) const virtual void SetPoints(Float_t* points) const virtual void SetSegsAndPols(TBuffer3D& buff) const virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Sizeof3D() const virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b) Double_t& Z(Int_t ipl)
protected:
Int_t fNvert number of vertices of the 2D polygon (at least 3) Int_t fNz number of z planes (at least two) Double_t fZcurrent current Z position TGeoPolygon* fPoly polygon defining section shape Double_t* fX [fNvert] X positions for polygon vertices Double_t* fY [fNvert] Y positions for polygon vertices Double_t* fXc [fNvert] current X positions for polygon vertices Double_t* fYc [fNvert] current Y positions for polygon vertices Double_t* fZ [fNz] array of Z planes positions Double_t* fScale [fNz] array of scale factors (for each Z) Double_t* fX0 [fNz] array of X offsets (for each Z) Double_t* fY0 [fNz] array of Y offsets (for each Z) Int_t fSeg !current segment [0,fNvert-1] Int_t fIz !current z plane [0,fNz-1]
Default constructor in GEANT3 style param[0] = nz // number of z planes param[1] = z1 // Z position of first plane param[2] = x1 // X position of first plane param[3] = y1 // Y position of first plane param[4] = scale1 // scale factor for first plane ... param[4*(nz-1]+1] = zn param[4*(nz-1)+2] = xn param[4*(nz-1)+3] = yn param[4*(nz-1)+4] = scalen
compute closest distance from point px,py to each corner
Compute distance to a Xtru lateral surface.
compute distance from inside point to surface of the polycone locate Z segment
compute distance from outside point to surface of the tube Warning("DistFromOutside", "not implemented");
Creates the polygon representing the blueprint of any Xtru section. nvert = number of vertices >2 xv[nvert] = array of X vertex positions yv[nvert] = array of Y vertex positions *NOTE* should be called before DefineSection or ctor with 'param'
defines z position of a section plane, rmin and rmax at this z.
Returns normal vector to the planar quadrilateral defined by vector VERT. The normal points outwards the xtru.
Returns (x,y,z) of 3 vertices of the surface defined by Z sections (iz, iz+1) and polygon vertices (ivert, ivert+1). No range check.
Check if the quadrilateral defined by VERT contains a coplanar POINT.
Creates a TBuffer3D describing *this* shape. Coordinates are in local reference frame.
Compute safety to sector iz, returning also the closest segment index.
computes the closest distance from given point to this shape, according to option. The matching point on the shape is stored in spoint. ---> localize the Z segment
Save a primitive as a C++ statement(s) on output stream "out".
Recompute current section vertices for a given Z position within range of section iz.
Set current vertex coordinates according X0, Y0 and SCALE.
param[0] = nz // number of z planes param[1] = z1 // Z position of first plane param[2] = x1 // X position of first plane param[3] = y1 // Y position of first plane param[4] = scale1 // scale factor for first plane ... param[4*(nz-1]+1] = zn param[4*(nz-1)+2] = xn param[4*(nz-1)+3] = yn param[4*(nz-1)+4] = scalen
/// fill size of this 3-D object / TVirtualGeoPainter *painter = gGeoManager->GetGeomPainter(); / if (!painter) return; / Int_t numPoints = fNz*fNvert; / Int_t numSegs = fNvert*(2*fNz-1); / Int_t numPolys = fNvert*(fNz-1)+2; / painter->AddSize3D(numPoints, numSegs, numPolys);
Fills a static 3D buffer and returns a reference.