diff options
| author | Crozet Sébastien <developer@crozet.re> | 2021-01-22 18:10:54 +0100 |
|---|---|---|
| committer | Crozet Sébastien <developer@crozet.re> | 2021-01-22 18:10:54 +0100 |
| commit | 57072f3ba7664933a031d6f5e332db7c183ec39c (patch) | |
| tree | d27077498c3f66096150c594c51b5ad48e6e2666 /examples3d | |
| parent | b779eb261e7c3e816c8b586f1f496dcd17dbf700 (diff) | |
| download | rapier-57072f3ba7664933a031d6f5e332db7c183ec39c.tar.gz rapier-57072f3ba7664933a031d6f5e332db7c183ec39c.tar.bz2 rapier-57072f3ba7664933a031d6f5e332db7c183ec39c.zip | |
Move ColliderShape out of Rapier.
Diffstat (limited to 'examples3d')
| -rw-r--r-- | examples3d/compound3.rs | 8 | ||||
| -rw-r--r-- | examples3d/convex_decomposition3.rs | 6 | ||||
| -rw-r--r-- | examples3d/heightfield3.rs | 8 | ||||
| -rw-r--r-- | examples3d/trimesh3.rs | 8 |
4 files changed, 15 insertions, 15 deletions
diff --git a/examples3d/compound3.rs b/examples3d/compound3.rs index b2fa485..4168fe9 100644 --- a/examples3d/compound3.rs +++ b/examples3d/compound3.rs @@ -1,6 +1,6 @@ use na::{Isometry3, Point3}; use rapier3d::dynamics::{JointSet, RigidBodyBuilder, RigidBodySet}; -use rapier3d::geometry::{ColliderBuilder, ColliderSet, ColliderShape}; +use rapier3d::geometry::{ColliderBuilder, ColliderSet, SharedShape}; use rapier_testbed3d::Testbed; pub fn init_world(testbed: &mut Testbed) { @@ -66,15 +66,15 @@ pub fn init_world(testbed: &mut Testbed) { let shapes = vec![ ( Isometry3::identity(), - ColliderShape::cuboid(rad * 10.0, rad, rad), + SharedShape::cuboid(rad * 10.0, rad, rad), ), ( Isometry3::translation(rad * 10.0, rad * 10.0, 0.0), - ColliderShape::cuboid(rad, rad * 10.0, rad), + SharedShape::cuboid(rad, rad * 10.0, rad), ), ( Isometry3::translation(-rad * 10.0, rad * 10.0, 0.0), - ColliderShape::cuboid(rad, rad * 10.0, rad), + SharedShape::cuboid(rad, rad * 10.0, rad), ), ]; diff --git a/examples3d/convex_decomposition3.rs b/examples3d/convex_decomposition3.rs index c06a450..f3f0e24 100644 --- a/examples3d/convex_decomposition3.rs +++ b/examples3d/convex_decomposition3.rs @@ -3,7 +3,7 @@ use na::{Point3, Translation3}; use rapier3d::cdl::bounding_volume::{self, BoundingVolume}; use rapier3d::cdl::transformation::vhacd::{VHACDParameters, VHACD}; use rapier3d::dynamics::{JointSet, RigidBodyBuilder, RigidBodySet}; -use rapier3d::geometry::{ColliderBuilder, ColliderSet, ColliderShape}; +use rapier3d::geometry::{ColliderBuilder, ColliderSet, SharedShape}; use rapier_testbed3d::Testbed; use std::path::Path; @@ -82,11 +82,11 @@ pub fn init_world(testbed: &mut Testbed) { .map(|idx| [idx.x, idx.y, idx.z]) .collect(); - let decomposed_shape = ColliderShape::convex_decomposition(&vertices, &indices); + let decomposed_shape = SharedShape::convex_decomposition(&vertices, &indices); shapes.push(decomposed_shape); } - // let compound = ColliderShape::compound(compound_parts); + // let compound = SharedShape::compound(compound_parts); for k in 1..num_duplications + 1 { let x = (igeom % width) as f32 * shift; diff --git a/examples3d/heightfield3.rs b/examples3d/heightfield3.rs index 7bf4061..f603bb1 100644 --- a/examples3d/heightfield3.rs +++ b/examples3d/heightfield3.rs @@ -1,6 +1,6 @@ use na::{ComplexField, DMatrix, Isometry3, Point3, Vector3}; use rapier3d::dynamics::{JointSet, RigidBodyBuilder, RigidBodySet}; -use rapier3d::geometry::{ColliderBuilder, ColliderSet, ColliderShape}; +use rapier3d::geometry::{ColliderBuilder, ColliderSet, SharedShape}; use rapier_testbed3d::Testbed; pub fn init_world(testbed: &mut Testbed) { @@ -70,15 +70,15 @@ pub fn init_world(testbed: &mut Testbed) { let shapes = vec![ ( Isometry3::identity(), - ColliderShape::cuboid(rad, rad / 2.0, rad / 2.0), + SharedShape::cuboid(rad, rad / 2.0, rad / 2.0), ), ( Isometry3::translation(rad, 0.0, 0.0), - ColliderShape::cuboid(rad / 2.0, rad, rad / 2.0), + SharedShape::cuboid(rad / 2.0, rad, rad / 2.0), ), ( Isometry3::translation(-rad, 0.0, 0.0), - ColliderShape::cuboid(rad / 2.0, rad, rad / 2.0), + SharedShape::cuboid(rad / 2.0, rad, rad / 2.0), ), ]; diff --git a/examples3d/trimesh3.rs b/examples3d/trimesh3.rs index e03ec6d..55002d9 100644 --- a/examples3d/trimesh3.rs +++ b/examples3d/trimesh3.rs @@ -1,6 +1,6 @@ use na::{ComplexField, DMatrix, Isometry3, Point3, Vector3}; use rapier3d::dynamics::{JointSet, RigidBodyBuilder, RigidBodySet}; -use rapier3d::geometry::{ColliderBuilder, ColliderSet, ColliderShape, HeightField}; +use rapier3d::geometry::{ColliderBuilder, ColliderSet, HeightField, SharedShape}; use rapier_testbed3d::Testbed; pub fn init_world(testbed: &mut Testbed) { @@ -75,15 +75,15 @@ pub fn init_world(testbed: &mut Testbed) { let shapes = vec![ ( Isometry3::identity(), - ColliderShape::cuboid(rad, rad / 2.0, rad / 2.0), + SharedShape::cuboid(rad, rad / 2.0, rad / 2.0), ), ( Isometry3::translation(rad, 0.0, 0.0), - ColliderShape::cuboid(rad / 2.0, rad, rad / 2.0), + SharedShape::cuboid(rad / 2.0, rad, rad / 2.0), ), ( Isometry3::translation(-rad, 0.0, 0.0), - ColliderShape::cuboid(rad / 2.0, rad, rad / 2.0), + SharedShape::cuboid(rad / 2.0, rad, rad / 2.0), ), ]; |
