68 :
TShape(name, title,material)
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++) {
237 points[indx++] =
fDz[i];
239 for (j = 0; j <
n; j++) {
242 points[indx++] =
fDz[i];
259 gSize3D.numPolys += 2*(
fNz*n-1+(fDphi1 == 360));
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++) {
354 buffer.
fSegs[indx++] = c;
355 buffer.
fSegs[indx++] = indx2+j-1;
356 buffer.
fSegs[indx++] = indx2+j;
359 buffer.
fSegs[indx++] = c;
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++) {
369 buffer.
fSegs[indx++] = c;
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++) {
399 buffer.
fSegs[indx++] = c;
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;
414 buffer.
fPols[indx++] = 2*fNz*m+j;
415 buffer.
fPols[indx++] = m+j;
416 buffer.
fPols[indx++] = 2*fNz*m+j+1;
417 buffer.
fPols[indx++] = j;
419 for (j = 0; j < n-1; j++) {
420 buffer.
fPols[indx++] = c+3;
421 buffer.
fPols[indx++] = 4;
422 buffer.
fPols[indx++] = 2*fNz*m+n+j;
423 buffer.
fPols[indx++] = (fNz*2-2)*m+j;
424 buffer.
fPols[indx++] = 2*fNz*m+n+j+1;
425 buffer.
fPols[indx++] = (fNz*2-2)*m+m+j;
428 buffer.
fPols[indx++] = c+3;
429 buffer.
fPols[indx++] = 4;
430 buffer.
fPols[indx++] = 2*fNz*m+j;
431 buffer.
fPols[indx++] = m+j;
432 buffer.
fPols[indx++] = 2*fNz*
m;
433 buffer.
fPols[indx++] = j;
435 buffer.
fPols[indx++] = c+3;
436 buffer.
fPols[indx++] = 4;
437 buffer.
fPols[indx++] = 2*fNz*m+n+j;
438 buffer.
fPols[indx++] = (fNz*2-2)*m+j;
439 buffer.
fPols[indx++] = 2*fNz*m+
n;
440 buffer.
fPols[indx++] = (fNz*2-2)*m+m+j;
442 for (k = 0; k < (fNz-1); k++) {
443 for (j = 0; j < n-1; j++) {
444 buffer.
fPols[indx++] = c;
445 buffer.
fPols[indx++] = 4;
446 buffer.
fPols[indx++] = 2*k*m+j;
447 buffer.
fPols[indx++] = fNz*2*m+(2*k+2)*n+j+1;
448 buffer.
fPols[indx++] = (2*k+2)*m+j;
449 buffer.
fPols[indx++] = fNz*2*m+(2*k+2)*n+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;
455 buffer.
fPols[indx++] = fNz*2*m+(2*k+3)*n+j;
456 buffer.
fPols[indx++] = (2*k+3)*m+j;
457 buffer.
fPols[indx++] = fNz*2*m+(2*k+3)*n+j+1;
461 buffer.
fPols[indx++] = c;
462 buffer.
fPols[indx++] = 4;
463 buffer.
fPols[indx++] = 2*k*m+j;
464 buffer.
fPols[indx++] = fNz*2*m+(2*k+2)*n;
465 buffer.
fPols[indx++] = (2*k+2)*m+j;
466 buffer.
fPols[indx++] = fNz*2*m+(2*k+2)*n+j;
468 buffer.
fPols[indx++] = c+1;
469 buffer.
fPols[indx++] = 4;
470 buffer.
fPols[indx++] = (2*k+1)*m+j;
471 buffer.
fPols[indx++] = fNz*2*m+(2*k+3)*n+j;
472 buffer.
fPols[indx++] = (2*k+3)*m+j;
473 buffer.
fPols[indx++] = fNz*2*m+(2*k+3)*n;
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;
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
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...
virtual void SetPoints(Double_t *points) const
Create PCON points.
virtual void MakeTableOfCoSin() const
Make table of cosine and sine.
virtual ~TPCON()
PCON shape default destructor.
Float_t fPhi1
Table of cos(fPhi1) .... cos(fPhil+fDphi1)
virtual void DefineSection(Int_t secNum, Float_t z, Float_t rmin, Float_t rmax)
Defines section secNum of the polycone.
TPCON()
PCON shape default constructor.
Buffer base class used for serializing objects.
virtual Int_t CheckByteCount(UInt_t startpos, UInt_t bcnt, const TClass *clss)=0
TPCON & operator=(const TPCON &)
assignment operator
void SetSectionsValid(UInt_t mask)
Int_t ShapeDistancetoPrimitive(Int_t numPoints, Int_t px, Int_t py)
Distance to primitive.
This is the base class for all geometry shapes.
Bool_t SectionsValid(UInt_t mask) const
virtual Bool_t SetSegsAndPols(TBuffer3D &buffer) const
Set segments and polygons.
virtual void Sizeof3D() const
Return total X3D needed by TNode::ls (when called with option "x")
Double_t * fCoTab
Table of sin(fPhi1) .... sin(fPhil+fDphi1)
virtual const TBuffer3D & GetBuffer3D(Int_t reqSections) const
Get buffer 3d.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
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.
Generic 3D primitive description class.
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=0)=0
virtual void SetNumberOfDivisions(Int_t p)
Set number of divisions.
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Compute distance from point px,py to a PCON.
virtual Int_t GetNumberOfDivisions() const
Int_t GetBasicColor() const
Get basic color.
you should not use this method at all Int_t Int_t z
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
TShape & operator=(const TShape &)
assignment operator
virtual void FillTableOfCoSin(Double_t phi, Double_t angstep, Int_t n) const
Fill the table of cos and sin to prepare drawing.
void TransformPoints(Double_t *points, UInt_t NbPnts) const
Transform points (LocalToMaster)
virtual Version_t ReadVersion(UInt_t *start=0, UInt_t *bcnt=0, const TClass *cl=0)=0
virtual Int_t ReadArray(Bool_t *&b)=0