aboutsummaryrefslogtreecommitdiff
path: root/src/geometry/trimesh.rs
diff options
context:
space:
mode:
authorRobert Hrusecky <robert.hrusecky@utexas.edu>2020-10-29 18:09:41 -0500
committerRobert Hrusecky <robert.hrusecky@utexas.edu>2020-10-29 18:09:41 -0500
commitbcec54ef31d987cf20b493628a20777183a95f65 (patch)
treecee40c0467c04f1f02861342e20ce8223ca6d99b /src/geometry/trimesh.rs
parentdd8e25bc4756b8bd01d283b5d7e7c5daa9a1af3f (diff)
parent4b8242b9c267a9412c88793575db37f79c544ca2 (diff)
downloadrapier-bcec54ef31d987cf20b493628a20777183a95f65.tar.gz
rapier-bcec54ef31d987cf20b493628a20777183a95f65.tar.bz2
rapier-bcec54ef31d987cf20b493628a20777183a95f65.zip
Merge branch 'master' into infinite_fall_memory
Fix merge conflict resulting from "axii" spelling correction
Diffstat (limited to 'src/geometry/trimesh.rs')
-rw-r--r--src/geometry/trimesh.rs45
1 files changed, 38 insertions, 7 deletions
diff --git a/src/geometry/trimesh.rs b/src/geometry/trimesh.rs
index b6e23e7..b4e8518 100644
--- a/src/geometry/trimesh.rs
+++ b/src/geometry/trimesh.rs
@@ -1,13 +1,9 @@
-use crate::geometry::{Triangle, WQuadtree};
+use crate::geometry::{PointProjection, Ray, RayIntersection, Triangle, WQuadtree};
use crate::math::{Isometry, Point};
use na::Point3;
use ncollide::bounding_volume::{HasBoundingVolume, AABB};
-
-#[cfg(feature = "dim3")]
-use {
- crate::geometry::{Ray, RayIntersection},
- ncollide::query::RayCast,
-};
+use ncollide::query::{PointQuery, RayCast};
+use ncollide::shape::FeatureId;
#[derive(Clone)]
#[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))]
@@ -110,6 +106,41 @@ impl Trimesh {
}
}
+impl PointQuery<f32> for Trimesh {
+ fn project_point(&self, _m: &Isometry<f32>, _pt: &Point<f32>, _solid: bool) -> PointProjection {
+ // TODO
+ unimplemented!()
+ }
+
+ fn project_point_with_feature(
+ &self,
+ _m: &Isometry<f32>,
+ _pt: &Point<f32>,
+ ) -> (PointProjection, FeatureId) {
+ // TODO
+ unimplemented!()
+ }
+}
+
+#[cfg(feature = "dim2")]
+impl RayCast<f32> for Trimesh {
+ fn toi_and_normal_with_ray(
+ &self,
+ _m: &Isometry<f32>,
+ _ray: &Ray,
+ _max_toi: f32,
+ _solid: bool,
+ ) -> Option<RayIntersection> {
+ // TODO
+ None
+ }
+
+ fn intersects_ray(&self, _m: &Isometry<f32>, _ray: &Ray, _max_toi: f32) -> bool {
+ // TODO
+ false
+ }
+}
+
#[cfg(feature = "dim3")]
impl RayCast<f32> for Trimesh {
fn toi_and_normal_with_ray(