/[libvob]/libvob/include/vob/vobs/Lines.hxx
ViewVC logotype

Diff of /libvob/include/vob/vobs/Lines.hxx

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by tjl, Wed Jun 11 17:41:56 2003 UTC revision 1.3 by mudyc, Mon Aug 4 13:47:50 2003 UTC
# Line 48  public: Line 48  public:
48      float width;      float width;
49      int joinStyle;      int joinStyle;
50      bool chain;      bool chain;
51      float * points;      vector<float> points;
     int numPoints;  
52    
53      template<class F> void params(F &f) {      template<class F> void params(F &f) {
54        f(texId, width, joinStyle, chain, points, numPoints);        f(texId, width, joinStyle, chain, points);
55      }      }
56    
57      template<class T> void render(const T &coords1) const {      template<class T> void render(const T &coords1) const {
58        std::cout << "Foobar, ContinuousLine...\n";        std::cout << "Foobar, ContinuousLine...\n";
59    
60        float realPts[numPoints * 2];        vector<float> pts;
61        int realNum;        for (unsigned int i=0; i<points.size(); i+=3) {
       for (int i=0,j=0; i<numPoints;) {  
62            ZPt tmp = coords1.transform( ZPt(points[i], points[i+1], 0) );            ZPt tmp = coords1.transform( ZPt(points[i], points[i+1], 0) );
63            realPts[j] = tmp.x;            std::cout << "Argh..";
64            realPts[j+1] = tmp.y;            pts.push_back(tmp.x);
65            realPts[j+2] = tmp.z;            pts.push_back(tmp.y);
66            i+=2;            pts.push_back(tmp.z);
           j+=3;  
           realNum = j+3;  
67        }        }
68    
69        if (numPoints <= 4) {        if (pts.size() <= 6) {
70          Lines::SimpleLine l = Lines::SimpleLine(texId, width, realPts, realNum);          Lines::SimpleLine l = Lines::SimpleLine(texId, width, pts);
71        } else {        } else {
72          Lines::ContinuousLine l =          Lines::ContinuousLine l =
73            Lines::ContinuousLine(texId, width, joinStyle, chain, realPts, realNum);            Lines::ContinuousLine(texId, width, joinStyle, chain, pts);
74        }        }
75    
76        std::cout << "Foobar, ContinuousLine DONE...\n";        std::cout << "Foobar, ContinuousLine DONE...\n";

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26