bevy/examples/3d
Robert Walter bcae8e9a8b
Implement Arc3D for Gizmos (#11540)
# Objective

- Implement an arc3d API for gizmos
- Solves #11536

## Solution

### `arc_3d`

- The current `arc3d` method on gizmos only takes an angle
- It draws an "standard arc" by default, this is an arc starting at
`Vec3::X`, in the XZ plane, in counter clockwise direction with a normal
that is facing up
- The "standard arc" can be customized with the usual gizmo builder
pattern. This way you'll be able to draw arbitrary arcs

### `short/long_arc_3d_between`

- Given `center`, `from`, `to` draws an arc between `from` and `to`

---

## Changelog

> This section is optional. If this was a trivial fix, or has no
externally-visible impact, you can delete this section.

- Added: `Gizmos::arc3d(&mut self, angle)` method
- Added: `Gizmos::long_arc_3d_between(&mut self, center, from, to)`
method
- Added: `Gizmos::short_arc_3d_between(&mut self, center, from, to)`
method

---

This PR factors out an orthogonal part of another PR as mentioned in
[this
comment](https://github.com/bevyengine/bevy/pull/11072#issuecomment-1883859573)
2024-01-28 02:13:17 +00:00
..
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 Cleanup deterministic example (#11416) 2024-01-19 06:08:19 +00:00
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