mirror of
https://github.com/lubosz/overte.git
synced 2025-08-16 11:13:49 +02:00
Merge pull request #11737 from AndrewMeadows/scale-to-fit_RC-58
RC-58: scaleToFit() the model before updating render items
This commit is contained in:
commit
c946e46506
2 changed files with 3 additions and 1 deletions
|
@ -215,6 +215,7 @@ void RenderableModelEntityItem::updateModelBounds() {
|
||||||
model->setScaleToFit(true, getDimensions());
|
model->setScaleToFit(true, getDimensions());
|
||||||
model->setSnapModelToRegistrationPoint(true, getRegistrationPoint());
|
model->setSnapModelToRegistrationPoint(true, getRegistrationPoint());
|
||||||
updateRenderItems = true;
|
updateRenderItems = true;
|
||||||
|
model->scaleToFit();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool success;
|
bool success;
|
||||||
|
|
|
@ -262,6 +262,8 @@ public:
|
||||||
|
|
||||||
Q_INVOKABLE MeshProxyList getMeshes() const;
|
Q_INVOKABLE MeshProxyList getMeshes() const;
|
||||||
|
|
||||||
|
void scaleToFit();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void loadURLFinished(bool success);
|
void loadURLFinished(bool success);
|
||||||
|
|
||||||
|
@ -320,7 +322,6 @@ protected:
|
||||||
virtual void initJointStates();
|
virtual void initJointStates();
|
||||||
|
|
||||||
void setScaleInternal(const glm::vec3& scale);
|
void setScaleInternal(const glm::vec3& scale);
|
||||||
void scaleToFit();
|
|
||||||
void snapToRegistrationPoint();
|
void snapToRegistrationPoint();
|
||||||
|
|
||||||
void computeMeshPartLocalBounds();
|
void computeMeshPartLocalBounds();
|
||||||
|
|
Loading…
Reference in a new issue