History

Delete old sitting points code

Atlante45 committed 9 years ago

Commit 73dd2ab1 parent 92e3f876 files · +5 −88Browse files

Showing the changes to libraries/entities/src/EntityScriptingInterface.cpp (1 of 6 files). Show all

Unified · Split

libraries/entities/src/EntityScriptingInterface.cpp+2−4
@@ -292,13 +292,11 @@ EntityItemProperties EntityScriptingInterface::getEntityProperties(QUuid identit · 291 unmodified lines
292 292
293 results = entity->getProperties(desiredProperties);293 results = entity->getProperties(desiredProperties);
294 294
295 // TODO: improve sitting points and naturalDimensions in the future,295 // TODO: improve naturalDimensions in the future,
296 // for now we've included the old sitting points model behavior for entity types that are models296 // for now we've added this hack for setting natural dimensions of models
297 // we've also added this hack for setting natural dimensions of models
298 if (entity->getType() == EntityTypes::Model) {297 if (entity->getType() == EntityTypes::Model) {
299 const FBXGeometry* geometry = _entityTree->getGeometryForEntity(entity);298 const FBXGeometry* geometry = _entityTree->getGeometryForEntity(entity);
300 if (geometry) {299 if (geometry) {
301 results.setSittingPoints(geometry->sittingPoints);
302 Extents meshExtents = geometry->getUnscaledMeshExtents();300 Extents meshExtents = geometry->getUnscaledMeshExtents();
303 results.setNaturalDimensions(meshExtents.maximum - meshExtents.minimum);301 results.setNaturalDimensions(meshExtents.maximum - meshExtents.minimum);
304 results.calculateNaturalPosition(meshExtents.minimum, meshExtents.maximum);302 results.calculateNaturalPosition(meshExtents.minimum, meshExtents.maximum);