feat: migrate to glam whenever relevant + migrate testbed to kiss3d instead of bevy + release v0.32.0 (#909)
* feat: migrate to glam whenever relevant + migrate testbed to kiss3d instead of bevy * chore: update changelog * Fix warnings and tests * Release v0.32.0
This commit is contained in:
@@ -6,14 +6,14 @@ fn create_coupled_joints(
|
||||
colliders: &mut ColliderSet,
|
||||
impulse_joints: &mut ImpulseJointSet,
|
||||
multibody_joints: &mut MultibodyJointSet,
|
||||
origin: Point<f32>,
|
||||
origin: Vector,
|
||||
use_articulations: bool,
|
||||
) {
|
||||
let ground = bodies.insert(RigidBodyBuilder::fixed().translation(origin.coords));
|
||||
let ground = bodies.insert(RigidBodyBuilder::fixed().translation(origin));
|
||||
let body1 = bodies.insert(
|
||||
RigidBodyBuilder::dynamic()
|
||||
.translation(origin.coords)
|
||||
.linvel(vector![5.0, 5.0, 5.0]),
|
||||
.translation(origin)
|
||||
.linvel(Vector::new(5.0, 5.0, 5.0)),
|
||||
);
|
||||
colliders.insert_with_parent(ColliderBuilder::cuboid(1.0, 1.0, 1.0), body1, bodies);
|
||||
|
||||
@@ -34,34 +34,35 @@ fn create_prismatic_joints(
|
||||
colliders: &mut ColliderSet,
|
||||
impulse_joints: &mut ImpulseJointSet,
|
||||
multibody_joints: &mut MultibodyJointSet,
|
||||
origin: Point<f32>,
|
||||
origin: Vector,
|
||||
num: usize,
|
||||
use_articulations: bool,
|
||||
) {
|
||||
let rad = 0.4;
|
||||
let shift = 2.0;
|
||||
|
||||
let ground = RigidBodyBuilder::fixed().translation(vector![origin.x, origin.y, origin.z]);
|
||||
let ground = RigidBodyBuilder::fixed().translation(origin);
|
||||
let mut curr_parent = bodies.insert(ground);
|
||||
let collider = ColliderBuilder::cuboid(rad, rad, rad);
|
||||
colliders.insert_with_parent(collider, curr_parent, bodies);
|
||||
|
||||
for i in 0..num {
|
||||
let z = origin.z + (i + 1) as f32 * shift;
|
||||
let rigid_body = RigidBodyBuilder::dynamic().translation(vector![origin.x, origin.y, z]);
|
||||
let rigid_body =
|
||||
RigidBodyBuilder::dynamic().translation(Vector::new(origin.x, origin.y, z));
|
||||
let curr_child = bodies.insert(rigid_body);
|
||||
let collider = ColliderBuilder::cuboid(rad, rad, rad);
|
||||
colliders.insert_with_parent(collider, curr_child, bodies);
|
||||
|
||||
let axis = if i % 2 == 0 {
|
||||
UnitVector::new_normalize(vector![1.0f32, 1.0, 0.0])
|
||||
Vector::new(1.0f32, 1.0, 0.0).normalize()
|
||||
} else {
|
||||
UnitVector::new_normalize(vector![-1.0f32, 1.0, 0.0])
|
||||
Vector::new(-1.0f32, 1.0, 0.0).normalize()
|
||||
};
|
||||
|
||||
let prism = PrismaticJointBuilder::new(axis)
|
||||
.local_anchor1(point![0.0, 0.0, 0.0])
|
||||
.local_anchor2(point![0.0, 0.0, -shift])
|
||||
.local_anchor1(Vector::new(0.0, 0.0, 0.0))
|
||||
.local_anchor2(Vector::new(0.0, 0.0, -shift))
|
||||
.limits([-2.0, 2.0]);
|
||||
|
||||
if use_articulations {
|
||||
@@ -78,34 +79,35 @@ fn create_actuated_prismatic_joints(
|
||||
colliders: &mut ColliderSet,
|
||||
impulse_joints: &mut ImpulseJointSet,
|
||||
multibody_joints: &mut MultibodyJointSet,
|
||||
origin: Point<f32>,
|
||||
origin: Vector,
|
||||
num: usize,
|
||||
use_articulations: bool,
|
||||
) {
|
||||
let rad = 0.4;
|
||||
let shift = 2.0;
|
||||
|
||||
let ground = RigidBodyBuilder::fixed().translation(vector![origin.x, origin.y, origin.z]);
|
||||
let ground = RigidBodyBuilder::fixed().translation(origin);
|
||||
let mut curr_parent = bodies.insert(ground);
|
||||
let collider = ColliderBuilder::cuboid(rad, rad, rad);
|
||||
colliders.insert_with_parent(collider, curr_parent, bodies);
|
||||
|
||||
for i in 0..num {
|
||||
let z = origin.z + (i + 1) as f32 * shift;
|
||||
let rigid_body = RigidBodyBuilder::dynamic().translation(vector![origin.x, origin.y, z]);
|
||||
let rigid_body =
|
||||
RigidBodyBuilder::dynamic().translation(Vector::new(origin.x, origin.y, z));
|
||||
let curr_child = bodies.insert(rigid_body);
|
||||
let collider = ColliderBuilder::cuboid(rad, rad, rad);
|
||||
colliders.insert_with_parent(collider, curr_child, bodies);
|
||||
|
||||
let axis = if i % 2 == 0 {
|
||||
UnitVector::new_normalize(vector![1.0, 1.0, 0.0])
|
||||
Vector::new(1.0, 1.0, 0.0).normalize()
|
||||
} else {
|
||||
UnitVector::new_normalize(vector![-1.0, 1.0, 0.0])
|
||||
Vector::new(-1.0, 1.0, 0.0).normalize()
|
||||
};
|
||||
|
||||
let mut prism = PrismaticJointBuilder::new(axis)
|
||||
.local_anchor1(point![0.0, 0.0, shift])
|
||||
.local_anchor2(point![0.0, 0.0, 0.0])
|
||||
.local_anchor1(Vector::new(0.0, 0.0, shift))
|
||||
.local_anchor2(Vector::new(0.0, 0.0, 0.0))
|
||||
.build();
|
||||
|
||||
if i == 0 {
|
||||
@@ -143,14 +145,14 @@ fn create_revolute_joints(
|
||||
colliders: &mut ColliderSet,
|
||||
impulse_joints: &mut ImpulseJointSet,
|
||||
multibody_joints: &mut MultibodyJointSet,
|
||||
origin: Point<f32>,
|
||||
origin: Vector,
|
||||
num: usize,
|
||||
use_articulations: bool,
|
||||
) {
|
||||
let rad = 0.4;
|
||||
let shift = 2.0;
|
||||
|
||||
let ground = RigidBodyBuilder::fixed().translation(vector![origin.x, origin.y, 0.0]);
|
||||
let ground = RigidBodyBuilder::fixed().translation(Vector::new(origin.x, origin.y, 0.0));
|
||||
let mut curr_parent = bodies.insert(ground);
|
||||
let collider = ColliderBuilder::cuboid(rad, rad, rad);
|
||||
colliders.insert_with_parent(collider, curr_parent, bodies);
|
||||
@@ -159,10 +161,10 @@ fn create_revolute_joints(
|
||||
// Create four bodies.
|
||||
let z = origin.z + i as f32 * shift * 2.0 + shift;
|
||||
let positions = [
|
||||
Isometry::translation(origin.x, origin.y, z),
|
||||
Isometry::translation(origin.x + shift, origin.y, z),
|
||||
Isometry::translation(origin.x + shift, origin.y, z + shift),
|
||||
Isometry::translation(origin.x, origin.y, z + shift),
|
||||
Pose::from_translation(Vector::new(origin.x, origin.y, z)),
|
||||
Pose::from_translation(Vector::new(origin.x + shift, origin.y, z)),
|
||||
Pose::from_translation(Vector::new(origin.x + shift, origin.y, z + shift)),
|
||||
Pose::from_translation(Vector::new(origin.x, origin.y, z + shift)),
|
||||
];
|
||||
|
||||
let mut handles = [curr_parent; 4];
|
||||
@@ -174,13 +176,13 @@ fn create_revolute_joints(
|
||||
}
|
||||
|
||||
// Setup four impulse_joints.
|
||||
let x = Vector::x_axis();
|
||||
let z = Vector::z_axis();
|
||||
let x = Vector::X;
|
||||
let z = Vector::Z;
|
||||
let revs = [
|
||||
RevoluteJointBuilder::new(z).local_anchor2(point![0.0, 0.0, -shift]),
|
||||
RevoluteJointBuilder::new(x).local_anchor2(point![-shift, 0.0, 0.0]),
|
||||
RevoluteJointBuilder::new(z).local_anchor2(point![0.0, 0.0, -shift]),
|
||||
RevoluteJointBuilder::new(x).local_anchor2(point![shift, 0.0, 0.0]),
|
||||
RevoluteJointBuilder::new(z).local_anchor2(Vector::new(0.0, 0.0, -shift)),
|
||||
RevoluteJointBuilder::new(x).local_anchor2(Vector::new(-shift, 0.0, 0.0)),
|
||||
RevoluteJointBuilder::new(z).local_anchor2(Vector::new(0.0, 0.0, -shift)),
|
||||
RevoluteJointBuilder::new(x).local_anchor2(Vector::new(shift, 0.0, 0.0)),
|
||||
];
|
||||
|
||||
if use_articulations {
|
||||
@@ -204,19 +206,20 @@ fn create_revolute_joints_with_limits(
|
||||
colliders: &mut ColliderSet,
|
||||
impulse_joints: &mut ImpulseJointSet,
|
||||
multibody_joints: &mut MultibodyJointSet,
|
||||
origin: Point<f32>,
|
||||
origin: Vector,
|
||||
use_articulations: bool,
|
||||
) {
|
||||
let ground = bodies.insert(RigidBodyBuilder::fixed().translation(origin.coords));
|
||||
let origin_v = origin;
|
||||
let ground = bodies.insert(RigidBodyBuilder::fixed().translation(origin_v));
|
||||
|
||||
let platform1 = bodies.insert(RigidBodyBuilder::dynamic().translation(origin.coords));
|
||||
let platform1 = bodies.insert(RigidBodyBuilder::dynamic().translation(origin_v));
|
||||
colliders.insert_with_parent(ColliderBuilder::cuboid(4.0, 0.2, 2.0), platform1, bodies);
|
||||
|
||||
let shift = vector![0.0, 0.0, 6.0];
|
||||
let platform2 = bodies.insert(RigidBodyBuilder::dynamic().translation(origin.coords + shift));
|
||||
let shift = Vector::new(0.0, 0.0, 6.0);
|
||||
let platform2 = bodies.insert(RigidBodyBuilder::dynamic().translation(origin_v + shift));
|
||||
colliders.insert_with_parent(ColliderBuilder::cuboid(4.0, 0.2, 2.0), platform2, bodies);
|
||||
|
||||
let z = Vector::z_axis();
|
||||
let z = Vector::Z;
|
||||
let joint1 = RevoluteJointBuilder::new(z).limits([-0.2, 0.2]);
|
||||
// let joint1 = GenericJointBuilder::new(JointAxesMask::X | JointAxesMask::Y | JointAxesMask::Z)
|
||||
// .local_axis1(z)
|
||||
@@ -233,7 +236,7 @@ fn create_revolute_joints_with_limits(
|
||||
}
|
||||
|
||||
let joint2 = RevoluteJointBuilder::new(z)
|
||||
.local_anchor2(-Point::from(shift))
|
||||
.local_anchor2(-shift)
|
||||
.limits([-0.2, 0.2]);
|
||||
|
||||
// let joint2 = GenericJointBuilder::new(JointAxesMask::X | JointAxesMask::Y | JointAxesMask::Z)
|
||||
@@ -251,9 +254,9 @@ fn create_revolute_joints_with_limits(
|
||||
impulse_joints.insert(platform1, platform2, joint2, true);
|
||||
}
|
||||
|
||||
// Let’s add a couple of cuboids that will fall on the platforms, triggering the joint limits.
|
||||
// Let's add a couple of cuboids that will fall on the platforms, triggering the joint limits.
|
||||
let cuboid_body1 = bodies
|
||||
.insert(RigidBodyBuilder::dynamic().translation(origin.coords + vector![-2.0, 4.0, 0.0]));
|
||||
.insert(RigidBodyBuilder::dynamic().translation(origin_v + Vector::new(-2.0, 4.0, 0.0)));
|
||||
colliders.insert_with_parent(
|
||||
ColliderBuilder::cuboid(0.6, 0.6, 0.6).friction(1.0),
|
||||
cuboid_body1,
|
||||
@@ -261,7 +264,7 @@ fn create_revolute_joints_with_limits(
|
||||
);
|
||||
|
||||
let cuboid_body2 = bodies.insert(
|
||||
RigidBodyBuilder::dynamic().translation(origin.coords + shift + vector![2.0, 16.0, 0.0]),
|
||||
RigidBodyBuilder::dynamic().translation(origin_v + shift + Vector::new(2.0, 16.0, 0.0)),
|
||||
);
|
||||
colliders.insert_with_parent(
|
||||
ColliderBuilder::cuboid(0.6, 0.6, 0.6).friction(1.0),
|
||||
@@ -275,7 +278,7 @@ fn create_fixed_joints(
|
||||
colliders: &mut ColliderSet,
|
||||
impulse_joints: &mut ImpulseJointSet,
|
||||
multibody_joints: &mut MultibodyJointSet,
|
||||
origin: Point<f32>,
|
||||
origin: Vector,
|
||||
num: usize,
|
||||
use_articulations: bool,
|
||||
) {
|
||||
@@ -298,11 +301,11 @@ fn create_fixed_joints(
|
||||
RigidBodyType::Dynamic
|
||||
};
|
||||
|
||||
let rigid_body = RigidBodyBuilder::new(status).translation(vector![
|
||||
let rigid_body = RigidBodyBuilder::new(status).translation(Vector::new(
|
||||
origin.x + fk * shift,
|
||||
origin.y,
|
||||
origin.z + fi * shift
|
||||
]);
|
||||
origin.z + fi * shift,
|
||||
));
|
||||
let child_handle = bodies.insert(rigid_body);
|
||||
let collider = ColliderBuilder::ball(rad);
|
||||
colliders.insert_with_parent(collider, child_handle, bodies);
|
||||
@@ -311,7 +314,7 @@ fn create_fixed_joints(
|
||||
if i > 0 {
|
||||
let parent_index = body_handles.len() - num;
|
||||
let parent_handle = body_handles[parent_index];
|
||||
let joint = FixedJointBuilder::new().local_anchor2(point![0.0, 0.0, -shift]);
|
||||
let joint = FixedJointBuilder::new().local_anchor2(Vector::new(0.0, 0.0, -shift));
|
||||
|
||||
if use_articulations {
|
||||
multibody_joints.insert(parent_handle, child_handle, joint, true);
|
||||
@@ -324,7 +327,7 @@ fn create_fixed_joints(
|
||||
if k > 0 {
|
||||
let parent_index = body_handles.len() - 1;
|
||||
let parent_handle = body_handles[parent_index];
|
||||
let joint = FixedJointBuilder::new().local_anchor2(point![-shift, 0.0, 0.0]);
|
||||
let joint = FixedJointBuilder::new().local_anchor2(Vector::new(-shift, 0.0, 0.0));
|
||||
impulse_joints.insert(parent_handle, child_handle, joint, true);
|
||||
}
|
||||
|
||||
@@ -357,11 +360,11 @@ fn create_spherical_joints(
|
||||
RigidBodyType::Dynamic
|
||||
};
|
||||
|
||||
let rigid_body = RigidBodyBuilder::new(status).translation(vector![
|
||||
let rigid_body = RigidBodyBuilder::new(status).translation(Vector::new(
|
||||
fk * shift,
|
||||
0.0,
|
||||
fi * shift * 2.0
|
||||
]);
|
||||
fi * shift * 2.0,
|
||||
));
|
||||
let child_handle = bodies.insert(rigid_body);
|
||||
let collider = ColliderBuilder::capsule_z(rad * 1.25, rad);
|
||||
colliders.insert_with_parent(collider, child_handle, bodies);
|
||||
@@ -370,7 +373,7 @@ fn create_spherical_joints(
|
||||
if i > 0 {
|
||||
let parent_handle = *body_handles.last().unwrap();
|
||||
let joint =
|
||||
SphericalJointBuilder::new().local_anchor2(point![0.0, 0.0, -shift * 2.0]);
|
||||
SphericalJointBuilder::new().local_anchor2(Vector::new(0.0, 0.0, -shift * 2.0));
|
||||
|
||||
if use_articulations {
|
||||
multibody_joints.insert(parent_handle, child_handle, joint, true);
|
||||
@@ -383,7 +386,8 @@ fn create_spherical_joints(
|
||||
if k > 0 {
|
||||
let parent_index = body_handles.len() - num;
|
||||
let parent_handle = body_handles[parent_index];
|
||||
let joint = SphericalJointBuilder::new().local_anchor2(point![-shift, 0.0, 0.0]);
|
||||
let joint =
|
||||
SphericalJointBuilder::new().local_anchor2(Vector::new(-shift, 0.0, 0.0));
|
||||
impulse_joints.insert(parent_handle, child_handle, joint, true);
|
||||
}
|
||||
|
||||
@@ -397,30 +401,31 @@ fn create_spherical_joints_with_limits(
|
||||
colliders: &mut ColliderSet,
|
||||
impulse_joints: &mut ImpulseJointSet,
|
||||
multibody_joints: &mut MultibodyJointSet,
|
||||
origin: Point<f32>,
|
||||
origin: Vector,
|
||||
use_articulations: bool,
|
||||
) {
|
||||
let shift = vector![0.0, 0.0, 3.0];
|
||||
let shift = Vector::new(0.0, 0.0, 3.0);
|
||||
let origin_v = origin;
|
||||
|
||||
let ground = bodies.insert(RigidBodyBuilder::fixed().translation(origin.coords));
|
||||
let ground = bodies.insert(RigidBodyBuilder::fixed().translation(origin_v));
|
||||
|
||||
let ball1 = bodies.insert(
|
||||
RigidBodyBuilder::dynamic()
|
||||
.translation(origin.coords + shift)
|
||||
.linvel(vector![20.0, 20.0, 0.0]),
|
||||
.translation(origin_v + shift)
|
||||
.linvel(Vector::new(20.0, 20.0, 0.0)),
|
||||
);
|
||||
colliders.insert_with_parent(ColliderBuilder::cuboid(1.0, 1.0, 1.0), ball1, bodies);
|
||||
|
||||
let ball2 = bodies.insert(RigidBodyBuilder::dynamic().translation(origin.coords + shift * 2.0));
|
||||
let ball2 = bodies.insert(RigidBodyBuilder::dynamic().translation(origin_v + shift * 2.0));
|
||||
colliders.insert_with_parent(ColliderBuilder::cuboid(1.0, 1.0, 1.0), ball2, bodies);
|
||||
|
||||
let joint1 = SphericalJointBuilder::new()
|
||||
.local_anchor2(Point::from(-shift))
|
||||
.local_anchor2(-shift)
|
||||
.limits(JointAxis::LinX, [-0.2, 0.2])
|
||||
.limits(JointAxis::LinY, [-0.2, 0.2]);
|
||||
|
||||
let joint2 = SphericalJointBuilder::new()
|
||||
.local_anchor2(Point::from(-shift))
|
||||
.local_anchor2(-shift)
|
||||
.limits(JointAxis::LinX, [-0.3, 0.3])
|
||||
.limits(JointAxis::LinY, [-0.3, 0.3]);
|
||||
|
||||
@@ -438,7 +443,7 @@ fn create_actuated_revolute_joints(
|
||||
colliders: &mut ColliderSet,
|
||||
impulse_joints: &mut ImpulseJointSet,
|
||||
multibody_joints: &mut MultibodyJointSet,
|
||||
origin: Point<f32>,
|
||||
origin: Vector,
|
||||
num: usize,
|
||||
use_articulations: bool,
|
||||
) {
|
||||
@@ -446,8 +451,8 @@ fn create_actuated_revolute_joints(
|
||||
let shift = 2.0;
|
||||
|
||||
// We will reuse this base configuration for all the impulse_joints here.
|
||||
let z = Vector::z_axis();
|
||||
let joint_template = RevoluteJointBuilder::new(z).local_anchor2(point![0.0, 0.0, -shift]);
|
||||
let z = Vector::Z;
|
||||
let joint_template = RevoluteJointBuilder::new(z).local_anchor2(Vector::new(0.0, 0.0, -shift));
|
||||
|
||||
let mut parent_handle = RigidBodyHandle::invalid();
|
||||
|
||||
@@ -466,7 +471,7 @@ fn create_actuated_revolute_joints(
|
||||
let shifty = (i >= 1) as u32 as f32 * -2.0;
|
||||
|
||||
let rigid_body = RigidBodyBuilder::new(status)
|
||||
.translation(vector![origin.x, origin.y + shifty, origin.z + fi * shift])
|
||||
.translation(Vector::new(origin.x, origin.y + shifty, origin.z + fi * shift))
|
||||
// .rotation(Vector3::new(0.0, fi * 1.1, 0.0))
|
||||
;
|
||||
|
||||
@@ -487,7 +492,7 @@ fn create_actuated_revolute_joints(
|
||||
|
||||
if i == 1 {
|
||||
joint = joint
|
||||
.local_anchor2(point![0.0, 2.0, -shift])
|
||||
.local_anchor2(Vector::new(0.0, 2.0, -shift))
|
||||
.motor_velocity(-2.0, 1000.0);
|
||||
}
|
||||
|
||||
@@ -507,7 +512,7 @@ fn create_actuated_spherical_joints(
|
||||
colliders: &mut ColliderSet,
|
||||
impulse_joints: &mut ImpulseJointSet,
|
||||
multibody_joints: &mut MultibodyJointSet,
|
||||
origin: Point<f32>,
|
||||
origin: Vector,
|
||||
num: usize,
|
||||
use_articulations: bool,
|
||||
) {
|
||||
@@ -515,7 +520,7 @@ fn create_actuated_spherical_joints(
|
||||
let shift = 2.0;
|
||||
|
||||
// We will reuse this base configuration for all the impulse_joints here.
|
||||
let joint_template = SphericalJointBuilder::new().local_anchor1(point![0.0, 0.0, shift]);
|
||||
let joint_template = SphericalJointBuilder::new().local_anchor1(Vector::new(0.0, 0.0, shift));
|
||||
|
||||
let mut parent_handle = RigidBodyHandle::invalid();
|
||||
|
||||
@@ -532,7 +537,7 @@ fn create_actuated_spherical_joints(
|
||||
};
|
||||
|
||||
let rigid_body = RigidBodyBuilder::new(status)
|
||||
.translation(vector![origin.x, origin.y, origin.z + fi * shift])
|
||||
.translation(Vector::new(origin.x, origin.y, origin.z + fi * shift))
|
||||
// .rotation(Vector3::new(0.0, fi * 1.1, 0.0))
|
||||
;
|
||||
|
||||
@@ -587,7 +592,7 @@ fn do_init_world(testbed: &mut Testbed, use_articulations: bool) {
|
||||
&mut colliders,
|
||||
&mut impulse_joints,
|
||||
&mut multibody_joints,
|
||||
point![20.0, 5.0, 0.0],
|
||||
Vector::new(20.0, 5.0, 0.0),
|
||||
4,
|
||||
use_articulations,
|
||||
);
|
||||
@@ -596,7 +601,7 @@ fn do_init_world(testbed: &mut Testbed, use_articulations: bool) {
|
||||
&mut colliders,
|
||||
&mut impulse_joints,
|
||||
&mut multibody_joints,
|
||||
point![25.0, 5.0, 0.0],
|
||||
Vector::new(25.0, 5.0, 0.0),
|
||||
4,
|
||||
use_articulations,
|
||||
);
|
||||
@@ -605,7 +610,7 @@ fn do_init_world(testbed: &mut Testbed, use_articulations: bool) {
|
||||
&mut colliders,
|
||||
&mut impulse_joints,
|
||||
&mut multibody_joints,
|
||||
point![20.0, 0.0, 0.0],
|
||||
Vector::new(20.0, 0.0, 0.0),
|
||||
3,
|
||||
use_articulations,
|
||||
);
|
||||
@@ -614,7 +619,7 @@ fn do_init_world(testbed: &mut Testbed, use_articulations: bool) {
|
||||
&mut colliders,
|
||||
&mut impulse_joints,
|
||||
&mut multibody_joints,
|
||||
point![34.0, 0.0, 0.0],
|
||||
Vector::new(34.0, 0.0, 0.0),
|
||||
use_articulations,
|
||||
);
|
||||
create_fixed_joints(
|
||||
@@ -622,7 +627,7 @@ fn do_init_world(testbed: &mut Testbed, use_articulations: bool) {
|
||||
&mut colliders,
|
||||
&mut impulse_joints,
|
||||
&mut multibody_joints,
|
||||
point![0.0, 10.0, 0.0],
|
||||
Vector::new(0.0, 10.0, 0.0),
|
||||
10,
|
||||
use_articulations,
|
||||
);
|
||||
@@ -631,7 +636,7 @@ fn do_init_world(testbed: &mut Testbed, use_articulations: bool) {
|
||||
&mut colliders,
|
||||
&mut impulse_joints,
|
||||
&mut multibody_joints,
|
||||
point![20.0, 10.0, 0.0],
|
||||
Vector::new(20.0, 10.0, 0.0),
|
||||
6,
|
||||
use_articulations,
|
||||
);
|
||||
@@ -640,7 +645,7 @@ fn do_init_world(testbed: &mut Testbed, use_articulations: bool) {
|
||||
&mut colliders,
|
||||
&mut impulse_joints,
|
||||
&mut multibody_joints,
|
||||
point![13.0, 10.0, 0.0],
|
||||
Vector::new(13.0, 10.0, 0.0),
|
||||
3,
|
||||
use_articulations,
|
||||
);
|
||||
@@ -657,7 +662,7 @@ fn do_init_world(testbed: &mut Testbed, use_articulations: bool) {
|
||||
&mut colliders,
|
||||
&mut impulse_joints,
|
||||
&mut multibody_joints,
|
||||
point![-5.0, 0.0, 0.0],
|
||||
Vector::new(-5.0, 0.0, 0.0),
|
||||
use_articulations,
|
||||
);
|
||||
create_coupled_joints(
|
||||
@@ -665,7 +670,7 @@ fn do_init_world(testbed: &mut Testbed, use_articulations: bool) {
|
||||
&mut colliders,
|
||||
&mut impulse_joints,
|
||||
&mut multibody_joints,
|
||||
point![0.0, 20.0, 0.0],
|
||||
Vector::new(0.0, 20.0, 0.0),
|
||||
use_articulations,
|
||||
);
|
||||
|
||||
@@ -673,7 +678,7 @@ fn do_init_world(testbed: &mut Testbed, use_articulations: bool) {
|
||||
* Set up the testbed.
|
||||
*/
|
||||
testbed.set_world(bodies, colliders, impulse_joints, multibody_joints);
|
||||
testbed.look_at(point![15.0, 5.0, 42.0], point![13.0, 1.0, 1.0]);
|
||||
testbed.look_at(Vec3::new(15.0, 5.0, 42.0), Vec3::new(13.0, 1.0, 1.0));
|
||||
}
|
||||
|
||||
pub fn init_world_with_joints(testbed: &mut Testbed) {
|
||||
|
||||
Reference in New Issue
Block a user