mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 11:45:36 +02:00
Remove the attempt to determine the maximum width of a PolyLineEntity's strokes
using the _strokeWidths[] array, as the values don't seem to correspond with reality. Use a flat 0.075M value for the maxium half of a stroke width instead.
This commit is contained in:
parent
87139f5d82
commit
8d248f5ccd
1 changed files with 1 additions and 9 deletions
|
@ -182,17 +182,9 @@ void PolyLineEntityItem::calculateScaleAndRegistrationPoint() {
|
|||
EntityItem::setRegistrationPoint(glm::vec3(0.5f));
|
||||
return;
|
||||
}
|
||||
|
||||
// Find the max width of the strokes so we can account for that in the size of the bounding box
|
||||
float maxWidth = 0.0f;
|
||||
for (int i = 0; i < _strokeWidths.size(); ++i) {
|
||||
if (_strokeWidths.at(i) > maxWidth) {
|
||||
maxWidth = _strokeWidths.at(i);
|
||||
}
|
||||
}
|
||||
|
||||
glm::vec3 result;
|
||||
float halfLineWidth = (maxWidth > 0.0f) ? maxWidth * 0.5f : 0.0f;
|
||||
const float halfLineWidth = 0.075f; // sadly _strokeWidths() don't seem to correspond to reality, so just use a flat assumption of the stroke width
|
||||
result.x = fabsf(high.x) + fabsf(low.x) + halfLineWidth;
|
||||
result.y = fabsf(high.y) + fabsf(low.y) + halfLineWidth;
|
||||
result.z = fabsf(high.z) + fabsf(low.z) + halfLineWidth;
|
||||
|
|
Loading…
Reference in a new issue