When computing the buffer view offset for ShapeData the vertex vector
size should be scaled by a single vec3 size as opposed to 2.
This fix is taken from PR discussion:
https://github.com/1P-Cusack/hifi/pull/10
Proposed by: Andrew Meadows <andrew@highfidelity.io>
Changes Committed:
modified: libraries/render-utils/src/GeometryCache.cpp
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
* Renamed squared var to be consistent with format of others in the code base.
* Removed fabsf() that was accidentally left in.
* Reduced squared distance filter within GeometryCache::computeSimpleHullPointListForShape
as suggested from 0.0025f to recommended 1.0e-6f (1mm^2).
Feedback Link: https://github.com/highfidelity/hifi/pull/11336#pullrequestreview-70060918
Changes Committed:
modified: libraries/render-utils/src/GeometryCache.cpp
* Adjusts GeometryCache::computeSimpleHullPointListForShape to utilize
ShapeData::_positionView as opposed to _normalView.
** Also filters out duplicate points or points close enough to be considered
duplicate vertices. This provides ShapeFactory with better point data
and should reduce hits to the dedupe pass within createConvexHull.
Tested:
* Octagon & Tetrahedron
** They looked better than the prior commit, behaved closer to their shape as opposed
to cone or narrow cylinder like.
Note:
* These changes are based on debug info observations using the Octagon and
discussion with Andrew Meadows via Slack & https://github.com/highfidelity/hifi/pull/11336#pullrequestreview-69939120
Changes Committed:
modified: libraries/render-utils/src/GeometryCache.cpp
modified: libraries/render-utils/src/GeometryCache.h
* Added remaining cylinder/capsule shapes to computeVolume
* Point lists are generated during computeShapeInfo, so shouldn't
need to be cleared within setParams.
** setSphere/setBox appear to be clear as they're used in tests or
in local scopes without using point data.
Reviewed-by: Leander Hasty <leander@1stplayable.com>
Changes Committed:
modified: libraries/shared/src/ShapeInfo.cpp