141 if (factors[0] > 0)
faX = factors[0];
142 if (factors[1] > 0)
faY = factors[1];
143 if (factors[2] > 0)
faZ = factors[2];
170 for (i = 0; i <
fNz+1; i++) {
174 for (j = 0; j <
n; j++) {
181 for (j = 0; j <
n; j++) {
218 while (dphi > 360) dphi -= 360;
221 while (dtet > 180) dtet -= 180;
240 for (j = 0; j <
n; j++)
242 ph = phi1 + j*angstep;
256 angstep = range/(
n-1);
259 for (j = 0; j <
n; j++)
324 if (buffer.
SetRawSizes(nbPnts, 3*nbPnts, nbSegs, 3*nbSegs, nbPols, 6*nbPols)) {
343 for (i = 0; i < nz*2; i++) {
345 for (j = 1; j <
n; j++) {
347 buffer.
fSegs[indx++] = indx2+j-1;
348 buffer.
fSegs[indx++] = indx2+j;
352 buffer.
fSegs[indx++] = indx2+j-1;
353 buffer.
fSegs[indx++] = indx2;
358 for (i = 0; i < 2; i++) {
359 indx2 = i*(nz-1)*2*
n;
360 for (j = 0; j <
n; j++) {
362 buffer.
fSegs[indx++] = indx2+j;
363 buffer.
fSegs[indx++] = indx2+
n+j;
368 for (i = 0; i < (nz-1); i++) {
372 for (j = 0; j <
n; j++) {
373 buffer.
fSegs[indx++] =
c+2;
374 buffer.
fSegs[indx++] = indx2+j;
375 buffer.
fSegs[indx++] = indx2+
n*2+j;
379 for (j = 0; j <
n; j++) {
380 buffer.
fSegs[indx++] =
c+3;
381 buffer.
fSegs[indx++] = indx2+j;
382 buffer.
fSegs[indx++] = indx2+
n*2+j;
389 for (i = 1; i < (nz-1); i++) {
390 for (j = 0; j < 2; j++) {
392 buffer.
fSegs[indx++] = 2*i *
n + j*(
n-1);
393 buffer.
fSegs[indx++] = (2*i+1) *
n + j*(
n-1);
404 for (j = 0; j <
n-1; j++) {
405 buffer.
fPols[indx++] =
c+3;
406 buffer.
fPols[indx++] = 4;
407 buffer.
fPols[indx++] = 2*nz*
m+j;
408 buffer.
fPols[indx++] =
m+j;
409 buffer.
fPols[indx++] = 2*nz*
m+j+1;
410 buffer.
fPols[indx++] = j;
412 for (j = 0; j <
n-1; j++) {
413 buffer.
fPols[indx++] =
c+3;
414 buffer.
fPols[indx++] = 4;
415 buffer.
fPols[indx++] = 2*nz*
m+
n+j;
416 buffer.
fPols[indx++] = (nz*2-2)*
m+j;
417 buffer.
fPols[indx++] = 2*nz*
m+
n+j+1;
418 buffer.
fPols[indx++] = (nz*2-2)*
m+
m+j;
421 buffer.
fPols[indx++] =
c+3;
422 buffer.
fPols[indx++] = 4;
423 buffer.
fPols[indx++] = 2*nz*
m+j;
424 buffer.
fPols[indx++] =
m+j;
425 buffer.
fPols[indx++] = 2*nz*
m;
426 buffer.
fPols[indx++] = j;
428 buffer.
fPols[indx++] =
c+3;
429 buffer.
fPols[indx++] = 4;
430 buffer.
fPols[indx++] = 2*nz*
m+
n+j;
431 buffer.
fPols[indx++] = (nz*2-2)*
m+j;
432 buffer.
fPols[indx++] = 2*nz*
m+
n;
433 buffer.
fPols[indx++] = (nz*2-2)*
m+
m+j;
437 for (k = 0; k < (nz-1); k++) {
438 for (j = 0; j <
n-1; j++) {
440 buffer.
fPols[indx++] = 4;
441 buffer.
fPols[indx++] = 2*k*
m+j;
442 buffer.
fPols[indx++] = nz*2*
m+(2*k+2)*
n+j+1;
443 buffer.
fPols[indx++] = (2*k+2)*
m+j;
444 buffer.
fPols[indx++] = nz*2*
m+(2*k+2)*
n+j;
446 for (j = 0; j <
n-1; j++) {
447 buffer.
fPols[indx++] =
c+1;
448 buffer.
fPols[indx++] = 4;
449 buffer.
fPols[indx++] = (2*k+1)*
m+j;
450 buffer.
fPols[indx++] = nz*2*
m+(2*k + 3)*
n+j;
451 buffer.
fPols[indx++] = (2*k+ 3)*
m+j;
452 buffer.
fPols[indx++] = nz*2*
m+(2*k+3)*
n+j+1;
457 buffer.
fPols[indx++] = 4;
458 buffer.
fPols[indx++] = 2*k*
m+j;
459 buffer.
fPols[indx++] = nz*2*
m+(2*k+2)*
n+j;
460 buffer.
fPols[indx++] = (2*k+2)*
m+j;
461 buffer.
fPols[indx++] = nz*2*
m+(2*k+2)*
n;
463 buffer.
fPols[indx++] =
c+1;
464 buffer.
fPols[indx++] = 4;
465 buffer.
fPols[indx++] = (2*k+1)*
m+j;
466 buffer.
fPols[indx++] = nz*2*
m+(2*k+3)*
n+j;
467 buffer.
fPols[indx++] = (2*k+3)*
m+j;
468 buffer.
fPols[indx++] = nz*2*
m+(2*k+3)*
n;
476 for (k = 0; k < (nz-1); k++) {
477 buffer.
fPols[indx++] =
c+2;
478 buffer.
fPols[indx++] = 4;
479 buffer.
fPols[indx++] = k==0 ? indx2 : indx2+2*nz*
n+2*(k-1);
480 buffer.
fPols[indx++] = indx2+2*(k+1)*
n;
481 buffer.
fPols[indx++] = indx2+2*nz*
n+2*k;
482 buffer.
fPols[indx++] = indx2+(2*k+3)*
n;
484 buffer.
fPols[indx++] =
c+2;
485 buffer.
fPols[indx++] = 4;
486 buffer.
fPols[indx++] = k==0 ? indx2+
n-1 : indx2+2*nz*
n+2*(k-1)+1;
487 buffer.
fPols[indx++] = indx2+(2*k+3)*
n+
n-1;
488 buffer.
fPols[indx++] = indx2+2*nz*
n+2*k+1;
489 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;
int Int_t
Signed integer 4 bytes (int).
short Version_t
Class version identifier (short).
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
bool Bool_t
Boolean (0=false, 1=true) (bool).
double Double_t
Double 8 bytes.
float Float_t
Float 4 bytes (float).
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 SetNumberOfDivisions(Int_t p)
Set number of divisions.
~TSPHE() override
SPHE shape default destructor.
Int_t DistancetoPrimitive(Int_t px, Int_t py) override
Compute distance from point px,py to a PSPHE.
virtual Int_t GetNumberOfDivisions() const
virtual void MakeTableOfCoSin() const
Make table of sine and cosine.
TSPHE()
SPHE shape default constructor.
TClass * IsA() const override
void Streamer(TBuffer &) override
Stream a class object.
void SetPoints(Double_t *points) const override
Create SPHE points.
const TBuffer3D & GetBuffer3D(Int_t reqSections) const override
Get buffer 3d.
Int_t fNz
! number of sections
Double_t * fCoThetaTab
! Table of sin(gThemin) .... cos(Theta)
Double_t * fCoTab
! Table of cos(fPhimin) .... cos(Phi)
virtual void SetEllipse(const Float_t *factors)
Set ellipse.
Double_t * fSiTab
! Table of sin(fPhimin) .... sin(Phi)
void Sizeof3D() const override
Return total X3D needed by TNode::ls (when called with option "x").
void Streamer(TBuffer &) override
Stream an object of class TShape.
Int_t GetBasicColor() const
Get basic color.
Int_t ShapeDistancetoPrimitive(Int_t numPoints, Int_t px, Int_t py)
Distance to primitive.
TShape()
Shape default constructor.
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).
Double_t ATan(Double_t)
Returns the principal value of the arc tangent of x, expressed in radians.
Double_t Sqrt(Double_t x)
Returns the square root of x.
Double_t Cos(Double_t)
Returns the cosine of an angle of x radians.
Double_t Sin(Double_t)
Returns the sine of an angle of x radians.
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.