mirror of
https://github.com/overte-org/overte.git
synced 2025-04-22 19:13:38 +02:00
widths are changing
This commit is contained in:
parent
ff77c3e0d8
commit
a117a7aa3b
1 changed files with 2 additions and 2 deletions
|
@ -116,7 +116,7 @@ bool QuadEntityItem::setStrokeWidths(const QVector<float>& strokeWidths ) {
|
|||
}
|
||||
|
||||
bool QuadEntityItem::setNormals(const QVector<glm::vec3>& normals) {
|
||||
if (_points.size () < 2) {
|
||||
if (_points.size () < 2 || _strokeWidths.size() < 2) {
|
||||
return false;
|
||||
}
|
||||
_normals = normals;
|
||||
|
@ -127,7 +127,7 @@ bool QuadEntityItem::setNormals(const QVector<glm::vec3>& normals) {
|
|||
}
|
||||
glm::vec3 v1, v2, tangent, binormal, point;
|
||||
for (int i = 0; i < _points.size()-1; i++) {
|
||||
float width = (static_cast <float> (rand()) / static_cast <float> (RAND_MAX) * .1) + .02;
|
||||
float width = _strokeWidths.at(i);
|
||||
point = _points.at(i);
|
||||
//Get tangent
|
||||
tangent = _points.at(i+1) - point;
|
||||
|
|
Loading…
Reference in a new issue