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

If the city has no ground plane, generate one before rendering #9

Open
basicNew opened this issue Sep 28, 2016 · 0 comments
Open

If the city has no ground plane, generate one before rendering #9

basicNew opened this issue Sep 28, 2016 · 0 comments

Comments

@basicNew
Copy link
Contributor

When a city is created, its ground_plane is set to None, failing to generate an SDF if we forget to set it. I think that in most cases (unless until we incorporate terrains) we will want to generate a plane that encloses the whole city, but at the same time let the builder create a custom one if needed. To address this I think a good approach would be to override to_sdf in City along the lines of:

def to_sdf(self):
if self.ground_plane == None:
    self.ground_plane = self._derive_ground_plane()
super....

where _derive_ground_plane() will compute the bounding box of the city and create a plane that encompasses it.

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

No branches or pull requests

2 participants