97 if (phi1 > phi2 ) phi2 += 2*pi;
104 for (j = 0; j <
n; j++) {
105 ph = phi1 + j*angstep;
144 for (j = 0; j <
n; j++) {
153 for (j = 0; j <
n; j++) {
197 Int_t nbSegs = 2*nbPnts;
198 Int_t nbPols = nbPnts-2;
200 if (buffer.
SetRawSizes(nbPnts, 3*nbPnts, nbSegs, 3*nbSegs, nbPols, 6*nbPols)) {
217 for (i = 0; i < 4; i++) {
218 for (j = 1; j <
n; j++) {
219 buffer.
fSegs[(i*
n+j-1)*3 ] =
c;
220 buffer.
fSegs[(i*
n+j-1)*3+1] = i*
n+j-1;
221 buffer.
fSegs[(i*
n+j-1)*3+2] = i*
n+j;
224 for (i = 4; i < 6; i++) {
225 for (j = 0; j <
n; j++) {
226 buffer.
fSegs[(i*
n+j)*3 ] =
c+1;
227 buffer.
fSegs[(i*
n+j)*3+1] = (i-4)*
n+j;
228 buffer.
fSegs[(i*
n+j)*3+2] = (i-2)*
n+j;
231 for (i = 6; i < 8; i++) {
232 for (j = 0; j <
n; j++) {
234 buffer.
fSegs[(i*
n+j)*3+1] = 2*(i-6)*
n+j;
235 buffer.
fSegs[(i*
n+j)*3+2] = (2*(i-6)+1)*
n+j;
243 for (j = 0; j <
n-1; j++) {
245 buffer.
fPols[indx++] = 4;
246 buffer.
fPols[indx++] = (4+i)*
n+j+1;
247 buffer.
fPols[indx++] = (2+i)*
n+j;
248 buffer.
fPols[indx++] = (4+i)*
n+j;
249 buffer.
fPols[indx++] = i*
n+j;
252 for (j = 0; j <
n-1; j++) {
254 buffer.
fPols[indx++] = 4;
255 buffer.
fPols[indx++] = i*
n+j;
256 buffer.
fPols[indx++] = (4+i)*
n+j;
257 buffer.
fPols[indx++] = (2+i)*
n+j;
258 buffer.
fPols[indx++] = (4+i)*
n+j+1;
261 for (j = 0; j <
n-1; j++) {
262 buffer.
fPols[indx++] =
c+i;
263 buffer.
fPols[indx++] = 4;
264 buffer.
fPols[indx++] = (i-2)*2*
n+j;
265 buffer.
fPols[indx++] = (4+i)*
n+j;
266 buffer.
fPols[indx++] = ((i-2)*2+1)*
n+j;
267 buffer.
fPols[indx++] = (4+i)*
n+j+1;
270 for (j = 0; j <
n-1; j++) {
271 buffer.
fPols[indx++] =
c+i;
272 buffer.
fPols[indx++] = 4;
273 buffer.
fPols[indx++] = (4+i)*
n+j+1;
274 buffer.
fPols[indx++] = ((i-2)*2+1)*
n+j;
275 buffer.
fPols[indx++] = (4+i)*
n+j;
276 buffer.
fPols[indx++] = (i-2)*2*
n+j;
278 buffer.
fPols[indx++] =
c+2;
279 buffer.
fPols[indx++] = 4;
280 buffer.
fPols[indx++] = 6*
n;
281 buffer.
fPols[indx++] = 4*
n;
282 buffer.
fPols[indx++] = 7*
n;
283 buffer.
fPols[indx++] = 5*
n;
284 buffer.
fPols[indx++] =
c+2;
285 buffer.
fPols[indx++] = 4;
286 buffer.
fPols[indx++] = 6*
n-1;
287 buffer.
fPols[indx++] = 8*
n-1;
288 buffer.
fPols[indx++] = 5*
n-1;
289 buffer.
fPols[indx++] = 7*
n-1;
int Int_t
Signed integer 4 bytes (int).
double Double_t
Double 8 bytes.
float Float_t
Float 4 bytes (float).
Generic 3D primitive description class.
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.
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 * fCoTab
! Table of cos(fPhi1) .... cos(fPhil+fDphi1)
Double_t * fSiTab
! Table of sin(fPhi1) .... sin(fPhil+fDphi1)
TTUBE(const TTUBE &)
copy constructor
virtual Int_t GetNumberOfDivisions() const
~TTUBS() override
TUBS shape default destructor.
void SetPoints(Double_t *points) const override
Create TUBS points.
void Sizeof3D() const override
Return total X3D needed by TNode::ls (when called with option "x").
Int_t DistancetoPrimitive(Int_t px, Int_t py) override
Compute distance from point px,py to a TUBE.
void MakeTableOfCoSin() const override
Make table of sine and cosine.
const TBuffer3D & GetBuffer3D(Int_t reqSections) const override
Get buffer 3d.
TTUBS()
TUBS shape default constructor.
Double_t ATan(Double_t)
Returns the principal value of the arc tangent of x, expressed in radians.
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.