mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-20 01:04:59 +01:00
Merge branch 'master' into feat/renderers-cleanup
This commit is contained in:
@@ -88,6 +88,23 @@ void TAnimContainer::SetTranslateAnim(glm::dvec3 vNewTranslate, double fNewSpeed
|
||||
}
|
||||
}
|
||||
|
||||
void TAnimContainer::Finish()
|
||||
{
|
||||
// the next UpdateModel() finds them there and ends the animation as it would have
|
||||
if (fRotateSpeed != 0.0)
|
||||
vRotateAngles = vDesiredAngles;
|
||||
if (fTranslateSpeed != 0.0)
|
||||
vTranslation = vTranslateTo;
|
||||
// and the submodel takes them now: one brought back to its rest is no longer prepared, it'd keep the angles of the jump
|
||||
// before, where the frames of a run leave it a step short of the rest only
|
||||
if (pSubModel) {
|
||||
if (iAnim & 1)
|
||||
pSubModel->SetRotateXYZ(vRotateAngles);
|
||||
if (iAnim & 2)
|
||||
pSubModel->SetTranslate(vTranslation);
|
||||
}
|
||||
}
|
||||
|
||||
// przeliczanie animacji wykonać tylko raz na model
|
||||
void TAnimContainer::UpdateModel() {
|
||||
|
||||
@@ -823,7 +840,7 @@ void TAnimModel::AnimUpdate(double dt)
|
||||
// For non-uniform scale we use the largest axis factor so the bounding sphere
|
||||
// fully contains the scaled model — undersizing would cause incorrect culling.
|
||||
float
|
||||
TAnimModel::radius_() {
|
||||
TAnimModel::radius_() const {
|
||||
|
||||
if( pModel == nullptr ) { return 0.f; }
|
||||
float const max_scale = std::max( { m_scale.x, m_scale.y, m_scale.z } );
|
||||
|
||||
Reference in New Issue
Block a user