mirror of
https://github.com/bevyengine/bevy
synced 2024-11-26 06:30:19 +00:00
041731b7e0
The PR is in a reviewable state now in the sense that the basic implementations are there. There are still some ToDos that I'm aware of: - [x] docs for all the new structs and traits - [x] implement `Default` and derive other useful traits for the new structs - [x] Take a look at the notes again (Do this after a first round of reviews) - [x] Take care of the repetition in the circle drawing functions --- # Objective - TLDR: This PR enables us to quickly draw all the newly added primitives from `bevy_math` in immediate mode with gizmos - Addresses #10571 ## Solution - This implements the first design idea I had that covered everything that was mentioned in the Issue https://github.com/bevyengine/bevy/issues/10571#issuecomment-1863646197 --- ## Caveats - I added the `Primitive(2/3)d` impls for `Direction(2/3)d` to make them work with the current solution. We could impose less strict requirements for the gizmoable objects and remove the impls afterwards if the community doesn't like the current approach. --- ## Changelog - implement capabilities to draw ellipses on the gizmo in general (this was required to have some code which is able to draw the ellipse primitive) - refactored circle drawing code to use the more general ellipse drawing code to keep code duplication low - implement `Primitive2d` for `Direction2d` and impl `Primitive3d` for `Direction3d` - implement trait to draw primitives with specialized details with gizmos - `GizmoPrimitive2d` for all the 2D primitives - `GizmoPrimitive3d` for all the 3D primitives - (question while writing this: Does it actually matter if we split this in 2D and 3D? I guess it could be useful in the future if we do something based on the main rendering mode even though atm it's kinda useless) --- --------- Co-authored-by: nothendev <borodinov.ilya@gmail.com> |
||
---|---|---|
.. | ||
3d_gizmos.rs | ||
3d_scene.rs | ||
3d_shapes.rs | ||
3d_viewport_to_world.rs | ||
animated_material.rs | ||
anti_aliasing.rs | ||
atmospheric_fog.rs | ||
blend_modes.rs | ||
bloom_3d.rs | ||
deferred_rendering.rs | ||
deterministic.rs | ||
fog.rs | ||
generate_custom_mesh.rs | ||
lighting.rs | ||
lightmaps.rs | ||
lines.rs | ||
load_gltf.rs | ||
orthographic.rs | ||
parallax_mapping.rs | ||
parenting.rs | ||
pbr.rs | ||
reflection_probes.rs | ||
render_to_texture.rs | ||
shadow_biases.rs | ||
shadow_caster_receiver.rs | ||
skybox.rs | ||
spherical_area_lights.rs | ||
split_screen.rs | ||
spotlight.rs | ||
ssao.rs | ||
texture.rs | ||
tonemapping.rs | ||
transmission.rs | ||
transparency_3d.rs | ||
two_passes.rs | ||
update_gltf_scene.rs | ||
vertex_colors.rs | ||
wireframe.rs |