less obfuscation

This commit is contained in:
Andrew Meadows 2017-05-19 15:58:54 -07:00
parent d3956b47d0
commit f80e7a3743
2 changed files with 6 additions and 11 deletions

View file

@ -82,22 +82,18 @@ int RenderableZoneEntityItem::readEntitySubclassDataFromBuffer(const unsigned ch
return bytesRead;
}
void RenderableZoneEntityItem::initialSimulation() {
_model->setScaleToFit(true, getDimensions());
_model->setSnapModelToRegistrationPoint(true, getRegistrationPoint());
_model->setRotation(getRotation());
_model->setTranslation(getPosition());
_model->simulate(0.0f);
_needsInitialSimulation = false;
}
void RenderableZoneEntityItem::updateGeometry() {
if (_model && !_model->isActive() && hasCompoundShapeURL()) {
// Since we have a delayload, we need to update the geometry if it has been downloaded
_model->setURL(getCompoundShapeURL());
}
if (_model && _model->isActive() && _needsInitialSimulation) {
initialSimulation();
_model->setScaleToFit(true, getDimensions());
_model->setSnapModelToRegistrationPoint(true, getRegistrationPoint());
_model->setRotation(getRotation());
_model->setTranslation(getPosition());
_model->simulate(0.0f);
_needsInitialSimulation = false;
}
}

View file

@ -48,7 +48,6 @@ private:
virtual void dimensionsChanged() override { EntityItem::dimensionsChanged(); notifyBoundChanged(); }
void notifyBoundChanged();
void initialSimulation();
void updateGeometry();
template<typename Lambda>