overte-HifiExperiments/libraries
LaShonda Hopper 5b50b362f1 [WL21389] WL21389 PR2: Representation of collision shapes need updating (details below).
This commit adds support for the polyhedrons and polygons sans
Torus and Quad which aren't currently supported within GeometryCache.

* Moves GeometryCache::_shapes from public to private scope
    * Nothing aside from the class should be directly altering this, only querying
    * Updated instances of direct referencing which looks to have been limited to prior
      testing of instancing and shapes.
* Adds an accessor function for ShapeData to GeometryCache
* Consolidates point list generation to helper function
    * GeometryCache::computeSimpleHullPointListForShape
* Moves GeometryCache::Shape to entity::Shape mapping to GeometryCache from
  RenderableShapeEntityItem
    * Adds conversion accessor to GeometryCache, GeometryCache::Shape getShapeForEntityShape
* Sets ShapeEntityItem::ShapeInfoCalculator callback committed earlier.
    * This helps circumvent the issue with library inclusion.  entity-render knows about
      entity; however, entity doesn't know about entity-renderer; however, GeometryCache
      data is needed within entity::ShapeEntityItem to compose the ShapeInfo point list data.
    * This callback is set up within Application::init of the Interface as it knows about
      both halves of the equation, and the callback needs to be setup prior to any entities
      collision data getting generated.
* Removes _type reset within ShapeInfo::setPointCollection
    * This should avoid any issues due to subversively setting the type or
      incorrectly setting the type as a tangential operation.
        * Audited instances of ShapeInfo::setPointCollection and all seemed to be
          calling the function immediately after having set the type via
          ShapeInfo::setParams
* Adds new ShapeType: SHAPE_TYPE_CIRCLE
    * This type is reserved for the circle which is now treated as a special
      type of Cylinder_Y with regard to collision as opposed to a simple hull.
    * Fixes the issue where jumping on a circle, at times, would
      result in the avatar sliding off towards an edge as if atop a
      squished cone.
* Also updates ShapeInfo::getType() to return ShapeType as opposed to int
    * Auditing calls showed that majority of places were comparing against ShapeType
    * ShapeType::_type is a ShapeType so returning the type explicitly
      is more consistent.
        * ShapeInfo file houses ShapeType enum so any file aware of ShapeInfo is aware of
          ShapeType enumeration.
* entity::Quad defaults to SHAPE_TYPE_ELLIPSOID
    * Like entity::Shape::Torus, entity::Shape::Quad is currently unsupported within
      GeometryCache::buildShapes.
    * Also it appears that a Quad shape can't be created within world via the creation menu.
        * There's no explicit option at present to create one.
        * Trying subvert the Cube/Box creation option to generate one results in an enforced
          stubby box as opposed to a quad.
    * Given the aforementioned points, entity::Shape::Quad will default to
      SHAPE_TYPE_ELLIPSOID as opposed to SHAPE_TYPE_BOX.
        * Added Todo regarding the shape being unsupported along with a notation to create
          a special ShapeType, SHAPE_TYPE_QUAD, for it should it be added in the future.
* Adds some comments and has some minor clean up.

Reviewed-by: Leander Hasty <leander@1stplayable.com>

Changes Committed:
	modified:   interface/src/Application.cpp
	modified:   interface/src/Util.cpp
	modified:   interface/src/Util.h
	modified:   libraries/entities-renderer/src/RenderableShapeEntityItem.cpp
	modified:   libraries/entities/src/ShapeEntityItem.cpp
	modified:   libraries/entities/src/ShapeEntityItem.h
	modified:   libraries/physics/src/ShapeFactory.cpp
	modified:   libraries/render-utils/src/GeometryCache.cpp
	modified:   libraries/render-utils/src/GeometryCache.h
	modified:   libraries/shared/src/ShapeInfo.cpp
	modified:   libraries/shared/src/ShapeInfo.h
	modified:   tests/gpu-test/src/TestInstancedShapes.cpp
2017-10-24 14:16:17 -04:00
..
animation cleanup WANT_DETAILED_PROFILING 2017-10-19 14:31:50 -07:00
audio Merge pull request #11538 from kencooke/audio-mac-bugfix2 2017-10-17 11:02:55 -07:00
audio-client Merge branch 'master' into android_new 2017-09-26 14:31:29 -07:00
auto-updater
avatars Merge pull request #11326 from cain-kilgore/21537 2017-10-06 08:51:42 -07:00
avatars-renderer handle camera-relative controller joints for other avatars 2017-10-17 12:36:15 -07:00
baking Merge pull request #11585 from huffman/fix/draco-material-ids 2017-10-20 11:32:31 -07:00
controllers New android toolchain 2017-09-19 13:45:12 -07:00
display-plugins build error 2017-10-09 11:48:54 -07:00
embedded-webserver
entities [WL21389] WL21389 PR2: Representation of collision shapes need updating (details below). 2017-10-24 14:16:17 -04:00
entities-renderer [WL21389] WL21389 PR2: Representation of collision shapes need updating (details below). 2017-10-24 14:16:17 -04:00
fbx Merge branch 'master' into android_new 2017-09-26 14:31:29 -07:00
gl WIP - working on byte order in server messages. 2017-10-04 11:56:35 -07:00
gpu Merge pull request #11542 from SamGondelman/bubbleBoy 2017-10-10 14:26:20 -07:00
gpu-gl Merged with master 2017-10-10 12:11:23 +02:00
gpu-gles New android toolchain 2017-09-19 13:45:12 -07:00
image Fixed cube map conversion from equirectangular maps when done after HDR conversion 2017-10-13 11:05:27 +02:00
input-plugins New android toolchain 2017-09-19 13:45:12 -07:00
ktx Merged with master 2017-10-10 12:11:23 +02:00
midi New android toolchain 2017-09-19 13:45:12 -07:00
model Code review fixes. 2017-10-20 14:27:27 -07:00
model-networking Merge pull request #11571 from huffman/fix/ktx-thrashing 2017-10-13 11:53:24 -07:00
networking CR feedback 2017-10-22 11:40:41 -07:00
octree WIP - working on byte order in server messages. 2017-10-04 11:56:35 -07:00
physics [WL21389] WL21389 PR2: Representation of collision shapes need updating (details below). 2017-10-24 14:16:17 -04:00
plugins move hud rendering to render thread, still need to separate out hud overlays 2017-09-29 09:49:08 -07:00
pointers Merge branch 'pointers' of https://github.com/highfidelity/hifi into pointers 2017-10-17 13:23:08 -07:00
procedural Merge branch 'master' into android_new 2017-09-26 14:31:29 -07:00
recording
render Merge branch 'master' into hazeZone 2017-10-11 22:12:52 -07:00
render-utils [WL21389] WL21389 PR2: Representation of collision shapes need updating (details below). 2017-10-24 14:16:17 -04:00
script-engine move remoteCallerID to Script.remoteCallerID 2017-10-22 17:14:11 -07:00
shared [WL21389] WL21389 PR2: Representation of collision shapes need updating (details below). 2017-10-24 14:16:17 -04:00
trackers
ui Code style fixes 2017-10-20 15:12:09 +02:00
ui-plugins