142 if (factors[0] > 0)
faX = factors[0];
143 if (factors[1] > 0)
faY = factors[1];
144 if (factors[2] > 0)
faZ = factors[2];
171 for (i = 0; i <
fNz+1; i++) {
175 for (j = 0; j <
n; j++) {
182 for (j = 0; j <
n; j++) {
219 while (dphi > 360) dphi -= 360;
222 while (dtet > 180) dtet -= 180;
241 for (j = 0; j <
n; j++)
243 ph = phi1 + j*angstep;
257 angstep = range/(
n-1);
260 for (j = 0; j <
n; j++)
325 if (buffer.
SetRawSizes(nbPnts, 3*nbPnts, nbSegs, 3*nbSegs, nbPols, 6*nbPols)) {
344 for (i = 0; i < nz*2; i++) {
346 for (j = 1; j <
n; j++) {
348 buffer.
fSegs[indx++] = indx2+j-1;
349 buffer.
fSegs[indx++] = indx2+j;
353 buffer.
fSegs[indx++] = indx2+j-1;
354 buffer.
fSegs[indx++] = indx2;
359 for (i = 0; i < 2; i++) {
360 indx2 = i*(nz-1)*2*
n;
361 for (j = 0; j <
n; j++) {
363 buffer.
fSegs[indx++] = indx2+j;
364 buffer.
fSegs[indx++] = indx2+
n+j;
369 for (i = 0; i < (nz-1); i++) {
373 for (j = 0; j <
n; j++) {
374 buffer.
fSegs[indx++] =
c+2;
375 buffer.
fSegs[indx++] = indx2+j;
376 buffer.
fSegs[indx++] = indx2+
n*2+j;
380 for (j = 0; j <
n; j++) {
381 buffer.
fSegs[indx++] =
c+3;
382 buffer.
fSegs[indx++] = indx2+j;
383 buffer.
fSegs[indx++] = indx2+
n*2+j;
390 for (i = 1; i < (nz-1); i++) {
391 for (j = 0; j < 2; j++) {
393 buffer.
fSegs[indx++] = 2*i *
n + j*(
n-1);
394 buffer.
fSegs[indx++] = (2*i+1) *
n + j*(
n-1);
405 for (j = 0; j <
n-1; j++) {
406 buffer.
fPols[indx++] =
c+3;
407 buffer.
fPols[indx++] = 4;
408 buffer.
fPols[indx++] = 2*nz*
m+j;
409 buffer.
fPols[indx++] =
m+j;
410 buffer.
fPols[indx++] = 2*nz*
m+j+1;
411 buffer.
fPols[indx++] = j;
413 for (j = 0; j <
n-1; j++) {
414 buffer.
fPols[indx++] =
c+3;
415 buffer.
fPols[indx++] = 4;
416 buffer.
fPols[indx++] = 2*nz*
m+
n+j;
417 buffer.
fPols[indx++] = (nz*2-2)*
m+j;
418 buffer.
fPols[indx++] = 2*nz*
m+
n+j+1;
419 buffer.
fPols[indx++] = (nz*2-2)*
m+
m+j;
422 buffer.
fPols[indx++] =
c+3;
423 buffer.
fPols[indx++] = 4;
424 buffer.
fPols[indx++] = 2*nz*
m+j;
425 buffer.
fPols[indx++] =
m+j;
426 buffer.
fPols[indx++] = 2*nz*
m;
427 buffer.
fPols[indx++] = j;
429 buffer.
fPols[indx++] =
c+3;
430 buffer.
fPols[indx++] = 4;
431 buffer.
fPols[indx++] = 2*nz*
m+
n+j;
432 buffer.
fPols[indx++] = (nz*2-2)*
m+j;
433 buffer.
fPols[indx++] = 2*nz*
m+
n;
434 buffer.
fPols[indx++] = (nz*2-2)*
m+
m+j;
438 for (k = 0; k < (nz-1); k++) {
439 for (j = 0; j <
n-1; j++) {
441 buffer.
fPols[indx++] = 4;
442 buffer.
fPols[indx++] = 2*k*
m+j;
443 buffer.
fPols[indx++] = nz*2*
m+(2*k+2)*
n+j+1;
444 buffer.
fPols[indx++] = (2*k+2)*
m+j;
445 buffer.
fPols[indx++] = nz*2*
m+(2*k+2)*
n+j;
447 for (j = 0; j <
n-1; j++) {
448 buffer.
fPols[indx++] =
c+1;
449 buffer.
fPols[indx++] = 4;
450 buffer.
fPols[indx++] = (2*k+1)*
m+j;
451 buffer.
fPols[indx++] = nz*2*
m+(2*k + 3)*
n+j;
452 buffer.
fPols[indx++] = (2*k+ 3)*
m+j;
453 buffer.
fPols[indx++] = nz*2*
m+(2*k+3)*
n+j+1;
458 buffer.
fPols[indx++] = 4;
459 buffer.
fPols[indx++] = 2*k*
m+j;
460 buffer.
fPols[indx++] = nz*2*
m+(2*k+2)*
n+j;
461 buffer.
fPols[indx++] = (2*k+2)*
m+j;
462 buffer.
fPols[indx++] = nz*2*
m+(2*k+2)*
n;
464 buffer.
fPols[indx++] =
c+1;
465 buffer.
fPols[indx++] = 4;
466 buffer.
fPols[indx++] = (2*k+1)*
m+j;
467 buffer.
fPols[indx++] = nz*2*
m+(2*k+3)*
n+j;
468 buffer.
fPols[indx++] = (2*k+3)*
m+j;
469 buffer.
fPols[indx++] = nz*2*
m+(2*k+3)*
n;
477 for (k = 0; k < (nz-1); k++) {
478 buffer.
fPols[indx++] =
c+2;
479 buffer.
fPols[indx++] = 4;
480 buffer.
fPols[indx++] = k==0 ? indx2 : indx2+2*nz*
n+2*(k-1);
481 buffer.
fPols[indx++] = indx2+2*(k+1)*
n;
482 buffer.
fPols[indx++] = indx2+2*nz*
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*nz*
n+2*(k-1)+1;
488 buffer.
fPols[indx++] = indx2+(2*k+3)*
n+
n-1;
489 buffer.
fPols[indx++] = indx2+2*nz*
n+2*k+1;
490 buffer.
fPols[indx++] = indx2+2*(k+1)*
n+
n-1;
493 buffer.
fPols[indx-8] = indx2+
n;
494 buffer.
fPols[indx-2] = indx2+2*
n-1;
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.
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.
Double_t * fCoThetaTab
Table of cos(fPhimin) .... cos(Phi)
Double_t * fCoTab
Table of sin(fPhimin) .... sin(Phi)
virtual void SetEllipse(const Float_t *factors)
Set ellipse.
Float_t fAspectRatio
number of sections
void Sizeof3D() const override
Return total X3D needed by TNode::ls (when called with option "x")
Int_t fNdiv
Table of sin(gThemin) .... cos(Theta)
This is the base class for all geometry shapes.
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.
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.