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

Oxide engine/feat/physics particle #55

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

Chiefmate
Copy link

Summary

Added particle and particle-force generator.
Registration for p-f generators are not implemented yet.

Added AABB for shapes Ball and Cuboid.
Local AABB is for object space, and AABB is for world space. Currently AABB only supports translations.
Planning to replace translation vector with homogenous coordinate matrix , to scaling and rotations.

Key changes

  • Added particle and particle-force generator.
  • Added AABB for shapes Ball and Cuboid.

To Be Done

  • Finish implementing pfgen.rs
  • Update AABB to support rotations and scaling

@codecov-commenter
Copy link

codecov-commenter commented Mar 18, 2023

Codecov Report

Merging #55 (215b524) into main (f3771bc) will decrease coverage by 10.92%.
The diff coverage is 2.59%.

❗ Current head 215b524 differs from pull request most recent head f38b4d6. Consider uploading reports for the commit f38b4d6 to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##             main      #55       +/-   ##
===========================================
- Coverage   88.35%   77.44%   -10.92%     
===========================================
  Files          31       38        +7     
  Lines        1323     1516      +193     
  Branches       46       55        +9     
===========================================
+ Hits         1169     1174        +5     
- Misses        139      327      +188     
  Partials       15       15               

oxide_physics/src/particle.rs Outdated Show resolved Hide resolved
oxide_physics/src/particle.rs Outdated Show resolved Hide resolved
Copy link
Member

@BeLeap BeLeap left a comment

Choose a reason for hiding this comment

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

oxide_physics/src/pfgen.rs Outdated Show resolved Hide resolved
oxide_physics/src/pfgen.rs Outdated Show resolved Hide resolved
@Chiefmate Chiefmate requested a review from BeLeap July 11, 2023 08:01
Copy link
Member

@BeLeap BeLeap left a comment

Choose a reason for hiding this comment

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

There is plenty of warnings from github actions. Please check.

});
}
if duration <= 0.0 {
return Err("Cannot integrate with zero duration");
Copy link
Member

Choose a reason for hiding this comment

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

I think defining custom error using enum is better than using string as error

Copy link
Member

Choose a reason for hiding this comment

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

use oxide_math::commons::vector::*;
use oxide_math::commons::vector3::Vector3;

extern crate generational_arena;
Copy link
Member

Choose a reason for hiding this comment

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

extern crate is no longer needed.

Copy link
Member

@utilForever utilForever left a comment

Choose a reason for hiding this comment

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

First of all, you should fix cargo clippy issues.

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.

4 participants