91 |
* Continuous Line |
* Continuous Line |
92 |
* =============== |
* =============== |
93 |
*/ |
*/ |
94 |
ContinuousLine::ContinuousLine(GLuint textId, int cornerBehaviour, |
ContinuousLine::ContinuousLine(GLuint textId, float lineWidth, |
95 |
float lineWidth, bool chain, |
int joinStyle, bool chain, |
96 |
float * points, int size) { |
float * points, int size) { |
97 |
ContinuousLine(textId, cornerBehaviour, lineWidth, chain); |
ContinuousLine(textId, joinStyle, lineWidth, chain); |
98 |
|
|
99 |
if ( (size % 3) != 0) { |
if ( (size % 3) != 0) { |
100 |
cerr << "Lines error:: Size not divisible by three (x,y,z)!\n"; |
cerr << "Lines error:: Size not divisible by three (x,y,z)!\n"; |
108 |
|
|
109 |
|
|
110 |
ContinuousLine::ContinuousLine(GLuint textId, |
ContinuousLine::ContinuousLine(GLuint textId, |
|
int cornerBehaviour, |
|
111 |
float lineWidth, |
float lineWidth, |
112 |
|
int joinStyle, |
113 |
bool chain): |
bool chain): |
114 |
drawDone(false), chain(chain) |
drawDone(false), chain(chain) |
115 |
{ |
{ |
118 |
return; |
return; |
119 |
} |
} |
120 |
|
|
121 |
if (cornerBehaviour == BEVEL || |
if (joinStyle == BEVEL || |
122 |
cornerBehaviour == MITER || |
joinStyle == MITER || |
123 |
cornerBehaviour == ROUND) |
joinStyle == ROUND) |
124 |
this->textureId = textId; |
this->textureId = textId; |
125 |
else { |
else { |
126 |
cerr << "Lines error:: Not a good cornerBehaviour: " |
cerr << "Lines error:: Not a good joinStyle: " |
127 |
<< textId <<"\n"; |
<< textId <<"\n"; |
128 |
return; |
return; |
129 |
} |
} |