From 28d727153b4418c277b2d4cbf75584cddf4d233f Mon Sep 17 00:00:00 2001 From: Brad Davis Date: Tue, 27 Jun 2017 19:22:07 -0700 Subject: [PATCH] PR feedback --- .../src/RenderableModelEntityItem.cpp | 13 ++++--------- .../src/model-networking/SimpleMeshProxy.cpp | 4 ++-- .../src/model-networking/SimpleMeshProxy.h | 4 ++-- libraries/model/src/model/Forward.h | 6 +++--- 4 files changed, 11 insertions(+), 16 deletions(-) diff --git a/libraries/entities-renderer/src/RenderableModelEntityItem.cpp b/libraries/entities-renderer/src/RenderableModelEntityItem.cpp index b8e869e4d9..0547c60364 100644 --- a/libraries/entities-renderer/src/RenderableModelEntityItem.cpp +++ b/libraries/entities-renderer/src/RenderableModelEntityItem.cpp @@ -580,21 +580,16 @@ EntityItemProperties RenderableModelEntityItem::getProperties(EntityPropertyFlag } - const FBXGeometry* geometry = NULL; - const_cast(this)->getModel(); if (_model && _model->isLoaded()) { - geometry = &_model->getFBXGeometry(); - } - - // TODO: improve naturalDimensions in the future, - // for now we've added this hack for setting natural dimensions of models - if (geometry) { - Extents meshExtents = geometry->getUnscaledMeshExtents(); + // TODO: improve naturalDimensions in the future, + // for now we've added this hack for setting natural dimensions of models + Extents meshExtents = _model->getFBXGeometry().getUnscaledMeshExtents(); properties.setNaturalDimensions(meshExtents.maximum - meshExtents.minimum); properties.calculateNaturalPosition(meshExtents.minimum, meshExtents.maximum); } + return properties; } diff --git a/libraries/model-networking/src/model-networking/SimpleMeshProxy.cpp b/libraries/model-networking/src/model-networking/SimpleMeshProxy.cpp index 40b30154bf..b44ea1ff56 100644 --- a/libraries/model-networking/src/model-networking/SimpleMeshProxy.cpp +++ b/libraries/model-networking/src/model-networking/SimpleMeshProxy.cpp @@ -1,6 +1,6 @@ // -// MeshProxy.cpp -// libraries/model/src/model/ +// SimpleMeshProxy.cpp +// libraries/model-networking/src/model-networking/ // // Created by Seth Alves on 2017-3-22. // Copyright 2017 High Fidelity, Inc. diff --git a/libraries/model-networking/src/model-networking/SimpleMeshProxy.h b/libraries/model-networking/src/model-networking/SimpleMeshProxy.h index b82e501673..24c3fca27e 100644 --- a/libraries/model-networking/src/model-networking/SimpleMeshProxy.h +++ b/libraries/model-networking/src/model-networking/SimpleMeshProxy.h @@ -1,6 +1,6 @@ // -// MeshProxy.h -// libraries/model/src/model/ +// SimpleMeshProxy.h +// libraries/model-networking/src/model-networking/ // // Created by Seth Alves on 2017-1-27. // Copyright 2017 High Fidelity, Inc. diff --git a/libraries/model/src/model/Forward.h b/libraries/model/src/model/Forward.h index 362eabb454..90f55fa64f 100644 --- a/libraries/model/src/model/Forward.h +++ b/libraries/model/src/model/Forward.h @@ -1,9 +1,9 @@ // -// Geometry.h +// Forward.h // libraries/model/src/model // -// Created by Sam Gateau on 12/5/2014. -// Copyright 2014 High Fidelity, Inc. +// Created by Bradley Austin Davis on 2017/06/21 +// Copyright 2013-2017 High Fidelity, Inc. // // Distributed under the Apache License, Version 2.0. // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html