[WL21389] Fix scaling issue when computing hull point list (details below).

The entity dimensions should be scaled by 1 as opposed to 0.5.

Changes Committed:
    modified:   interface/src/Util.cpp
    modified:   libraries/render-utils/src/GeometryCache.cpp
    modified:   libraries/render-utils/src/GeometryCache.h
This commit is contained in:
LaShonda Hopper 2017-10-23 16:44:33 -04:00
parent d027993ac0
commit 226d51b8f5
3 changed files with 4 additions and 4 deletions

View file

@ -407,7 +407,7 @@ void shapeInfoCalculator(const ShapeEntityItem * const shapeEntity, ShapeInfo &s
ShapeInfo::PointList points;
pointCollection.push_back(points);
GeometryCache::computeSimpleHullPointListForShape((int)shapeEntity->getShape(), shapeEntity->getDimensions() * 0.5f, pointCollection.back());
GeometryCache::computeSimpleHullPointListForShape((int)shapeEntity->getShape(), shapeEntity->getDimensions(), pointCollection.back());
shapeInfo.setPointCollection(pointCollection);
}

View file

@ -109,7 +109,7 @@ static gpu::Stream::FormatPointer INSTANCED_SOLID_FADE_STREAM_FORMAT;
static const uint SHAPE_VERTEX_STRIDE = sizeof(glm::vec3) * 2; // vertices and normals
static const uint SHAPE_NORMALS_OFFSET = sizeof(glm::vec3);
void GeometryCache::computeSimpleHullPointListForShape(const int entityShape, const glm::vec3 &entityHalfExtents, QVector<glm::vec3> &outPointList) {
void GeometryCache::computeSimpleHullPointListForShape(const int entityShape, const glm::vec3 &entityExtents, QVector<glm::vec3> &outPointList) {
auto geometryCache = DependencyManager::get<GeometryCache>();
const GeometryCache::Shape geometryShape = GeometryCache::getShapeForEntityShape( entityShape );
@ -150,7 +150,7 @@ void GeometryCache::computeSimpleHullPointListForShape(const int entityShape, co
uniqueVerts.push_back(curVert);
outPointList.push_back(curVert * entityHalfExtents);
outPointList.push_back(curVert * entityExtents);
}
}

View file

@ -155,7 +155,7 @@ public:
static GeometryCache::Shape getShapeForEntityShape(int entityShapeEnum);
static QString stringFromShape(GeometryCache::Shape geoShape);
static void computeSimpleHullPointListForShape(int entityShape, const glm::vec3 &entityHalfExtents, QVector<glm::vec3> &outPointList);
static void computeSimpleHullPointListForShape(int entityShape, const glm::vec3 &entityExtents, QVector<glm::vec3> &outPointList);
static uint8_t CUSTOM_PIPELINE_NUMBER;
static render::ShapePipelinePointer shapePipelineFactory(const render::ShapePlumber& plumber, const render::ShapeKey& key);