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

Finishing Touches #2

Conversation

NthTensor
Copy link

  • Re-touched a bunch of the other spline docs so they all agree and use the same style. I don't think Alice will mind doing this here, as she was asking for docs on some stuff already not touched by this PR (like the characteristic matrix of a normal BSpline).
  • I replaced all "Knot Vector" and "Weight Vector" language with "knots" and "weights". Less verbose.
  • Knots are now normalized such that the intervals between knots form an exact cover of [0, N] where N is the number of curves. This makes both nurbs and b-splines have the same parametric domain.
  • RationalSegement now tracks the size of it's parametric domain, as derived from the knot vector.
  • RationalCurve now allows for different sizes of segment, and clamps the parameter to the curve domain. The output of RationalCurve::segment is mapped to [0, 1].
  • Added detailed references to the papers where possible.

Copy link

github-actions bot commented Feb 1, 2024

Welcome, new contributor!

Please make sure you've read our contributing guide and we look forward to reviewing your pull request shortly ✨

@NthTensor NthTensor changed the title Cubic splines overhaul Finishing Touches Feb 1, 2024
Copy link
Owner

@JohnTheCoolingFan JohnTheCoolingFan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good improvement, although there are some nitpicks and typos I've highlighted. Would like to know what you think about these so they can be resolved and it'll be ready to be merged to the main PR!

crates/bevy_math/src/cubic_splines.rs Outdated Show resolved Hide resolved
crates/bevy_math/src/cubic_splines.rs Outdated Show resolved Hide resolved
crates/bevy_math/src/cubic_splines.rs Outdated Show resolved Hide resolved
crates/bevy_math/src/cubic_splines.rs Outdated Show resolved Hide resolved
crates/bevy_math/src/cubic_splines.rs Outdated Show resolved Hide resolved
crates/bevy_math/src/cubic_splines.rs Outdated Show resolved Hide resolved
crates/bevy_math/src/cubic_splines.rs Outdated Show resolved Hide resolved
crates/bevy_math/src/cubic_splines.rs Outdated Show resolved Hide resolved
crates/bevy_math/src/cubic_splines.rs Outdated Show resolved Hide resolved
crates/bevy_math/src/cubic_splines.rs Outdated Show resolved Hide resolved
@JohnTheCoolingFan
Copy link
Owner

Marked another place where CI errors

@NthTensor
Copy link
Author

Made those fixes and finally got the circular arc test right. Ready for merge and final reviews?

crates/bevy_math/src/cubic_splines.rs Outdated Show resolved Hide resolved
crates/bevy_math/src/cubic_splines.rs Outdated Show resolved Hide resolved
crates/bevy_math/src/cubic_splines.rs Outdated Show resolved Hide resolved
@JohnTheCoolingFan JohnTheCoolingFan merged commit 1280053 into JohnTheCoolingFan:cubic-splines-overhaul Feb 3, 2024
22 checks passed
JohnTheCoolingFan pushed a commit that referenced this pull request Sep 6, 2024
…3906)

# Objective

- Second part of bevyengine#13900 
- based on bevyengine#13905 

## Solution

- check_dir_light_mesh_visibility defers setting the entity's
`ViewVisibility `so that Bevy can schedule it to run in parallel with
`check_point_light_mesh_visibility`.

- Reduce HashMap lookups for directional light checking as much as
possible

- Use `par_iter `to parallelize the checking process within each system.

---------

Co-authored-by: Kristoffer Søholm <k.soeholm@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants