Commit graph

53 commits

Author SHA1 Message Date
Kasen IO
21fd10d154 Revert commit 359248829c using -m 1 to temporarily fix issue 383. 2020-06-03 16:08:18 -04:00
sabrina-shanman
da5f80c139 Use std::vector types in ShapeInfo 2019-11-05 10:57:55 -08:00
Andrew Meadows
a3567dea3a clean HashKey API, reduce dependency tree 2019-02-12 15:37:09 -08:00
luiscuenca
a947c894c2 Suggested changes 2019-01-23 17:23:36 -07:00
luiscuenca
95fca826a5 Add fit AABox for avatar and implement multisphere on shapeManager 2019-01-09 17:49:19 -07:00
Andrew Meadows
bb15b3a5d5 remove ShapeInfo::contains() which was a Bad Idea 2019-01-04 12:37:23 -08:00
Andrew Meadows
6ecf850159 clarify ShapeInfo::setCapsuleY() API and use it correctly 2018-11-06 12:37:55 -08:00
sabrina-shanman
f33ee55f9e Create CollisionPick API 2018-07-19 10:33:21 -07:00
Andrew Meadows
45e571dd02 cleanup ShapeInfo::getHash() 2017-10-27 07:52:51 -07:00
LaShonda Hopper
dbd1a80046 [WL21389] Set Simulation::DIRTY_SHAPE flag when entity::Shape changes (details below).
* Fixes an issue where ShapeEntityItem's collisionShapeType wasn't updated when its
  entity::Shape type was changed.
* Adds getNameForShapeType static method to ShapeInfo.
** Moves shapeTypeNames[] from EntityItemProperties.cpp to ShapeInfo.cpp
* Adds collisionShapeType to ShapeEntityItem::debugDump

* Tested creating shapes within the Creation Menu:
** Create Menu -> (Box/Sphere)
*** Observe Properties tab auto-focus
** From Properties tab elect alternate shape type from the Shape Dropdown list.

NOTE:  While this fixes an issue with the collision shape, it doesn't completely
       resolve the issues seen with the polyhedra or polygonal shapes noticed on
       RELEASE-7130 rebase.

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

Changes Committed:
    modified:   libraries/entities/src/EntityItemProperties.cpp
    modified:   libraries/entities/src/ShapeEntityItem.cpp
    modified:   libraries/shared/src/ShapeInfo.cpp
    modified:   libraries/shared/src/ShapeInfo.h
2017-10-24 14:16:24 -04:00
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
Andrew Meadows
2299bb7718 supply minimum shape rather than null 2017-07-06 10:37:44 -07:00
Andrew Meadows
a31a861e19 fix typo: physcis --> physics 2017-05-05 09:33:50 -07:00
Andrew Meadows
10b3e7fc67 sphere shapeType for models means 'sphere' 2017-03-06 15:14:51 -08:00
Anthony J. Thibault
89ae3b3d6e Revert "Merge pull request #8691 from highfidelity/out-of-body-experience"
This reverts commit efe9571ab8, reversing
changes made to 333e9ec7f4.
2016-12-05 15:18:03 -08:00
Andrew Meadows
2bbe2be516 fix spelling: physcis --> physics 2016-12-01 10:50:10 -08:00
Andrew Meadows
207ddcea38 wrap hull about each mesh part 2016-07-09 22:25:28 -07:00
Andrew Meadows
431043e195 declare new shape types 2016-07-06 10:50:51 -07:00
Andrew Meadows
937bd0c1be SHAPE_TYPE_MESH --> SHAPE_TYPE_STATIC_MESH 2016-06-21 13:54:21 -07:00
Andrew Meadows
a519b77ae7 add SHAPE_TYPE_MESH and build mesh shapes 2016-06-20 17:29:20 -07:00
Andrew Meadows
d64729372a ShapeInfo name changes 2016-06-20 17:29:20 -07:00
Andrew Meadows
57760bca7d sort ShapeInfo data members 2016-06-20 17:29:20 -07:00
Andrew Meadows
bce8879d7c remove ShapeInfo::clearPoints()
use getPoints() by ref and then clear
2016-06-03 10:47:54 -07:00
Andrew Meadows
211bbb88e6 purge SHAPE_TYPE_ELLIPSOID which wasn't used 2016-06-03 10:47:54 -07:00
Andrew Meadows
5d9e320dd7 purge SHAPE_TYPE_LINE 2016-06-03 10:47:54 -07:00
Andrew Meadows
d591561a88 remove RenderableModelEntityItem::_points
use ShapeInfo::_points instead
2016-06-03 10:47:54 -07:00
Andrew Meadows
f3fc00bc3a add comment for why MAX_HULL_POINTS is 42 2016-05-20 09:41:26 -07:00
Andrew Meadows
5a826d696a cleanup after code review 2016-05-20 09:41:26 -07:00
Andrew Meadows
7866fcf78c trim high-point convex hulls 2016-05-20 09:41:26 -07:00
Andrew Meadows
a52ac3cc50 remove excess whitespace 2016-03-23 14:39:49 -07:00
Seth Alves
96a40bd673 basic collisions with cubic polyvoxes 2015-05-29 18:50:26 -07:00
Seth Alves
d71921fd03 Merge branch 'master' of github.com:highfidelity/hifi into polyvox 2015-05-26 10:46:02 -07:00
Andrew Meadows
466af03fa9 support for ShapeInfo::offset 2015-05-21 16:25:05 -07:00
Andrew Meadows
67f5d0773d some list management of AvatarMotionStates 2015-05-21 14:40:47 -07:00
Seth Alves
4b263cf5c8 derieve PolyVox Entity from Model Entity 2015-05-19 21:40:05 -07:00
Seth Alves
4881b0c53c copy box to make a new type of line entity item 2015-05-11 19:25:14 -07:00
Seth Alves
0fb1a83e3b quiet compiler, remove some trailing control-Ms 2015-04-25 09:20:00 -07:00
Atlante45
83490051d9 Move shape related contains() to ShapeInfo 2015-04-23 18:55:20 +02:00
Andrew Meadows
da9091a99d remove SHAPE_TYPE_CONVEX_HULL from libs and tests 2015-04-14 14:54:43 -07:00
Seth Alves
769194f046 first stab at compound hull collisions 2015-03-20 13:41:14 -07:00
Andrew Meadows
c032b29633 proper shape management for ConvexHull shapes 2015-03-18 16:29:57 -07:00
Seth Alves
2dd75fef2c remove some unneeded Q_OBJECT macros, diff minimization 2015-03-17 19:12:26 -07:00
Seth Alves
b815c365eb formatting 2015-03-13 18:57:27 -07:00
Seth Alves
2368e6e5b7 collision with a hull sort of works. there is a new memory corruption problem 2015-03-13 15:41:57 -07:00
Seth Alves
3a3e723f4e trying to figureo out where to download hull models 2015-03-11 14:26:30 -07:00
Seth Alves
1c73f50dbc started to hook up geometry downloader to ShapeInfo 2015-03-11 07:17:13 -07:00
Seth Alves
844085b514 started on hull collisions 2015-03-10 15:30:08 -07:00
Andrew Meadows
12a7021bb5 ShapeInfo computs own DoubleHashKey, gets new API 2015-02-08 15:12:44 -08:00
Andrew Meadows
28a3c3f469 separate new shape types from legacy 2015-02-03 08:34:06 -08:00
Andrew Meadows
8236837dd0 add ShapeInfo::computeVolume() 2015-01-14 15:00:31 -08:00