-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add 2D/Columbus view support to the geometry pipeline. #895
Conversation
Conflicts: Source/Core/GeometryPipeline.js
…at the IDL for 2D/Columbus view.
Conflicts: Apps/CesiumViewer/CesiumViewer.js Source/Scene/Primitive.js Source/Shaders/Appearances/AllMaterialAppearanceVS.glsl Source/Shaders/Appearances/EllipsoidSurfaceAppearanceVS.glsl Source/Shaders/Appearances/PerInstanceColorAppearanceVS.glsl
Conflicts: Apps/CesiumViewer/CesiumViewer.js
…he geometry pipeline.
Conflicts: Source/Core/Geometry.js
…he Cesium viewer examples.
…riangle2D to use barycentricCoordinates. Fix tests. Move PolygonPipeline.wrapLongitude tests to GeometryPipelineSpec. Add tests for indexing triangle list, fans, and strips.
function encodePositions(primitive, geometry) { | ||
if (primitive._allowColumbusView) { | ||
// Compute 2D positions | ||
GeometryPipeline.projectTo2D(geometry); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move this to geometryPipeline
, again, to keep things at the same level of abstraction. This function is for encoding positions, not projecting 3D to 2D.
JSHint is good. Tests are good. Just those comments and we're all good. |
…e 3D bounding sphere and more updates from review.
@pjcozzi This is ready for another review. |
There are two new test failures. Ignore the first two |
@@ -41,7 +42,10 @@ Beta Releases | |||
* Added `GeometryPipeline.combine` to combine meshes for better batching. | |||
* Added `GeometryPipeline.computeNormal` to compute normals for a geometry. | |||
* Added `GeometryPipeline.computeBinormalAndTangent` to compute binormals and tangent vectors for a geometry. | |||
* Added the following functions to `GeometryPipeline` to index non-indexed primitive types: `indexLines`, `indexLineLoop`, `indexLineStrip`, `indexTriangles`, `indexTriangleFan`, and `indexTriangleStrip`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might not have been clear: we should have made these functions private and then tested everything through the function that calls the right function based on the primitive type. This fits our less-is-more ideal. We'll have less public entry points, less to doc, and less for users to learn. They will never need to call these fine-grained functions directly so why expose them.
Just those comments. Let's get this merged today. |
@pjcozzi This is ready for another review. The new bounding sphere function needs tests, but I'll do that when I write tests for everything so I can continue working on per-instance attributes. |
@pjcozzi I fixed the wrong two tests. All of the |
All good. We needed to fix those tests anyway. Thanks. |
Add 2D/Columbus view support to the geometry pipeline.
No description provided.