117 |
*/ |
*/ |
118 |
ContinuousLine::ContinuousLine(GLuint textId, float lineWidth, |
ContinuousLine::ContinuousLine(GLuint textId, float lineWidth, |
119 |
int joinStyle, bool chain, |
int joinStyle, bool chain, |
120 |
float * points, int size) { |
vector<float> points) { |
121 |
ContinuousLine(textId, lineWidth, joinStyle, chain); |
ContinuousLine(textId, lineWidth, joinStyle, chain); |
122 |
|
|
123 |
if ( (size % 3) != 0) { |
if ( (points.size() % 3) != 0) { |
124 |
cerr << "Lines error:: Size not divisible by three (x,y,z)!\n"; |
cerr << "Lines error:: Size not divisible by three (x,y,z)!\n"; |
125 |
return; |
return; |
126 |
} |
} |
127 |
for (int i=0; i+2<size; i+=3){ |
for (unsigned int i=0; i+2<points.size(); i+=3){ |
128 |
add(points[i], points[i+1], points[i+2]); |
add(points[i], points[i+1], points[i+2]); |
129 |
} |
} |
130 |
} |
} |