mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 05:23:33 +02:00
Style guide corrections
This commit is contained in:
parent
0c03b4ec53
commit
3e2dbe58ec
1 changed files with 4 additions and 9 deletions
|
@ -158,22 +158,19 @@ void PolyLineEntityItem::calculateScaleAndRegistrationPoint() {
|
||||||
|
|
||||||
if (point.x > high.x){
|
if (point.x > high.x){
|
||||||
high.x = point.x;
|
high.x = point.x;
|
||||||
}
|
} else if (point.x < low.x) {
|
||||||
else if (point.x < low.x) {
|
|
||||||
low.x = point.x;
|
low.x = point.x;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (point.y > high.y){
|
if (point.y > high.y){
|
||||||
high.y = point.y;
|
high.y = point.y;
|
||||||
}
|
} else if (point.y < low.y) {
|
||||||
else if (point.y < low.y) {
|
|
||||||
low.y = point.y;
|
low.y = point.y;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (point.z > high.z){
|
if (point.z > high.z){
|
||||||
high.z = point.z;
|
high.z = point.z;
|
||||||
}
|
} else if (point.z < low.z) {
|
||||||
else if (point.z < low.z) {
|
|
||||||
low.z = point.z;
|
low.z = point.z;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -196,12 +193,10 @@ void PolyLineEntityItem::calculateScaleAndRegistrationPoint() {
|
||||||
glm::vec3 startPointInScaleSpace = point - low;
|
glm::vec3 startPointInScaleSpace = point - low;
|
||||||
glm::vec3 newRegistrationPoint = startPointInScaleSpace / result;
|
glm::vec3 newRegistrationPoint = startPointInScaleSpace / result;
|
||||||
EntityItem::setRegistrationPoint(newRegistrationPoint);
|
EntityItem::setRegistrationPoint(newRegistrationPoint);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
// if Polyline has only one or fewer points, use default dimension settings
|
// if Polyline has only one or fewer points, use default dimension settings
|
||||||
SpatiallyNestable::setScale(glm::vec3(1.0f, 1.0f, 1.0f));
|
SpatiallyNestable::setScale(glm::vec3(1.0f, 1.0f, 1.0f));
|
||||||
EntityItem::setRegistrationPoint(glm::vec3(0.0f, 0.0f, 0.0f));
|
EntityItem::setRegistrationPoint(glm::vec3(0.0f, 0.0f, 0.0f));
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue