57 :
TShape(name, title,material)
68 fAspectRatio = aspect;
77 :
TShape(name, title,material)
102 fAspectRatio(tu.fAspectRatio),
138 Error(
"MakeTableOfCoSin()",
"No cos table done");
145 Error(
"MakeTableOfCoSin()",
"No sin table done");
154 for (j = 0; j <
n; j++) {
179 Int_t numPoints = n*4;
204 for (j = 0; j <
n; j++) {
205 points[indx+6*
n] = points[indx] = fRmin *
fCoTab[j];
207 points[indx+6*
n] = points[indx] = fAspectRatio*fRmin *
fSiTab[j];
209 points[indx+6*
n] =
fDz;
213 for (j = 0; j <
n; j++) {
214 points[indx+6*
n] = points[indx] = fRmax *
fCoTab[j];
216 points[indx+6*
n] = points[indx] = fAspectRatio*fRmax *
fSiTab[j];
218 points[indx+6*
n]=
fDz;
234 for (i = 0; i < 4; i++) {
235 for (j = 0; j <
n; j++) {
236 buffer.
fSegs[(i*n+j)*3 ] = c;
237 buffer.
fSegs[(i*n+j)*3+1] = i*n+j;
238 buffer.
fSegs[(i*n+j)*3+2] = i*n+j+1;
240 buffer.
fSegs[(i*n+j-1)*3+2] = i*n;
242 for (i = 4; i < 6; i++) {
243 for (j = 0; j <
n; j++) {
244 buffer.
fSegs[(i*n+j)*3 ] = c+1;
245 buffer.
fSegs[(i*n+j)*3+1] = (i-4)*n+j;
246 buffer.
fSegs[(i*n+j)*3+2] = (i-2)*n+j;
249 for (i = 6; i < 8; i++) {
250 for (j = 0; j <
n; j++) {
251 buffer.
fSegs[(i*n+j)*3 ] = c;
252 buffer.
fSegs[(i*n+j)*3+1] = 2*(i-6)*n+j;
253 buffer.
fSegs[(i*n+j)*3+2] = (2*(i-6)+1)*n+j;
259 for (j = 0; j <
n; j++) {
262 buffer.
fPols[indx+1] = 4;
263 buffer.
fPols[indx+5] = i*n+j;
264 buffer.
fPols[indx+4] = (4+i)*n+j;
265 buffer.
fPols[indx+3] = (2+i)*n+j;
266 buffer.
fPols[indx+2] = (4+i)*n+j+1;
268 buffer.
fPols[indx+2] = (4+i)*n;
270 for (j = 0; j <
n; j++) {
273 buffer.
fPols[indx+1] = 4;
274 buffer.
fPols[indx+2] = i*n+j;
275 buffer.
fPols[indx+3] = (4+i)*n+j;
276 buffer.
fPols[indx+4] = (2+i)*n+j;
277 buffer.
fPols[indx+5] = (4+i)*n+j+1;
279 buffer.
fPols[indx+5] = (4+i)*n;
281 for (j = 0; j <
n; j++) {
283 buffer.
fPols[indx ] = c+i;
284 buffer.
fPols[indx+1] = 4;
285 buffer.
fPols[indx+2] = (i-2)*2*n+j;
286 buffer.
fPols[indx+3] = (4+i)*n+j;
287 buffer.
fPols[indx+4] = ((i-2)*2+1)*n+j;
288 buffer.
fPols[indx+5] = (4+i)*n+j+1;
290 buffer.
fPols[indx+5] = (4+i)*n;
292 for (j = 0; j <
n; j++) {
294 buffer.
fPols[indx ] = c+i;
295 buffer.
fPols[indx+1] = 4;
296 buffer.
fPols[indx+5] = (i-2)*2*n+j;
297 buffer.
fPols[indx+4] = (4+i)*n+j;
298 buffer.
fPols[indx+3] = ((i-2)*2+1)*n+j;
299 buffer.
fPols[indx+2] = (4+i)*n+j+1;
301 buffer.
fPols[indx+2] = (4+i)*n;
319 void TTUBE::Streamer(
TBuffer &R__b)
329 TShape::Streamer(R__b);
363 if (buffer.
SetRawSizes(nbPnts, 3*nbPnts, nbSegs, 3*nbSegs, nbPols, 6*nbPols)) {
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
virtual const TBuffer3D & GetBuffer3D(Int_t reqSections) const
Get buffer 3d.
Buffer base class used for serializing objects.
virtual Int_t CheckByteCount(UInt_t startpos, UInt_t bcnt, const TClass *clss)=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 SetNumberOfDivisions(Int_t ndiv)
Set number of divisions used to draw this tube.
virtual void MakeTableOfCoSin() const
Make table of sine and cosine.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
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.
void TransformPoints(Double_t *points, UInt_t NbPnts) const
Transform points (LocalToMaster)
virtual ~TTUBE()
TUBE shape default destructor.
virtual void SetPoints(Double_t *points) const
Create TUBE points.
Int_t GetBasicColor() const
Get basic color.
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 void SetSegsAndPols(TBuffer3D &buffer) const
Set segments and polygons.
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=0)=0
virtual void Sizeof3D() const
Return total X3D needed by TNode::ls (when called with option "x")
TTUBE & operator=(const TTUBE &)
assignment operator
TShape & operator=(const TShape &)
assignment operator
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Compute distance from point px,py to a TUBE.
virtual Int_t GetNumberOfDivisions() const
Double_t * fCoTab
Table of sin(fPhi1) .... sin(fPhil+fDphi1)
virtual Version_t ReadVersion(UInt_t *start=0, UInt_t *bcnt=0, const TClass *cl=0)=0
Bool_t SectionsValid(UInt_t mask) const