92 Error(
name,
"number of x-y points for %s must be at least three!",
name);
96 Error(
name,
"number of z points for %s must be at least two!",
name);
133 xtru.TXTRU::Copy(*
this);
148 if (
fZ)
delete []
fZ;
170 rhs.TXTRU::Copy(*
this);
180 auto &
tgt =
static_cast<TXTRU &
>(obj);
182 delete []
tgt.fXvtx;
tgt.fXvtx =
nullptr;
183 delete []
tgt.fYvtx;
tgt.fYvtx =
nullptr;
184 delete []
tgt.fZ;
tgt.fZ =
nullptr;
185 delete []
tgt.fScale;
tgt.fScale =
nullptr;
186 delete []
tgt.fX0;
tgt.fX0 =
nullptr;
187 delete []
tgt.fY0;
tgt.fY0 =
nullptr;
325 if ((
n < 0) || (
n >=
fNxy)) {
336 if ((
n < 0) || (
n >=
fNxy)) {
347 if ((
n < 0) || (
n >=
fNz)) {
358 if ((
n < 0) || (
n >=
fNz)) {
369 if ((
n < 0) || (
n >=
fNz)) {
380 if ((
n < 0) || (
n >=
fNz)) {
399 printf(
"TXTRU %s Nxy=%d [of %d] Nz=%d [of %d] Option=%s\n",
402 const char *shape =
nullptr;
403 const char *
zorder =
nullptr;
408 case kConvexCCW: shape =
"Convex CCW ";
break;
409 case kConvexCW: shape =
"Convex CW ";
break;
411 case kConcaveCW: shape =
"Concave CW ";
break;
435 const char *
name =
nullptr;
458 if (i%6==5)
printf(
"\n ");
485 for (i=0; i<
fNz; i++) {
528 <<
" TXTRU::SplitConcavePolygon is not yet implemented" << std::endl;
586 }
else if (
xprod < 0) {
635 }
else if (
iz==
fNz-1) {
644 }
else if (
xprod < 0) {
680 std::cout <<
"TXTRU::DumpPoints - " <<
npoints <<
" points" << std::endl;
697 std::cout <<
"TXTRU::DumpSegments - " <<
nsegments <<
" segments" << std::endl;
714 std::cout <<
"TXTRU::DumpPolygons - " <<
npolygons <<
" polygons" << std::endl;
722 std::cout <<
" [" << std::setw(4) <<
ipoly <<
"] icol " << std::setw(3) <<
icol
723 <<
" nseg " << std::setw(3) <<
nseg <<
" (";
732 std::cout <<
" buffer size " <<
buffsize <<
" last used " << --
ioff << std::endl;
773 for (i=0; i<
fNz; i++) {
784 for (i=0; i<
fNz-1; i++) {
800 for (i=0; i<
fNz-1; i++) {
815 for (
j =
fNxy - 1;
j >= 0; --
j) {
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
winID h TVirtualViewer3D TVirtualGLPainter p
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 SetSectionsValid(UInt_t mask)
Bool_t SetRawSizes(UInt_t reqPnts, UInt_t reqPntsCapacity, UInt_t reqSegs, UInt_t reqSegsCapacity, UInt_t reqPols, UInt_t reqPolsCapacity)
Set kRaw tessellation section of buffer with supplied sizes.
const char * GetName() const override
Returns name of object.
Mother of all ROOT objects.
virtual void Copy(TObject &object) const
Copy this to obj.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
This is the base class for all geometry shapes.
Int_t GetBasicColor() const
Get basic color.
Int_t ShapeDistancetoPrimitive(Int_t numPoints, Int_t px, Int_t py)
Distance to primitive.
virtual void FillBuffer3D(TBuffer3D &buffer, Int_t reqSections) const
We have to set kRawSize (unless already done) to allocate buffer space before kRaw can be filled.
void TransformPoints(Double_t *points, UInt_t NbPnts) const
Transform points (LocalToMaster)
void ToLower()
Change string to lower-case.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
void CheckOrdering()
Determine ordering over which to process points, segments, surfaces so that they render correctly.
virtual void DefineVertex(Int_t pointNum, Float_t x, Float_t y)
Set vertex point ipt to (x,y) expand size of array if necessary.
void SplitConcavePolygon(Bool_t split=kTRUE)
(Dis)Enable the splitting of concave polygon outlines into multiple convex polygons.
virtual Float_t GetSectionX0(Int_t secNum) const
Return x0 shift of a z section.
void DumpSegments(int nsegments, int *segbuff) const
Dump the segment info for visual inspection.
TXTRU & operator=(const TXTRU &rhs)
Deep assignment operator.
Int_t DistancetoPrimitive(Int_t px, Int_t py) override
Compute the distance from point px,py to a TXTRU by calculating the closest approach to each corner.
virtual Float_t GetOutlinePointX(Int_t pointNum) const
Return x coordinate of a vertex point.
virtual Float_t GetSectionScale(Int_t secNum) const
Return scale factor for a z section.
virtual Float_t GetSectionY0(Int_t secNum) const
Return y0 shift of a z section.
void DumpPolygons(int npolygons, int *polybuff, int buffsize) const
Dump the derived polygon info for visual inspection.
void Copy(TObject &xtru) const override
TXTRU Copy method.
void DumpPoints(int npoints, float *pointbuff) const
Dump the vertex points for visual inspection.
virtual void TruncateNxy(Int_t npts)
Truncate the vertex list.
void Print(Option_t *option="") const override
Dump the info of this TXTRU shape Option:
virtual Float_t GetSectionZ(Int_t secNum) const
Return z of a z section.
const TBuffer3D & GetBuffer3D(Int_t) const override
Get buffer 3d.
virtual void DefineSection(Int_t secNum, Float_t z, Float_t scale=1., Float_t x0=0., Float_t y0=0.)
Set z section iz information expand size of array if necessary.
void SetPoints(Double_t *points) const override
Create TXTRU points in buffer order as expected by other methods (counterclockwise xy,...
void Sizeof3D() const override
Return total X3D needed by TNode::ls (when called with option "x")
TXTRU()
TXTRU shape - default constructor.
~TXTRU() override
TXTRU destructor deallocates arrays.
virtual void TruncateNz(Int_t npts)
Truncate the z section list.
virtual Float_t GetOutlinePointY(Int_t pointNum) const
Return y coordinate of a vertex point.
Short_t Max(Short_t a, Short_t b)
Returns the largest of a and b.