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

Plane mesh primitive does not have number of subdivisions as a parameter #191

Closed
creikey opened this issue Aug 15, 2020 · 1 comment
Closed
Labels
A-Rendering Drawing game state to the screen C-Enhancement A new feature D-Trivial Nice and easy! A great choice to get started with Bevy

Comments

@creikey
Copy link

creikey commented Aug 15, 2020

I'm going to try to work on this now

@karroffel karroffel added C-Enhancement A new feature A-Rendering Drawing game state to the screen labels Aug 15, 2020
@alice-i-cecile
Copy link
Member

Discussion on Discord explaining some context on why we might want this feature.

@mockersf mockersf added the D-Trivial Nice and easy! A great choice to get started with Bevy label Jan 29, 2023
@bors bors bot closed this as completed in 1bd3908 Feb 13, 2023
myreprise1 pushed a commit to myreprise1/bevy that referenced this issue Feb 14, 2023
# Objective

There was issue bevyengine#191 requesting subdivisions on the shape::Plane.
I also could have used this recently. I then write the solution.

Fixes  bevyengine#191

## Solution

I changed the shape::Plane to include subdivisions field and the code to create the subdivisions. I don't know how people are counting subdivisions so as I put in the doc comments 0 subdivisions results in the original geometry of the Plane.
Greater then 0 results in the number of lines dividing the plane.

I didn't know if it would be better to create a new struct that implemented this feature, say SubdivisionPlane or change Plane. I decided on changing Plane as that was what the original issue was.

It would be trivial to alter this to use another struct instead of altering Plane.
The issues of migration, although small, would be eliminated if a new struct was implemented.
 
## Changelog
### Added
Added subdivisions field to shape::Plane

## Migration Guide
All the examples needed to be updated to initalize the subdivisions field.
Also there were two tests in tests/window that need to be updated.

A user would have to update all their uses of shape::Plane to initalize the subdivisions field.
myreprise1 pushed a commit to myreprise1/bevy that referenced this issue Feb 15, 2023
# Objective

There was issue bevyengine#191 requesting subdivisions on the shape::Plane.
I also could have used this recently. I then write the solution.

Fixes  bevyengine#191

## Solution

I changed the shape::Plane to include subdivisions field and the code to create the subdivisions. I don't know how people are counting subdivisions so as I put in the doc comments 0 subdivisions results in the original geometry of the Plane.
Greater then 0 results in the number of lines dividing the plane.

I didn't know if it would be better to create a new struct that implemented this feature, say SubdivisionPlane or change Plane. I decided on changing Plane as that was what the original issue was.

It would be trivial to alter this to use another struct instead of altering Plane.
The issues of migration, although small, would be eliminated if a new struct was implemented.
 
## Changelog
### Added
Added subdivisions field to shape::Plane

## Migration Guide
All the examples needed to be updated to initalize the subdivisions field.
Also there were two tests in tests/window that need to be updated.

A user would have to update all their uses of shape::Plane to initalize the subdivisions field.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen C-Enhancement A new feature D-Trivial Nice and easy! A great choice to get started with Bevy
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants