History

[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

LaShonda Hopper committed 9 years ago

Commit 226d51b1 parent d0279933 files · +4 −4Browse files

Showing the changes to libraries/render-utils/src/GeometryCache.cpp (1 of 3 files). Show all

Unified · Split

libraries/render-utils/src/GeometryCache.cpp+2−2
@@ -109,7 +109,7 @@ static gpu::Stream::FormatPointer INSTANCED_SOLID_FADE_STREAM_FORMAT; · 108 unmodified lines
109static const uint SHAPE_VERTEX_STRIDE = sizeof(glm::vec3) * 2; // vertices and normals109static const uint SHAPE_VERTEX_STRIDE = sizeof(glm::vec3) * 2; // vertices and normals
110static const uint SHAPE_NORMALS_OFFSET = sizeof(glm::vec3);110static const uint SHAPE_NORMALS_OFFSET = sizeof(glm::vec3);
111 111
112void GeometryCache::computeSimpleHullPointListForShape(const int entityShape, const glm::vec3 &entityHalfExtents, QVector<glm::vec3> &outPointList) {112void GeometryCache::computeSimpleHullPointListForShape(const int entityShape, const glm::vec3 &entityExtents, QVector<glm::vec3> &outPointList) {
113 113
114 auto geometryCache = DependencyManager::get<GeometryCache>();114 auto geometryCache = DependencyManager::get<GeometryCache>();
115 const GeometryCache::Shape geometryShape = GeometryCache::getShapeForEntityShape( entityShape );115 const GeometryCache::Shape geometryShape = GeometryCache::getShapeForEntityShape( entityShape );
@@ -150,7 +150,7 @@ void GeometryCache::computeSimpleHullPointListForShape(const int entityShape, co · 34 unmodified lines
150 150
151 151
152 uniqueVerts.push_back(curVert);152 uniqueVerts.push_back(curVert);
153 outPointList.push_back(curVert * entityHalfExtents);153 outPointList.push_back(curVert * entityExtents);
154 }154 }
155}155}
156 156