mirror of
https://github.com/overte-org/overte.git
synced 2025-07-23 22:23:50 +02:00
Merge branch 'master' of github.com:highfidelity/hifi into fix-throwing
This commit is contained in:
commit
c034879b74
2 changed files with 260 additions and 264 deletions
|
@ -43,7 +43,6 @@ ModelOverlay::ModelOverlay(const ModelOverlay* modelOverlay) :
|
||||||
void ModelOverlay::update(float deltatime) {
|
void ModelOverlay::update(float deltatime) {
|
||||||
if (_updateModel) {
|
if (_updateModel) {
|
||||||
_updateModel = false;
|
_updateModel = false;
|
||||||
|
|
||||||
_model->setSnapModelToCenter(true);
|
_model->setSnapModelToCenter(true);
|
||||||
_model->setScaleToFit(true, getDimensions());
|
_model->setScaleToFit(true, getDimensions());
|
||||||
_model->setRotation(getRotation());
|
_model->setRotation(getRotation());
|
||||||
|
@ -87,7 +86,6 @@ void ModelOverlay::render(RenderArgs* args) {
|
||||||
void ModelOverlay::setProperties(const QVariantMap& properties) {
|
void ModelOverlay::setProperties(const QVariantMap& properties) {
|
||||||
auto position = getPosition();
|
auto position = getPosition();
|
||||||
auto rotation = getRotation();
|
auto rotation = getRotation();
|
||||||
auto scale = getDimensions();
|
|
||||||
|
|
||||||
Volume3DOverlay::setProperties(properties);
|
Volume3DOverlay::setProperties(properties);
|
||||||
|
|
||||||
|
@ -95,14 +93,7 @@ void ModelOverlay::setProperties(const QVariantMap& properties) {
|
||||||
_updateModel = true;
|
_updateModel = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (scale != getDimensions()) {
|
|
||||||
auto newScale = getDimensions();
|
|
||||||
if (newScale.x <= 0 || newScale.y <= 0 || newScale.z <= 0) {
|
|
||||||
setDimensions(scale);
|
|
||||||
} else {
|
|
||||||
_updateModel = true;
|
_updateModel = true;
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
auto urlValue = properties["url"];
|
auto urlValue = properties["url"];
|
||||||
if (urlValue.isValid() && urlValue.canConvert<QString>()) {
|
if (urlValue.isValid() && urlValue.canConvert<QString>()) {
|
||||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue