Skip to content
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

Extrude polygon #855

Closed
wants to merge 33 commits into from
Closed

Extrude polygon #855

wants to merge 33 commits into from

Conversation

hpinkos
Copy link
Contributor

@hpinkos hpinkos commented Jun 11, 2013

No description provided.

@pjcozzi pjcozzi mentioned this pull request Jun 13, 2013
hpinkos added 3 commits June 14, 2013 12:30
Conflicts:
	Apps/CesiumViewer/CesiumViewer.js
	Source/Core/PolygonGeometry.js
Conflicts:
	Apps/CesiumViewer/CesiumViewer.js
geometry.geometry = computeTopBottomAttributes(vertexFormat, geometry.geometry, outerPositions, ellipsoid, stRotation, true, false);
}

if (typeof geometry !== 'undefined') {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can get rid of this check because it was already made.

var length = positions.length / 2;

for ( var i = 0; i < length; i += 3) {
p.x = positions[i];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use Cartesian3.fromArray here.

@bagnell
Copy link
Contributor

bagnell commented Jun 18, 2013

@hpinkos Remember to update subdivideLine like we discussed and check to see that they are the same positions created when subdividing the polygon.

@pjcozzi
Copy link
Contributor

pjcozzi commented Jun 24, 2013

See 876718c for DebugAppearance.

Also, the batching branch has some Polygon-related test failures. Ignore them for now. Most will be fixed when we finish Columbus view.

@pjcozzi
Copy link
Contributor

pjcozzi commented Jun 24, 2013

I don't think the bounding sphere is correct. Does it take into account the extrusion? (Probably same question for the extruded extent).

The initial Polygon code also did not account for the height property when computing the bounding sphere. Can we fix that here as part of computing the bounding sphere for the extrusion?

@hpinkos
Copy link
Contributor Author

hpinkos commented Jun 24, 2013

@pjcozzi Alright, I think I corrected everything you mentioned above.

@@ -194,6 +773,19 @@ define([
* }]
* }
* });
*
* create extruded polygon
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make this a comment.

// create extruded polygon

@pjcozzi
Copy link
Contributor

pjcozzi commented Jun 25, 2013

@bagnell some texture coordinates are beyond 1.0 (same deal in the batching branch), which could be why we saw the texturing issues on extrusions a while back:

image

@pjcozzi
Copy link
Contributor

pjcozzi commented Jun 25, 2013

Are we sure the normals are right? Given normals in WGS84 coordinates, shouldn't the green face be red?

image

Also since normals range from [-1. 1]. The current DebugAppearance isn't that great for visualization since the output ranges from [0, 1]. I'll make some improvements to it and let you know when to merge.

@pjcozzi
Copy link
Contributor

pjcozzi commented Jun 25, 2013

Pull f2aea0a for slightly better normal visualization. Also verify the binormals and tangents.

@pjcozzi
Copy link
Contributor

pjcozzi commented Jun 26, 2013

@hpinkos have you verified all the attributes? Is this ready for another review?

@hpinkos
Copy link
Contributor Author

hpinkos commented Jun 26, 2013

@pjcozzi they look right to me. @bagnell, can you take a look at binormal and tangent to make sure I'm calculating them correctly for the walls?

@pjcozzi
Copy link
Contributor

pjcozzi commented Jun 27, 2013

@hpinkos checkout 8d34314 to visualize your normals, binormals, and tangents.

Also, please do this for all primitives and let us know which ones are incorrect. At least the wall primitive is incorrect.

@pjcozzi
Copy link
Contributor

pjcozzi commented Jun 28, 2013

@hpinkos checkout 8d34314 to visualize your normals, binormals, and tangents.

Where do we stand with this? Is this code ready for another review?

@hpinkos checkout 8d34314 to visualize your normals, binormals, and tangents.

Also, please do this for all primitives and let us know which ones are incorrect. At least the wall primitive is incorrect.

Any update here? Anything need fixes beyond walls?

@hpinkos
Copy link
Contributor Author

hpinkos commented Jun 28, 2013

@pjcozzi This is ready for another review. I'll let you know if I find any other primitives with incorrect normals/binormals/tangents. The one's I've looked at so far look correct.

@pjcozzi
Copy link
Contributor

pjcozzi commented Jun 28, 2013

There are some test failures. wrapLongitude is now on GeometryPipeline.

@hpinkos
Copy link
Contributor Author

hpinkos commented Jul 2, 2013

@bagnell this is ready for review

hpinkos added 3 commits July 8, 2013 16:18
Conflicts:
	Apps/CesiumViewer/CesiumViewer.js
	Source/Core/PolygonGeometry.js
@mramato mramato closed this Jul 11, 2013
@bagnell
Copy link
Contributor

bagnell commented Jul 11, 2013

@hpinkos Looks good. Merge in master and open a pull request to that then I'll merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants