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

Keep using normalize, or translate? #2

Open
fhb1990 opened this issue Dec 17, 2018 · 2 comments
Open

Keep using normalize, or translate? #2

fhb1990 opened this issue Dec 17, 2018 · 2 comments

Comments

@fhb1990
Copy link
Owner

fhb1990 commented Dec 17, 2018

The position of the vertices of the geometries is taken from the vertices values in the CityJSON files. However, we encountered problems when trying to view files with "high" vertex x,y-values. The viewer now uses mesh.geometry.normalize() which rescales and translates the geometry, making the geometry centered at (0, 0, 0) and have a bounding sphere of radius 1.0. For viewing purposes this is fine, however, maybe the sizes need to be maintained for certain applications (e.g. measuring distances in the viewer) if the viewer would be extended with other functionalities in the future. This doesn't seem to be a problem for now.

@hugoledoux
Copy link
Contributor

hugoledoux commented Jan 18, 2019

I am not sure what normalize() does, but you could use the trick from geo1015-hw02 and translate to (minx,miny,minz) first and then normalise? Or does it do this?

Or translate first, then normalise? Try them

@fhb1990
Copy link
Owner Author

fhb1990 commented Jan 29, 2019

Yes, this is exactly what mesh.geometry.normalize() does.

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

No branches or pull requests

2 participants