Skip to content

Inconsistency #11

Open
Open
@Nivek92

Description

@Nivek92

Hey,
I am currently going through the "tutorial" and there are a few things I find inconsistent which in my opinion could be improved.

First there is some inconsistency between the shorthand methods on the builders.

On the RigidBodyBuilder for example we call RigidBodyBuilder::new_static() while on the ColliderBuilder it's ColliderBuilder::ball(0.5)

It would make more sense to stay consistent and name the calls either

RigidBodyBuilder::static(); or ColliderBuilder::new_ball(0.5) respectively

Something similar with linvel(mut self, x: f32, y: f32, z: f32) and angvel(mut self, angvel: AngVector<f32>).
Why use separate values for one and a vector for the other.
It would make more sense to either add linvel(mut self, linvel: LinVector<f32>) and angvel(mut self, x: f32, y: f32, z: f32) as well or just allow for construction via seperate values or vector only.

Another thing that's inconsistent is the creation of joints which unlike RigidBodies and Colliders does not use the builder pattern. Why?

Lastly JointSet::insert<J>( &mut self, bodies: &mut RigidBodySet, body1: RigidBodyHandle, body2: RigidBodyHandle, joint_params: J, ) should be JointSet::insert<J>( &mut self, joint_params: J, body1: RigidBodyHandle, body2: RigidBodyHandle, bodies: &mut RigidBodySet, ) to be consistent with ColliderSet::insert( &mut self, mut coll: Collider, parent_handle: RigidBodyHandle, bodies: &mut RigidBodySet, )

PS: Awesome project. Thank you for your effort.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions