You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following code tries to intersect a ray from the origin to (1, 0) to a triangle right on its right
let a = graphene::Point3D::new(2.0,0.0,0.0);let b = graphene::Point3D::new(3.0, -1.0,0.0);let c = graphene::Point3D::new(3.0,1.0,0.0);let triangle = graphene::Triangle::from_point3d(Some(&a),Some(&b),Some(&c));let o = graphene::Point3D::new(0.0,0.0,0.0);let v = graphene::Vec3::new(1.0,0.0,0.0);let ray = graphene::Ray::new(Some(&o),Some(&v));let(kind, t_out) = ray.intersect_triangle(&triangle);println!("Kind: {:?}, t: {}", kind, t_out);
I also tried it on gtk using a drag source to intersect a ray from (0, 0) to the pointer location with a fixed triangle (that does not intersect the origin) without success, getting the exact same result.
The text was updated successfully, but these errors were encountered:
The following code tries to intersect a ray from the origin to (1, 0) to a triangle right on its right
The result is
I also tried it on gtk using a drag source to intersect a ray from (0, 0) to the pointer location with a fixed triangle (that does not intersect the origin) without success, getting the exact same result.
The text was updated successfully, but these errors were encountered: