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"; |