From 3d4df2eb7607ba953ce81d555857006a63071d0d Mon Sep 17 00:00:00 2001
From: Shaun Reed <shaunrd0@gmail.com>
Date: Sun, 23 Mar 2025 09:35:07 -0400
Subject: [PATCH] Cleanup.

---
 src/qtk/model.cpp | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/src/qtk/model.cpp b/src/qtk/model.cpp
index cb83ae6..114a837 100644
--- a/src/qtk/model.cpp
+++ b/src/qtk/model.cpp
@@ -68,7 +68,7 @@ void Model::setLightPosition(const QString & lightName, const char * uniform)
 }
 
 // Static function to access ModelManager for getting Models by name
-Model * Qtk::Model::getInstance(const char * name)
+Model * Model::getInstance(const char * name)
 {
   return mManager[name];
 }
@@ -272,13 +272,11 @@ ModelMesh::Textures Model::loadMaterialTextures(aiMaterial * mat,
 
 void Model::sortModelMeshes()
 {
-  auto cameraPos = Scene::getCamera().getTransform();
+  auto cameraPos = Scene::getCamera().getTransform().getTranslation();
   auto cameraDistance = [&cameraPos](const ModelMesh & a, const ModelMesh & b) {
     // Sort by the first vertex position in the model
-    return (cameraPos.getTranslation().distanceToPoint(
-               a.mVertices[0].mPosition))
-           < (cameraPos.getTranslation().distanceToPoint(
-               b.mVertices[0].mPosition));
+    return cameraPos.distanceToPoint(a.mVertices[0].mPosition)
+           < cameraPos.distanceToPoint(b.mVertices[0].mPosition);
   };
   std::sort(mMeshes.begin(), mMeshes.end(), cameraDistance);
 }