71 Error(
name,
"number of z planes for %s must be at least two !",
name);
178 if ((secNum < 0) || (secNum >=
fNz))
return;
180 fRmin[secNum] = rmin;
181 fRmax[secNum] = rmax;
204 for (
Int_t j = 0; j <
n; j++) {
233 for (i = 0; i <
fNz; i++) {
234 for (j = 0; j <
n; j++) {
239 for (j = 0; j <
n; j++) {
286 b.CheckByteCount(R__s, R__c, TPCON::IsA());
313 if (buffer.
SetRawSizes(nbPnts, 3*nbPnts, nbSegs, 3*nbSegs, nbPols, 6*nbPols)) {
351 for (i = 0; i <
fNz*2; i++) {
353 for (j = 1; j <
n; j++) {
355 buffer.
fSegs[indx++] = indx2+j-1;
356 buffer.
fSegs[indx++] = indx2+j;
360 buffer.
fSegs[indx++] = indx2+j-1;
361 buffer.
fSegs[indx++] = indx2;
366 for (i = 0; i < 2; i++) {
367 indx2 = i*(
fNz-1)*2*
n;
368 for (j = 0; j <
n; j++) {
370 buffer.
fSegs[indx++] = indx2+j;
371 buffer.
fSegs[indx++] = indx2+
n+j;
376 for (i = 0; i < (
fNz-1); i++) {
380 for (j = 0; j <
n; j++) {
381 buffer.
fSegs[indx++] =
c+2;
382 buffer.
fSegs[indx++] = indx2+j;
383 buffer.
fSegs[indx++] = indx2+
n*2+j;
387 for (j = 0; j <
n; j++) {
388 buffer.
fSegs[indx++] =
c+3;
389 buffer.
fSegs[indx++] = indx2+j;
390 buffer.
fSegs[indx++] = indx2+
n*2+j;
397 for (i = 1; i < (
fNz-1); i++) {
398 for (j = 0; j < 2; j++) {
400 buffer.
fSegs[indx++] = 2*i *
n + j*(
n-1);
401 buffer.
fSegs[indx++] = (2*i+1) *
n + j*(
n-1);
411 for (j = 0; j <
n-1; j++) {
412 buffer.
fPols[indx++] =
c+3;
413 buffer.
fPols[indx++] = 4;
415 buffer.
fPols[indx++] =
m+j;
417 buffer.
fPols[indx++] = j;
419 for (j = 0; j <
n-1; j++) {
420 buffer.
fPols[indx++] =
c+3;
421 buffer.
fPols[indx++] = 4;
428 buffer.
fPols[indx++] =
c+3;
429 buffer.
fPols[indx++] = 4;
431 buffer.
fPols[indx++] =
m+j;
433 buffer.
fPols[indx++] = j;
435 buffer.
fPols[indx++] =
c+3;
436 buffer.
fPols[indx++] = 4;
442 for (k = 0; k < (
fNz-1); k++) {
443 for (j = 0; j <
n-1; j++) {
445 buffer.
fPols[indx++] = 4;
446 buffer.
fPols[indx++] = 2*k*
m+j;
448 buffer.
fPols[indx++] = (2*k+2)*
m+j;
451 for (j = 0; j <
n-1; j++) {
452 buffer.
fPols[indx++] =
c+1;
453 buffer.
fPols[indx++] = 4;
454 buffer.
fPols[indx++] = (2*k+1)*
m+j;
456 buffer.
fPols[indx++] = (2*k+3)*
m+j;
462 buffer.
fPols[indx++] = 4;
463 buffer.
fPols[indx++] = 2*k*
m+j;
465 buffer.
fPols[indx++] = (2*k+2)*
m+j;
468 buffer.
fPols[indx++] =
c+1;
469 buffer.
fPols[indx++] = 4;
470 buffer.
fPols[indx++] = (2*k+1)*
m+j;
472 buffer.
fPols[indx++] = (2*k+3)*
m+j;
479 for (k = 0; k < (
fNz-1); k++) {
480 buffer.
fPols[indx++] =
c+2;
481 buffer.
fPols[indx++] = 4;
482 buffer.
fPols[indx++] = k==0 ? indx2 : indx2+2*
fNz*
n+2*(k-1);
483 buffer.
fPols[indx++] = indx2+2*(k+1)*
n;
484 buffer.
fPols[indx++] = indx2+2*
fNz*
n+2*k;
485 buffer.
fPols[indx++] = indx2+(2*k+3)*
n;
487 buffer.
fPols[indx++] =
c+2;
488 buffer.
fPols[indx++] = 4;
489 buffer.
fPols[indx++] = k==0 ? indx2+
n-1 : indx2+2*
fNz*
n+2*(k-1)+1;
490 buffer.
fPols[indx++] = indx2+(2*k+3)*
n+
n-1;
491 buffer.
fPols[indx++] = indx2+2*
fNz*
n+2*k+1;
492 buffer.
fPols[indx++] = indx2+2*(k+1)*
n+
n-1;
494 buffer.
fPols[indx-8] = indx2+
n;
495 buffer.
fPols[indx-2] = indx2+2*
n-1;
Generic 3D primitive description class.
Bool_t SectionsValid(UInt_t mask) const
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.
Buffer base class used for serializing objects.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual void Sizeof3D() const
Return total X3D needed by TNode::ls (when called with option "x")
virtual void SetNumberOfDivisions(Int_t p)
Set number of divisions.
Double_t * fCoTab
Table of sin(fPhi1) .... sin(fPhil+fDphi1)
Float_t fPhi1
Table of cos(fPhi1) .... cos(fPhil+fDphi1)
virtual Int_t GetNumberOfDivisions() const
virtual ~TPCON()
PCON shape default destructor.
TPCON & operator=(const TPCON &)
assignment operator
TPCON()
PCON shape default constructor.
virtual const TBuffer3D & GetBuffer3D(Int_t reqSections) const
Get buffer 3d.
virtual Bool_t SetSegsAndPols(TBuffer3D &buffer) const
Set segments and polygons.
virtual void FillTableOfCoSin(Double_t phi, Double_t angstep, Int_t n) const
Fill the table of cos and sin to prepare drawing.
virtual void DefineSection(Int_t secNum, Float_t z, Float_t rmin, Float_t rmax)
Defines section secNum of the polycone.
virtual void SetPoints(Double_t *points) const
Create PCON points.
virtual void MakeTableOfCoSin() const
Make table of cosine and sine.
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Compute distance from point px,py to a PCON.
This is the base class for all geometry shapes.
TShape & operator=(const TShape &)
assignment operator
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)
static constexpr double pi
static constexpr double pc