Code/Editor

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
Esteban Papp
2021-08-16 15:56:36 -07:00
parent e6b5342c07
commit 2963739288
51 changed files with 286 additions and 337 deletions
@@ -44,14 +44,14 @@ bool SubObjectSelectionReferenceFrameCalculator::GetFrame(Matrix34& refFrame)
if (this->nNormals > 0)
{
this->normal = this->normal / this->nNormals;
this->normal = this->normal / static_cast<float>(this->nNormals);
if (!this->normal.IsZero())
{
this->normal.Normalize();
}
// Average position.
this->pos = this->pos / this->nNormals;
this->pos = this->pos / static_cast<float>(this->nNormals);
refFrame.SetTranslation(this->pos);
}