Commit graph

208 commits

Author SHA1 Message Date
LaShonda Hopper
226d51b8f5 [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
2017-10-24 14:16:25 -04:00
LaShonda Hopper
7f9ce5a4cd [WL21389][BuildFix] Minor refactor due to render-utils lib change (details below).
As of Commit b93e91b9, render-utils no longer knows about entity lib.
This commit adjusts for that by altering the signature of
GeometryCache::computeSimpleHullPointListForShape to take in portions
of ShapeEntityItem data as opposed to the entity pointer.

Fixes build failure mentioned in:
 https://github.com/highfidelity/hifi/pull/11336#issuecomment-333635794

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

Changes Committed:
	modified:   interface/src/Util.cpp
	modified:   libraries/render-utils/src/GeometryCache.cpp
	modified:   libraries/render-utils/src/GeometryCache.h
2017-10-24 14:16:23 -04:00
LaShonda Hopper
d2350974b5 [WL21389] Avoid vector copy within shapeInfoCalculator.
Reviewed-by: Leander Hasty <leander@1stplayable.com>

Changes Committed:
	modified:   interface/src/Util.cpp
2017-10-24 14:16:23 -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
samcake
20d8c11e28 ALmost there, getting eback everything to work with the light and background stages in the scene, not in deferredLighting Effect anymore 2017-06-22 17:54:16 -07:00
Brad Davis
2d0bbf70ae Migrate core avatar rendering functionality to library 2017-05-04 14:08:59 -07:00
Brad Davis
2705ee7030 Remove the use of implicit ids in geometry cache 2016-10-19 11:18:25 -07:00
Zach Pomerantz
3619821b82 Improve timing tests with averages 2016-05-04 13:23:10 -07:00
Zach Pomerantz
0f6162d683 Use appropriate units for timing tests 2016-05-04 13:23:10 -07:00
Atlante45
7e8ea4dc77 Update primitive instance rendering calls 2016-02-01 18:50:01 +01:00
Atlante45
11dc3cd261 Move primitive rendering out of DeferredLightingEffect 2016-01-13 11:47:43 -08:00
Atlante45
ba5c20b7a6 Header cleanup 2015-10-06 13:56:24 -07:00
Bradley Austin Davis
e024d23366 Instancing work, second pass 2015-09-21 13:27:02 -07:00
Thijs Wenker
bbd6f25ff7 style fixes 2015-08-23 20:01:58 +02:00
Thijs Wenker
63f0173665 extend world boundaries 2015-08-23 19:52:29 +02:00
Nex Pro
53a63fed79 Changed constants red, green, blue and grey to uppercase as per style guide. 2015-08-23 17:16:23 +01:00
Nex Pro
0ef2def56e changed default DASH_LENGTH and GAP_LENGTH to 1.0f 2015-08-23 16:52:12 +01:00
Nex Pro
3e8970cc1e corrected declaration of float constants DASH_LENGTH and GAP_LENGTH as per style guide. 2015-08-23 16:49:39 +01:00
Nex Pro
ad315cf68a Merge branch '20660' of github.com:thoys/hifi into 20660
Conflicts:
	interface/src/Util.cpp
2015-08-23 16:30:46 +01:00
Nex Pro
1f08444369 Modified the world box to render axes in negative space
Also Modified renderDashedLine to accept params for dash len and gap len so we can display negative axes as dashed lines with 500mm dashes and gaps.
2015-08-23 16:21:20 +01:00
ZappoMan
65864b1876 only draw axis for HALF_TREE_SCALE 2015-08-14 15:30:16 -07:00
ZappoMan
7c6a9b131d some CR cleanup 2015-08-14 10:17:48 -07:00
ZappoMan
4fe8f49d4c move origin to center of domain 2015-08-11 23:47:40 -07:00
ZappoMan
c2113ea96b remove non-batch versions of GeometryCache renderXYZ() methods 2015-07-23 07:42:58 -07:00
Brad Davis
35f7307f30 More header cleanup 2015-07-18 22:15:50 -07:00
Brad Davis
89faf85ad9 Working on text rendering overlays 2015-07-16 15:56:01 -07:00
ZappoMan
e39ea72daf removed dead code 2015-07-14 21:25:49 -07:00
ZappoMan
7790e35d24 added bytes consumed result to decode, and exit early after bytes consumed 2015-07-08 18:19:12 -07:00
ZappoMan
e885ac1821 improved performance of ByteCountCoding<> decode 2015-07-08 17:32:51 -07:00
Seth Alves
508ae276c6 enable -Wdouble-promotion 2015-06-16 18:23:10 -07:00
ZappoMan
b50b7dd500 CR feedback 2015-06-08 14:36:31 -07:00
Atlante45
6dc3bf9285 Fix world box messing up everything 2015-06-04 13:48:39 +02:00
Ryan Huffman
b8f3c42712 Update renderWorldBox to use batches 2015-06-03 09:03:04 -07:00
Sam Gateau
453fa87654 making sure the proj and view matrix are correctly assigned 2015-06-02 14:31:40 -07:00
Seth Alves
fc5b442e12 interface is reserved, so use interfaceapp as the logging tag for interface. also experiment with a macro for logging 2015-04-07 09:15:11 -07:00
Seth Alves
fb607e2b26 logging groups for library/shared and interface 2015-04-06 18:45:06 -07:00
ZappoMan
2f981686fa fix bad colors on windows 2015-02-09 15:38:50 -08:00
Brad Davis
0c78af9abb Working on text rendering refactor 2015-02-03 18:57:39 -08:00
ZappoMan
2f4e98082b remove glColor calls related to text rendering 2015-01-28 13:54:48 -08:00
ZappoMan
7d9de6d0eb added some TODO comments and some cleanup 2015-01-28 11:03:05 -08:00
ZappoMan
4a6cc5c6f2 Merge branch 'master' of https://github.com/highfidelity/hifi into gpuStreamizing
Conflicts:
	interface/src/avatar/Hand.cpp
	interface/src/ui/overlays/ImageOverlay.cpp
2015-01-27 16:44:11 -08:00
Atlante45
6a00dcbf0a More switches to new Settings 2015-01-20 00:30:29 -08:00
ZappoMan
db94949649 Merge branch 'master' of https://github.com/highfidelity/hifi into gpuStreamizing
Conflicts:
	interface/src/avatar/SkeletonModel.cpp
2015-01-14 17:55:03 -08:00
ZappoMan
e6388a65b9 rough pass at adding color to geometry cache 2015-01-13 20:53:05 -08:00
Atlante45
2a82ff9768 Merge branch 'master' of https://github.com/highfidelity/hifi into applications_diet_cpp11
Conflicts:
	assignment-client/src/voxels/VoxelServer.cpp
	interface/src/Application.cpp
	interface/src/Audio.cpp
	interface/src/DatagramProcessor.cpp
	interface/src/Menu.cpp
	interface/src/Util.cpp
	interface/src/avatar/MyAvatar.cpp
	interface/src/ui/ApplicationOverlay.cpp
	interface/src/ui/PreferencesDialog.cpp
	libraries/networking/src/NodeList.cpp
	libraries/shared/src/DependencyManager.h
2015-01-13 11:03:14 -08:00
ZappoMan
a03c2b79fa first cut at adding colors to GeometryCache and supporting batch internally 2015-01-08 15:52:33 -08:00
ZappoMan
bd1612f6a4 Merge branch 'master' of https://github.com/highfidelity/hifi into gpuStreamizing 2015-01-05 16:51:31 -08:00
ZappoMan
a20fa1242d first cut are removing immediate mode GL_LINES 2015-01-05 15:46:48 -08:00
ZappoMan
c2d45df541 add renderBevelCornersRect to GeometryCache 2015-01-05 14:39:14 -08:00
ZappoMan
49d8f2b2f5 more work on voxelEctomy 2014-12-30 18:52:33 -08:00