136 Error(
"MakeTableOfCoSin()",
"No cos table done");
143 Error(
"MakeTableOfCoSin()",
"No sin table done");
152 for (j = 0; j <
n; j++) {
202 for (j = 0; j <
n; j++) {
211 for (j = 0; j <
n; j++) {
232 for (i = 0; i < 4; i++) {
233 for (j = 0; j <
n; j++) {
235 buffer.
fSegs[(i*
n+j)*3+1] = i*
n+j;
236 buffer.
fSegs[(i*
n+j)*3+2] = i*
n+j+1;
238 buffer.
fSegs[(i*
n+j-1)*3+2] = i*
n;
240 for (i = 4; i < 6; i++) {
241 for (j = 0; j <
n; j++) {
242 buffer.
fSegs[(i*
n+j)*3 ] =
c+1;
243 buffer.
fSegs[(i*
n+j)*3+1] = (i-4)*
n+j;
244 buffer.
fSegs[(i*
n+j)*3+2] = (i-2)*
n+j;
247 for (i = 6; i < 8; i++) {
248 for (j = 0; j <
n; j++) {
250 buffer.
fSegs[(i*
n+j)*3+1] = 2*(i-6)*
n+j;
251 buffer.
fSegs[(i*
n+j)*3+2] = (2*(i-6)+1)*
n+j;
257 for (j = 0; j <
n; j++) {
260 buffer.
fPols[indx+1] = 4;
261 buffer.
fPols[indx+5] = i*
n+j;
262 buffer.
fPols[indx+4] = (4+i)*
n+j;
263 buffer.
fPols[indx+3] = (2+i)*
n+j;
264 buffer.
fPols[indx+2] = (4+i)*
n+j+1;
266 buffer.
fPols[indx+2] = (4+i)*
n;
268 for (j = 0; j <
n; j++) {
271 buffer.
fPols[indx+1] = 4;
272 buffer.
fPols[indx+2] = i*
n+j;
273 buffer.
fPols[indx+3] = (4+i)*
n+j;
274 buffer.
fPols[indx+4] = (2+i)*
n+j;
275 buffer.
fPols[indx+5] = (4+i)*
n+j+1;
277 buffer.
fPols[indx+5] = (4+i)*
n;
279 for (j = 0; j <
n; j++) {
281 buffer.
fPols[indx ] =
c+i;
282 buffer.
fPols[indx+1] = 4;
283 buffer.
fPols[indx+2] = (i-2)*2*
n+j;
284 buffer.
fPols[indx+3] = (4+i)*
n+j;
285 buffer.
fPols[indx+4] = ((i-2)*2+1)*
n+j;
286 buffer.
fPols[indx+5] = (4+i)*
n+j+1;
288 buffer.
fPols[indx+5] = (4+i)*
n;
290 for (j = 0; j <
n; j++) {
292 buffer.
fPols[indx ] =
c+i;
293 buffer.
fPols[indx+1] = 4;
294 buffer.
fPols[indx+5] = (i-2)*2*
n+j;
295 buffer.
fPols[indx+4] = (4+i)*
n+j;
296 buffer.
fPols[indx+3] = ((i-2)*2+1)*
n+j;
297 buffer.
fPols[indx+2] = (4+i)*
n+j+1;
299 buffer.
fPols[indx+2] = (4+i)*
n;
361 if (buffer.
SetRawSizes(nbPnts, 3*nbPnts, nbSegs, 3*nbSegs, nbPols, 6*nbPols)) {
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).
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 Version_t ReadVersion(UInt_t *start=nullptr, UInt_t *bcnt=nullptr, const TClass *cl=nullptr)=0
virtual Int_t CheckByteCount(UInt_t startpos, UInt_t bcnt, const TClass *clss)=0
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=nullptr)=0
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
TShape & operator=(const TShape &)
assignment operator
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 * 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
virtual void MakeTableOfCoSin() const
Make table of sine and cosine.
TTUBE & operator=(const TTUBE &)
assignment operator
void Streamer(TBuffer &) override
Stream an object of class TTUBE.
virtual void SetNumberOfDivisions(Int_t ndiv)
Set number of divisions used to draw this tube.
const TBuffer3D & GetBuffer3D(Int_t reqSections) const override
Get buffer 3d.
void Sizeof3D() const override
Return total X3D needed by TNode::ls (when called with option "x").
TClass * IsA() const override
~TTUBE() override
TUBE shape default destructor.
virtual void SetSegsAndPols(TBuffer3D &buffer) const
Set segments and polygons.
void SetPoints(Double_t *points) const override
Create TUBE points.
TTUBE()
TUBE shape default constructor.
Int_t DistancetoPrimitive(Int_t px, Int_t py) override
Compute distance from point px,py to a TUBE.
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.