69 Error(
name,
"number of z planes for %s must be at least two !",
name);
176 if ((secNum < 0) || (secNum >=
fNz))
return;
178 fRmin[secNum] = rmin;
179 fRmax[secNum] = rmax;
202 for (
Int_t j = 0; j <
n; j++) {
231 for (i = 0; i <
fNz; i++) {
232 for (j = 0; j <
n; j++) {
237 for (j = 0; j <
n; j++) {
269 b.ReadClassBuffer(TPCON::Class(),
this, R__v, R__s, R__c);
284 b.CheckByteCount(R__s, R__c, TPCON::IsA());
288 b.WriteClassBuffer(TPCON::Class(),
this);
311 if (buffer.
SetRawSizes(nbPnts, 3*nbPnts, nbSegs, 3*nbSegs, nbPols, 6*nbPols)) {
349 for (i = 0; i <
fNz*2; i++) {
351 for (j = 1; j <
n; j++) {
353 buffer.
fSegs[indx++] = indx2+j-1;
354 buffer.
fSegs[indx++] = indx2+j;
358 buffer.
fSegs[indx++] = indx2+j-1;
359 buffer.
fSegs[indx++] = indx2;
364 for (i = 0; i < 2; i++) {
365 indx2 = i*(
fNz-1)*2*
n;
366 for (j = 0; j <
n; j++) {
368 buffer.
fSegs[indx++] = indx2+j;
369 buffer.
fSegs[indx++] = indx2+
n+j;
374 for (i = 0; i < (
fNz-1); i++) {
378 for (j = 0; j <
n; j++) {
379 buffer.
fSegs[indx++] =
c+2;
380 buffer.
fSegs[indx++] = indx2+j;
381 buffer.
fSegs[indx++] = indx2+
n*2+j;
385 for (j = 0; j <
n; j++) {
386 buffer.
fSegs[indx++] =
c+3;
387 buffer.
fSegs[indx++] = indx2+j;
388 buffer.
fSegs[indx++] = indx2+
n*2+j;
395 for (i = 1; i < (
fNz-1); i++) {
396 for (j = 0; j < 2; j++) {
398 buffer.
fSegs[indx++] = 2*i *
n + j*(
n-1);
399 buffer.
fSegs[indx++] = (2*i+1) *
n + j*(
n-1);
409 for (j = 0; j <
n-1; j++) {
410 buffer.
fPols[indx++] =
c+3;
411 buffer.
fPols[indx++] = 4;
413 buffer.
fPols[indx++] =
m+j;
415 buffer.
fPols[indx++] = j;
417 for (j = 0; j <
n-1; j++) {
418 buffer.
fPols[indx++] =
c+3;
419 buffer.
fPols[indx++] = 4;
426 buffer.
fPols[indx++] =
c+3;
427 buffer.
fPols[indx++] = 4;
429 buffer.
fPols[indx++] =
m+j;
431 buffer.
fPols[indx++] = j;
433 buffer.
fPols[indx++] =
c+3;
434 buffer.
fPols[indx++] = 4;
440 for (k = 0; k < (
fNz-1); k++) {
441 for (j = 0; j <
n-1; j++) {
443 buffer.
fPols[indx++] = 4;
444 buffer.
fPols[indx++] = 2*k*
m+j;
446 buffer.
fPols[indx++] = (2*k+2)*
m+j;
449 for (j = 0; j <
n-1; j++) {
450 buffer.
fPols[indx++] =
c+1;
451 buffer.
fPols[indx++] = 4;
452 buffer.
fPols[indx++] = (2*k+1)*
m+j;
454 buffer.
fPols[indx++] = (2*k+3)*
m+j;
460 buffer.
fPols[indx++] = 4;
461 buffer.
fPols[indx++] = 2*k*
m+j;
463 buffer.
fPols[indx++] = (2*k+2)*
m+j;
466 buffer.
fPols[indx++] =
c+1;
467 buffer.
fPols[indx++] = 4;
468 buffer.
fPols[indx++] = (2*k+1)*
m+j;
470 buffer.
fPols[indx++] = (2*k+3)*
m+j;
477 for (k = 0; k < (
fNz-1); k++) {
478 buffer.
fPols[indx++] =
c+2;
479 buffer.
fPols[indx++] = 4;
480 buffer.
fPols[indx++] = k==0 ? indx2 : indx2+2*
fNz*
n+2*(k-1);
481 buffer.
fPols[indx++] = indx2+2*(k+1)*
n;
482 buffer.
fPols[indx++] = indx2+2*
fNz*
n+2*k;
483 buffer.
fPols[indx++] = indx2+(2*k+3)*
n;
485 buffer.
fPols[indx++] =
c+2;
486 buffer.
fPols[indx++] = 4;
487 buffer.
fPols[indx++] = k==0 ? indx2+
n-1 : indx2+2*
fNz*
n+2*(k-1)+1;
488 buffer.
fPols[indx++] = indx2+(2*k+3)*
n+
n-1;
489 buffer.
fPols[indx++] = indx2+2*
fNz*
n+2*k+1;
490 buffer.
fPols[indx++] = indx2+2*(k+1)*
n+
n-1;
492 buffer.
fPols[indx-8] = indx2+
n;
493 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)