- Fixed same-machine determinism of the re-exported hashmap when building without the
enhanced-determinismfeature. - Replace all the square-root angular inertia tensors by the same tensor without taking it square root.
As a result
MassProperties::world_inv_inertia_sqrthas been renamed toworld_inv_inertia,MassProperties::inv_principal_inertia_sqrtrenamed toinv_principal_inertia. - Modified the type aliases from the
simdmodule when neither thesimd-stablenorsimd-nightlyare enabled. Without these simd features all type aliases are single-lane non-simd types (f32,f64,bool) instead of 4-lanes auto-simd types. - Moved the
SimdAabbtype behind thesimd-stableorsimd-nightlycargo feature.
- Update to nalgebra 0.34.
- Add
Bvh::insert_with_change_detectionwhich runs an insertion unless the inserted aabb is enclosed in the existing one. This differs frominsert_or_update_partiallybecause the former will update parent AABBs so they enclose their descendants.
- Fix bug in BVH tree node removal.
- Fix bug in BVH tree building from exactly two leaves.
- Fix invalid BVH state that could be reached after a removal resulting in a partial root.
- Add a new
Bvhacceleration data-structure. It replacesQbvhentirely. It supports:- Traversals (best-first, depth-first, BVTT, leaf iterators, and leaf pairs iterator).
- It can be constructed either incrementally by inserting nodes, or from a set of leaves using either the binned building strategy or the PLOC (without parallelism) strategy.
- Dynamic leaf insertion, update, removal.
- Incremental tree rebalancing.
- Fix
clip_aabb_linecrashing when given incorrect inputs (zero length direction or NAN). - Fix
Segment::intersects_rayreturning false-positive when the segment is zero-length. (#31). - Expose
utils::sort3andutils::sort2.
- The
local_point_cloud_aabb,point_cloud_aabb, andAabb::from_pointsnow takes an iterator over point values instead of an iterator to point references. Variants taking point references still exist and are namedlocal_point_cloud_aabb_ref,point_cloud_aabb_refandAabb::from_points_ref. - Renamed
SimdCompositeShapeandTypedSimdCompositeShapetoCompositeShapeand TypedCompositeShape`. - The
TypedCompositeShapetrait now derives fromCompositeShape. - Removed every
*Visitorstructures. Instead, either callBvh::traverse(orBvh::search_best, orBvh::leaves, orbvh::leaf_pairs), or wrap your composite shape intoCompositeShapeRefto access some generic implementation of various geometric queries for any composite shape. - All composite shapes now rely on the new
Bvhacceleration structure instead ofQbvh. - The
Qbvhhas been removed. UseBvhinstead.
- Add
Voxels::combine_voxel_statesto merge the voxel state of twoVoxelsshapes, updating their internal voxels state as if both shapes were part of a single one. In particular, this will prevent any internal edge that would arise at the boundaries of both shapes if they were adjacent. - Add
Voxels::propagate_voxel_changeto propagate a single-voxel modification from oneVoxelsshape to another, in order to update their internal neighborhood information as if both were part of the sameVoxelsshape.
- Add
TriMesh::cast_ray_with_cullingandTriMesh::cast_local_ray_with_cullingfor casting rays on a triangle mesh but with the possibility to prevents hits on front-faces or back-faces. - Add contact manifold calculation between two voxels shapes, or a voxels shape and compound shape.
- Add intersection check between voxels and other shapes.
- Add
MassProperties::from_voxelsto compute the mass and angular inertia tensor from a voxels shape.
- Add new variants to
TypedWorkspaceDatafor voxels-voxels and voxels-compound collision detection workspace data. - The
Voxelsshape now only support cuboids as their leaf geometries (pseudo-balls were removed).
- Fix infinite loop in
Voxels::set_voxel.
- Rework the
Voxelsshape API to use better method names. - Added implementations for linear and non-linear shape-casting involving
Voxelsshapes.
- Added the
Voxelstype: a dedicated shape for voxel models. This is currently experimental because some features are still missing (in particular: shape-casting, mass properties, and collision-detection against non-convex shapes). - Added
SharedShape::voxels,SharedShape::voxels_from_points, and::voxelized_meshfor creating a voxels shape from grid coordinates, points, or automatic voxelization of a triangle mesh.
- Derive
CopyforVHACDParameters. - Add
spadedefault feature for algorithms using Delaunay triangulation fromspade. - Add
SharedShape::from_convex_polyline_unmodifiedandConvexPolygon::from_convex_polyline_unmodifiedto initialize a polyline from a set of points assumed to be convex, and without modifying this set even if some points are collinear. - Add
TriMesh::pseudo_normals_if_orientedthat returnsSomeonly if the mesh has theTriMeshFlags::ORIENTEDflag enabled.
- The
TriMeshFlags::FIX_INTERNAL_EDGESflag no longer automatically enable theTriMeshFlags::ORIENTEDflag (but the mesh pseudo-normals will still be computed). - Improve
no_stdcompatibility.- Everything is now compatible, except
mesh_intersections,split_trimesh, convex hull validation, and computation of connected components forTriMesh. - Add the
alloc_instead_of_core,std_instead_of_alloc, andstd_instead_of_coreClippy lints to the workspace. - Use
coreandallocdirectly rather than using anstdalias. - Use
hashbrowninstead ofrustc-hashwhenenhanced-determinismis not enabled. - Make
spadeoptional.
- Everything is now compatible, except
- Implement
::to_trimeshin 2d forCuboidandAabb. - Fix some edge-cases in
point_in_poly2dfor self-intersecting polygons. - Fix some edge-cases in mesh/mesh intersection that could result in degenerate triangles being generated.
- Propagate error information while creating a mesh and using functions making use of it (See #262):
TriMesh::newTriMesh::intersection_with_aabbSharedShape::trimeshSharedShape::trimesh_with_flags
point_cloud_bounding_sphereandpoint_cloud_bounding_sphere_with_centernow returns aBoundingSphere.- Removed
IntersectionCompositeShapeShapeBestFirstVisitor(which had been deprecated for a while): useIntersectionCompositeShapeShapeVisitorinstead.
- Always compute connected-components from union-find instead of topology. It is faster and the function based on topology could result in a crash for non-manifold meshes.
- Add
TriMeshConnectedComponents::to_meshesand::to_mesh_buffersto easily extract individual meshes from the set of connected components. - Add
TriMesh::connected_component_meshesto get the connected components as meshes directly.
- Connected-components extraction will never fail now, and no longer require the successful calculation of the mesh’s half-edge topology.
- Fix compiling with
enhanced-determinismfeature enabled.- This is now checked on CI.
- Implement
Shape::feature_normal_at_pointforTriMeshto retrieve the normal of a face, when passing aFeatureId::Face. - Add
convex_polygons_intersection_points_with_tolerances,convex_polygons_intersection_with_tolerances, andintersect_meshes_with_tolerancesthat let the user specify tolerances value for the collinearity check.
- Fix some robustness issues in mesh/mesh intersection when parts of both meshes overlap perfectly.
- Improve robustness of convex polygons intersections when all the vertices of one polygon are located in either the edges or vertices of the other polygon.
- Fix incorrect orientation sometimes given to the polygon output by the convex polygon intersections when one of the polygon is completely inside the other.
- Improve convergence of epa algorithm in degenerate configurations.
- Fix bug in the mesh/mesh intersection algorithm that didn’t properly take mesh transforms into account.
- Add
Triangle::robust_scaled_normalandTriangle::robust_normalas a more robust way to compute the triangles normal for thin triangles that generally cause numerical instabilities. - Add
Triangle::angle_closest_to_90to find the triangle’s vertex with an angle closest to 90 degree. - Add the
wavefrontfeature that enablesTriMesh::to_obj_filefor exporting a mesh as an obj file. - Add
Shape::scale_dynfor scaling a shape as a trait-object.
TypedShape::Custom(u32)is nowTypedShape::Custom(&dyn Shape).AabbSetsInterferencesCollector::tolerenceis now spelled correctly astolerance.Realis now exposed through ausestatement, so that an indirection is removed in documentation: previous occurrences ofRealnow showf32orf64.- Significantly improved the general stability of mesh/mesh intersection calculation.
- Rename
Shape::clone_boxtoShape::clone_dyn(theclone_boxmethod still exists but has been deprecated). - Make
try_convex_hullreturn an error instead of panicking if less than 3 input points are given. - Make
Triangle::normalandTriangle::scaled_normalonly available in 3D instead of panicking in 2D.
- Fix occasional crash in mesh/mesh intersection if some of the vertex coordinates are very small.
- Fix edge case where some of the principal angular inertia are clamped to zero for decimeter-sized objects.
- Have ball-ball shape casting take into account the
stop_on_penetrationflags. - Don’t panic in EPA for a corner case that needs some additional debugging. Show a debug log instead.
- Implement concave polygons intersections:
polygons_intersection_points,polygon_intersection.
- Update
bitflagsto version ^2.3 - Update
nalgebrato 0.33. - Update
indexmapto 2.
- Fix a regression in ball vs. convex shape contact manifold calculation.
- Add
ShapeCastOptionsthat includes two new options for (linear) shape-casting.ShapeCastOptions::target_distancewhich will return a hit as soon as the moving shapes are closer than this distance; andcompute_impact_geometry_on_penetrationwhich forces the calculation of proper witness points and normals even if the shapes are initially intersecting (time_of_impact == 0.0).
This version modifies many names related to shape-casting:
- Renamed
TOItoShapeCastHit. - Renamed
TOIStatustoShapeCastStatus. - Rename
RayIntersection::toitoRayIntersection::time_of_impact. - More generally, all occurrences of the word
toihave been replaced bytime_of_impactfor better clarity. - Rename
query::time_of_impacttoquery::cast_shapes. More generally, all the functions prefixed withtime_of_impact_(e.g.time_of_impact_ball_ball) are now prefixed withcast_shapes_(e.g.cast_shapes_ball_ball). - Rename
QueryDispatcher::time_of_impacttoQueryDispatcher::cast_shapes. - The (linear) shape-casting functions like
query::cast_shapes(previously namedquery::time_of_impact) now take aShapeCastOptionsinstead of themax_toiandstop_at_penetrationarguments. - Rename
query::nonlinear_time_of_impacttoquery::cast_shapes_nonlinear. - Rename
QueryDispatcher::nonlinear_time_of_impacttoQueryDispatcher::cast_shapes_nonlinear. - Rename
NonlinearTOIModetoNonlinearShapeCastMode, andNonlinearTOIMode::DirectionalTOItoNonlinearShapeCastMode::Directional. - Rename
TimeOfImpactStatus::PenetratingtoShapeCastStatus::PenetratingOrWithinTargetDist.
- Remove CUDA support to break free from the toolchain restriction required by cust.
- Rework internal edges resolution using normal cones. This implies the modification of the
SimdCompositeShape::map_part_at,TypedSimdCompositeShape::map_typed_part, andTypedSimdCompositeShape::map_untyped_parttrait functions so that the closure argument takes an extra argument for the (optional) normal constraints. This argument can be safely ignored by user code unless applying the normal collection is relevant to your use-case. - Contact manifolds will now retain all contacts (including the ones further than the specified
predictiondistance) whenever any contact is actually closer than thispredictiondistance. - Typo fix: renamed
TopologyError::BadAdjascentTrianglesOrientationtoBadAdjacentTrianglesOrientation.
- Fix contacts between convex shapes being occasionally ignored due to some rounding errors.
- Remove crash when entering unreachable code in non-linear TOI calculation.
- Fix accuracy issue in triangle-mesh center-of-mass calculation when the mesh isn’t manifold.
- Add
SdpMatrix2::inverse_and_get_determinant_unchecked. This is useful for computing the inverse in a AoSoA SIMD setting. - Add
Aabb::intersects_moving_aabbto perform a swept test between two moving aabbs.
- Add
Qbvh::traverse_depth_first_with_context,Qbvh::traverse_depth_first_node_with_stack_and_context, and the relatedSimdVisitorWithContexttrait to allow parent nodes to pass a custom context to its children during recursion.
- The
point_in_poly2dnow handles arbitrary (convex and non-convex) polygons. The previous implementation that only supported convex polygons has been renamedpoint_in_convex_poly2d.
- Fix a crash in
Qbvh::refitthat results from the QBVH tree becoming increasingly imbalanced.
- Add
Aabb::scaled_wrt_centerto scale an AABB while keeping its center unchanged.
- Fix ball-convex manifolds missing contacts in some corner cases.
- Fix panic in
TriMesh::intersection_with_plane.
- When using
rkyv, fixCheckBytesimplementation for types archived as themselves. - Fix occasional crash in the
QBVHincremental update.
- Fix
Polyline::flat_indicesthat returned an incorrectly sized slice. - Fix serialization of
SimdAabbinto map-like formats like JSON, YAML, RON.
- Add validation when using
rkyvsafe API whenever applicable toparrytypes.
- Improved performance of intersection checks involving composite shapes (compound shapes, trimeshes, polylines, etc.)
This version was yanked. See the release notes for 0.13.3 instead.
- Add workaround to address jitter issue due to incorrectly empty contact manifolds generated sometimes for convex
polyhedron.
- About
rkyvsupport: most POD structs (Aabb,Ball,Cuboid, etc.) are now archived as themselves instead of being archived as different types (for exampleAabbis archived asAabbitself instead ofArchivedAabb).
- In 3D, add
transformation::try_convex_hullfor a convex hull calculation that will return an error instead of panicking on unsupported inputs.
- Fixed duplicate faces in the connected components returned by
TriMesh::connected_components.
- Add
TriMesh::canonical_intersection_with_planefor intersecting with planes aligned with one of the coordinate axes. - Add
TriMesh::intersection_with_planefor intersecting with arbitrary planes. - Add
TriMesh::intersection_with_local_planefor intersecting with arbitrary planes in the same space as the mesh - Add
IntersectResultas the output type for the above functions. - Add
Polyline::extract_connected_componentswhich splits a compound polyline into its connected components. - Add implementations of
bytemuck::Podandbytemuck::Zeroablefor all the simple shapes that allow it (Cuboid,Ball,Cone, etc.), and for bounding volumes (BoundingSphereandAabb).
Qbvh::leaf_datanow requires&selfinstead of&mut self.- Replace the
Qbvh::leafboolean by a bitflags.
- Add
Qbvh::remove,Qbvh::pre_update_or_insert,Qbvh::refit,Qbvh::rebalanceto allow modifying aQbvhwithout having to rebuild it completely. - Add
QbvhNode::is_leafto get if a node is a leaf or not. - Add
SharedShape::trimesh_with_flagsfor building a trimesh with specific pre-processing flags.
- Fix
Triangle::contains_point.
- Add
SharedShape::trimesh_with_flagsfor constructing a triangle mesh with flags specified by the user.
- Rename
AABBtoAabbto comply with Rust’s style guide. - Rename
QBVHtoQbvhto comply with Rust’s style guide.
- Add
ConvexPolygon::offsettedto dilate a polygon. - Add
CudaTriMeshandCudaTriMeshPtrfor triangle-meshes usable with CUDA. - Add a no-std implementation of point-projection on a triangle mesh.
- Fix ghost collisions on internal edges on flat 3D meshed and flat 3D heightfields.
- Fix pseudo-normals calculation that could generate invalid normals for triangles with some small vertex angles.
- Fix
Aabb::bounding_spherewhich returned a bounding sphere that was too big.
- Add to
query::time_of_impacta boolean argumentstop_at_penetration. If set tofalsethe linear shape-cast won’t immediately stop if the shape is penetrating another shape at its starting point and its trajectory is such that it’s existing that penetration configuration.
- Add 2D
Heightfield::to_polylineto get the explicit vertices/indices of a 2D heightfield seen as a polyline. - Add the support for linear shape-cast (
query::time_of_impact) for heightfields. - Make the convex polyhedron scaling more forgiving regarding normals to avoid frequent unjustified panics.
- Fix panic happening when building a convex polyhedron with empty inputs.
- Add the support of Heightfields on CUDA kernels written in Rust using the
custcrate. - Add the
rkyv-serializefeature that enables the implementation ofrkyvserialization/deserialization for most shapes. - Add the
parallelfeature that enables methods for the parallel traversal of Qbvh trees:Qbvh::traverse_bvtt_parallel,Qbvh::traverse_bvtt_node_parallel,Qbvh::traverse_depth_first_parallel,Qbvh::traverse_depth_first_node_parallel.
- Fix the application of non-uniform scaling to balls.
- Remove
&selfargument fromCompound::decompose_trimesh. - Switch to
cust0.3 (for partial CUDA support). - Rename
RoundShape::base_shapetoRoundShape::inner_shape.
- Allow custom balancing strategies for the Qbvh construction. Some strategies are allowed to generate new leaves during the splitting process.
- Allow using point projection on heightfields from a CUDA kernel.
- Add the simultaneous traversal of two Qbvhs.
- Add computation of
MassPropertiesfor aTriMesh. - Add
.to_outlinemethods to compute the outline of a 3D shape (useful for debug-rendering). - Add method to apply a scaling factor to some shapes. Shapes not supporting non-uniform scaling (like balls) will return a convex approximation of the scaled result.
- Add methods to split (into up to two parts) a Cuboid, Segment, or TriMesh with an axis-aligned plane.
- Add the computation of the intersection mesh between two TriMesh, or between a Cuboid and a TriMesh.
- Until now, the orientation of the polygon computed by 2D convex hull
computation
parry2d::transformation::convex_hullandparry2d::transformation::convex_hull_idxwasn't specified (and was generally in clockwise order). Now, this orientation is explicitly specified in the documentation and is set to counter-clockwise order (which is coherent with orientation expected by, e.g., theConvexPolygontype).
- Add
parry::utils::obbwhich computes a (possibly sub-optimal) OBB for a set of points. - Add
Polyline::project_local_point_assuming_solid_interior_ccwwhich projects a point on the polyline contour, and is able to detect if that points is located inside of the polyline, assuming that the polyline is closed and oriented counter-clock-wise. - Add (3D only)
TriMesh::compute_pseudo_normals. If this is called, and if the trimesh respects some constraints ( oriented with outward normals, manifold almost everywhere, etc.) any subsequent point queries with thesolidargument set totruewill properly set thePointProjection::is_insideto true when the point lies in the interior of the trimesh. - Added the implementation of the ear-clipping and Hertel-Mehlhorn algorithm that can be used for 2D triangulation and convex decomposition.
- Add the ability to use a subset of Parry’s features in a
no-stdcontext. If the newcudacargo feature of Parry is enabled, all features compatible withno-stdcan be used inside of a CUDA kernel written in Rust thanks to the rust-cuda ecosystem.
- Fix the orientation of the polygons generated by the 2D convex polygon decomposition (they are now always oriented
counter-clockwise as expected by the
ConvexPolygontype). - Fix the intersection test between a 2D ball and a 2D compound shape.
- Add the method
Aabb::volumeto compute the volume of an Aabb.
- Update the codebase to use
nalgebra v0.29.
- Fix a bug where the normal returned by ray-casting on polylines would not be normalized.
- Implement
Debug, Clone, PartialEqforVHACDParameters. - Add a method to reverse the order of a polyline.
- Add a method to remove duplicate vertices form a
TriMesh(and adjusting the index buffer accordingly). - Add a method to iterate through all the lean data stored by a Qbvh.
- Implement the Interval Newton Method for computing all the roots of a non-linear scalar function.
- Implement the intersection test between a spiral and an Aabb.
- Rename all occurrences of
quadtreetoqbvh. Using the termquadtreewas not representative of the actual acceleration structure being used (which is a BVH).
- Fix a bug where
query::contactwould returnNonefor a all intersecting a cuboid in such a way that one of the cuboid's vertices coincides exactly with the ball's center.
- Updated all dependencies to their latest version.
- Fix ray-casting against solid triangles.
- Fix NaN when adding mass-properties with a zero mass.
ShapeTypenow implementsPartialEq, Eq, Hash.
- The order of vertices output by
Cuboid::to_polylinehas been modified to actually represent the cuboid's boundary (instead of passing through its diagonal).
SharedShapenow implementsAsRef<dyn Shape>.- Add the optional method
Shape::compute_swept_aabbto theShapetrait.
- Renamed
SimdQuadTreetoQbvh(Quaternary Bounding Volume Hierarchy). The incorrect nameSimdQuadTreeis now deprecated. Qbvh::clear_and_rebuildis now slightly more general.
- Switch to
nalgebra0.26.
- Add a special case for the triangle/cuboid edge-edge case in the SAT implementation.
- Add contact manifold computation between a convex shape and a HalfSpace.
- Add a special case (instead of GJK) for computing the distance between a ball and a convex shape.
- Add a
Shape::clone_boxmethod to clone a shape trait-object. - Add a
Shape::make_mutmethod to take a mutable reference to the shape trait-object. - Add methods like
Shape::as_shape_mutto downcast a&mut Shapeto a concrete mutable shape. - Add
MassProperties::set_massas a simple way to modify the mass while automatically adjusting the angular inertia. - Make the fields of
BoundingSpherepublic. - Add
Aabb::EDGES_VERTEX_IDSandAabb::FACES_VERTEX_IDSwhich are index tables describing the vertices of a given edge, or of a given face, of the Aabb.
- Remove the
target_distargument fromquery::time_of_impact. - The
RigidBodyMotionand all its implementors have been removed. Use theNonlinearRigidMotionstruct instead. - The
query::nonlinear_time_of_impactfunction arguments changed completely to accommodate for the newNonlinearRigidMotionstruct. See the doc ofquery::nonlinear_time_of_impactfor details.
- Fix the separation computation between a cuboid and a support-map shape in the SAT implementation.
- Fix a bug causing invalid results with
query::time_of_impactwhenever the first shape was rotated.
- Add the
Shape::as_typed_shapemethod to convert the shape trait-object to an enum. - Add the
TypedShapeenum with variants containing references to concrete shapes (except for user-defined custom shapes). - Add dedicated algorithms for the projection of a point on a cone or a cylinder.
- Improve the overall shape serialization performance.
- Add
Aabb::verticesto get an array containing its vertices. - Add
Aabb::split_at_centerto split an Aabb into 4 (in 2D) or 8 (in 3D) parts. - Add
Aabb::to_trimeshto compute the mesh representation of an Aabb.
- Remove the
Shape::as_serializemethod.
- Fix a bug causing making some ball/convex shape contact manifold computation fail when they are penetrating deeply.