00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef EGGMAKETUBE_H
00016 #define EGGMAKETUBE_H
00017
00018 #include "pandatoolbase.h"
00019
00020 #include "eggMakeSomething.h"
00021
00022 class EggGroup;
00023 class EggVertexPool;
00024 class EggVertex;
00025
00026
00027
00028
00029
00030
00031 class EggMakeTube : public EggMakeSomething {
00032 public:
00033 EggMakeTube();
00034
00035 void run();
00036
00037 private:
00038 EggVertex *calc_sphere1_vertex(int ri, int si);
00039 EggVertex *calc_sphere2_vertex(int ri, int si);
00040 EggVertex *calc_tube_vertex(int ri, int si);
00041 void add_polygon(EggVertex *a, EggVertex *b, EggVertex *c, EggVertex *d);
00042
00043 private:
00044 double _point_a[3];
00045 double _point_b[3];
00046 bool _got_point_b;
00047 double _radius;
00048 int _num_slices;
00049 int _num_crings;
00050 int _num_trings;
00051
00052 double _length;
00053 EggGroup *_group;
00054 EggVertexPool *_vpool;
00055 };
00056
00057 #endif
00058