58 :
TShape(name, title,material)
78 :
TShape(name, title,material)
139 Error(
"MakeTableOfCoSin()",
"No cos table done");
146 Error(
"MakeTableOfCoSin()",
"No sin table done");
155 for (j = 0; j <
n; j++) {
180 Int_t numPoints = n*4;
205 for (j = 0; j <
n; j++) {
210 points[indx+6*
n] =
fDz;
214 for (j = 0; j <
n; j++) {
219 points[indx+6*
n]=
fDz;
235 for (i = 0; i < 4; i++) {
236 for (j = 0; j <
n; j++) {
237 buffer.
fSegs[(i*n+j)*3 ] = c;
238 buffer.
fSegs[(i*n+j)*3+1] = i*n+j;
239 buffer.
fSegs[(i*n+j)*3+2] = i*n+j+1;
241 buffer.
fSegs[(i*n+j-1)*3+2] = i*n;
243 for (i = 4; i < 6; i++) {
244 for (j = 0; j <
n; j++) {
245 buffer.
fSegs[(i*n+j)*3 ] = c+1;
246 buffer.
fSegs[(i*n+j)*3+1] = (i-4)*n+j;
247 buffer.
fSegs[(i*n+j)*3+2] = (i-2)*n+j;
250 for (i = 6; i < 8; i++) {
251 for (j = 0; j <
n; j++) {
252 buffer.
fSegs[(i*n+j)*3 ] = c;
253 buffer.
fSegs[(i*n+j)*3+1] = 2*(i-6)*n+j;
254 buffer.
fSegs[(i*n+j)*3+2] = (2*(i-6)+1)*n+j;
260 for (j = 0; j <
n; j++) {
263 buffer.
fPols[indx+1] = 4;
264 buffer.
fPols[indx+5] = i*n+j;
265 buffer.
fPols[indx+4] = (4+i)*n+j;
266 buffer.
fPols[indx+3] = (2+i)*n+j;
267 buffer.
fPols[indx+2] = (4+i)*n+j+1;
269 buffer.
fPols[indx+2] = (4+i)*n;
271 for (j = 0; j <
n; j++) {
274 buffer.
fPols[indx+1] = 4;
275 buffer.
fPols[indx+2] = i*n+j;
276 buffer.
fPols[indx+3] = (4+i)*n+j;
277 buffer.
fPols[indx+4] = (2+i)*n+j;
278 buffer.
fPols[indx+5] = (4+i)*n+j+1;
280 buffer.
fPols[indx+5] = (4+i)*n;
282 for (j = 0; j <
n; j++) {
284 buffer.
fPols[indx ] = c+i;
285 buffer.
fPols[indx+1] = 4;
286 buffer.
fPols[indx+2] = (i-2)*2*n+j;
287 buffer.
fPols[indx+3] = (4+i)*n+j;
288 buffer.
fPols[indx+4] = ((i-2)*2+1)*n+j;
289 buffer.
fPols[indx+5] = (4+i)*n+j+1;
291 buffer.
fPols[indx+5] = (4+i)*n;
293 for (j = 0; j <
n; j++) {
295 buffer.
fPols[indx ] = c+i;
296 buffer.
fPols[indx+1] = 4;
297 buffer.
fPols[indx+5] = (i-2)*2*n+j;
298 buffer.
fPols[indx+4] = (4+i)*n+j;
299 buffer.
fPols[indx+3] = ((i-2)*2+1)*n+j;
300 buffer.
fPols[indx+2] = (4+i)*n+j+1;
302 buffer.
fPols[indx+2] = (4+i)*n;
320 void TTUBE::Streamer(
TBuffer &R__b)
330 TShape::Streamer(R__b);
364 if (buffer.
SetRawSizes(nbPnts, 3*nbPnts, nbSegs, 3*nbSegs, nbPols, 6*nbPols)) {
virtual const TBuffer3D & GetBuffer3D(Int_t reqSections) const
Get buffer 3d.
TTUBE()
TUBE shape default constructor.
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 TUBE points.
virtual void SetSegsAndPols(TBuffer3D &buffer) const
Set segments and polygons.
Buffer base class used for serializing objects.
virtual Int_t CheckByteCount(UInt_t startpos, UInt_t bcnt, const TClass *clss)=0
virtual Int_t GetNumberOfDivisions() const
virtual void SetNumberOfDivisions(Int_t ndiv)
Set number of divisions used to draw this tube.
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 ~TTUBE()
TUBE shape default destructor.
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 Sizeof3D() const
Return total X3D needed by TNode::ls (when called with option "x")
virtual void MakeTableOfCoSin() const
Make table of sine and cosine.
Int_t GetBasicColor() const
Get basic color.
TTUBE & operator=(const TTUBE &)
assignment operator
TShape & operator=(const TShape &)
assignment operator
void TransformPoints(Double_t *points, UInt_t NbPnts) const
Transform points (LocalToMaster)
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Compute distance from point px,py to a TUBE.
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