mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 04:44:11 +02:00
PR feedback
This commit is contained in:
parent
8130a91b8c
commit
28d727153b
4 changed files with 11 additions and 16 deletions
|
@ -580,21 +580,16 @@ EntityItemProperties RenderableModelEntityItem::getProperties(EntityPropertyFlag
|
|||
}
|
||||
|
||||
|
||||
const FBXGeometry* geometry = NULL;
|
||||
const_cast<RenderableModelEntityItem*>(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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue