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 |
||
---|---|---|
android | ||
assignment-client | ||
cmake | ||
domain-server | ||
gvr-interface | ||
ice-server | ||
interface | ||
libraries | ||
plugins | ||
script-archive | ||
scripts | ||
server-console | ||
tests | ||
tools | ||
unpublishedScripts | ||
.clang-format | ||
.editorconfig | ||
.eslintrc.js | ||
.gitattributes | ||
.gitignore | ||
BUILD.md | ||
BUILD_ANDROID.md | ||
BUILD_LINUX.md | ||
BUILD_OSX.md | ||
BUILD_WIN.md | ||
CMakeGraphvizOptions.cmake | ||
CMakeLists.txt | ||
CONTRIBUTING.md | ||
INSTALL.md | ||
LICENSE | ||
README.md |
High Fidelity (hifi) is an early-stage technology lab experimenting with Virtual Worlds and VR.
In this repository you'll find the source to many of the components in our alpha-stage virtual world. The project embraces distributed development and if you'd like to help, we'll pay you -- find out more at Worklist.net. If you find a small bug and have a fix, pull requests are welcome. If you'd like to get paid for your work, make sure you report the bug via a job on Worklist.net.
We're hiring! We're looking for skilled developers; send your resume to hiring@highfidelity.com
Chat with us
Come chat with us in our Gitter if you have any questions or just want to say hi!
Documentation
Documentation is available at docs.highfidelity.com, if something is missing, please suggest it via a new job on Worklist (add to the hifi-docs project).
There is also detailed documentation on our coding standards.
Build Instructions
All information required to build is found in the build guide.
Running Interface
When you launch interface, you will automatically connect to our default domain: "root.highfidelity.io".
If you don't see anything, make sure your preferences are pointing to root.highfidelity.io (set your domain via Cmnd+D/Cntrl+D), if you still have no luck it's possible our servers are simply down; if you're experiencing a major bug, let us know by adding an issue to this repository. Make sure to include details about your computer and how to reproduce the bug.
To move around in-world, use the arrow keys (and Shift + up/down to fly up or down) or W A S D, and E or C to fly up/down. All of the other possible options and features are available via menus in the Interface application.
Running your own servers
The assignment-client and domain-server are architectural components that will allow you to run the full stack of the virtual world.
In order to set up your own virtual world, you need to set up and run your own local "domain".
The domain-server gives a number different types of assignments to the assignment-client for different features: audio, avatars, voxels, particles, meta-voxels and models.
Follow the instructions in the build guide to build the various components.
From the domain-server build directory, launch a domain-server.
./domain-server
Then, run an assignment-client. The assignment-client uses localhost as its assignment-server and talks to it on port 40102 (the default domain-server port).
In a new Terminal window, run:
./assignment-client
Any target can be terminated with Ctrl-C (SIGINT) in the associated Terminal window.
This assignment-client will grab one assignment from the domain-server. You can tell the assignment-client what type you want it to be with the -t
option. You can also run an assignment-client that forks off n assignment-clients with the -n
option. The -min
and -max
options allow you to set a range of required assignment-clients, this allows you to have flexibility in the number of assignment-clients that are running. See --help
for more options.
./assignment-client --min 6 --max 20
To test things out you'll want to run the Interface client.
To access your local domain in Interface, open your Preferences -- on OS X this is available in the Interface menu, on Linux you'll find it in the File menu. Enter "localhost" in the "Domain server" field.
If everything worked you should see that you are connected to at least one server. Nice work!