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

Implement Arc3D for Gizmos #11540

Merged
merged 8 commits into from
Jan 28, 2024
Merged

Implement Arc3D for Gizmos #11540

merged 8 commits into from
Jan 28, 2024

Commits on Jan 26, 2024

  1. feat(arc3d): add arc3d methods for Gizmos

    The API of this implementation mimics unity's API for the same feature,
    c.f.
    
    https://docs.unity3d.com/ScriptReference/Handles.DrawWireArc.html
    
    This was done since it seems to be the most flexible design so far
    allowing for arcs with arc angles in the range of [-360.0, 360.0]
    degrees.
    
    Authored-by: RobWalt <robwalter96@gmail.com>
    RobWalt committed Jan 26, 2024
    Configuration menu
    Copy the full SHA
    6641e67 View commit details
    Browse the repository at this point in the history
  2. refactor(arc3d): redesign arc3d API

    I noticed some flaws with the original implementation of the API while
    creating some examples:
    
    - The orientation via `from` and `rotation_axis` fields felt really
      wonky
    - The rotation seemed not to rotate around the center set by the user
    
    This is why I reimplemented the API. It now draws some kind of default
    arc in 3D which has properties which are documented in the doc strings.
    You can modify this default arc via builder methods which seems to be
    the most flexible approach in my eyes.
    
    Authored-by: RobWalt <robwalter96@gmail.com>
    RobWalt committed Jan 26, 2024
    Configuration menu
    Copy the full SHA
    5605b21 View commit details
    Browse the repository at this point in the history
  3. docs(example): add arc3d example to 3d_gizmos

    Authored-by: RobWalt <robwalter96@gmail.com>
    RobWalt committed Jan 26, 2024
    Configuration menu
    Copy the full SHA
    219a44d View commit details
    Browse the repository at this point in the history
  4. chore(cleanup): reuse new logic + cleanups

    - reuse new factored out function to calculate the default amount of
      segments for arc2d
    - add the gizmos active check to arc3d
    - also implement optional segments logic for arc3d
    - cleanup debug gizmo center drawing
    RobWalt committed Jan 26, 2024
    Configuration menu
    Copy the full SHA
    c153046 View commit details
    Browse the repository at this point in the history
  5. feat(arc3d): add shortest/longest arc implementations

    Authored-by: RobWalt <robwalter96@gmail.com>
    RobWalt committed Jan 26, 2024
    Configuration menu
    Copy the full SHA
    d4e19e3 View commit details
    Browse the repository at this point in the history
  6. docs(arc3d): rewording undefined behavior part to less drastic words

    Authored-by: RobWalt <robwalter96@gmail.com>
    RobWalt committed Jan 26, 2024
    Configuration menu
    Copy the full SHA
    221a282 View commit details
    Browse the repository at this point in the history
  7. fix(review): circumvent ambiguity if from == to

    Thanks for spotting this Alice!
    
    Authored-by: RobWalt <robwalter96@gmail.com>
    RobWalt committed Jan 26, 2024
    Configuration menu
    Copy the full SHA
    bd1b114 View commit details
    Browse the repository at this point in the history

Commits on Jan 27, 2024

  1. fix(review): make API consistent

    and also adjust:
    
    - docs
    - tests
    - examples
    
    Authored-by: RobWalt <robwalter96@gmail.com>
    RobWalt committed Jan 27, 2024
    Configuration menu
    Copy the full SHA
    2e064f0 View commit details
    Browse the repository at this point in the history