distance3d.geometry.support_function_capsule¶
- distance3d.geometry.support_function_capsule(search_direction, capsule2origin, radius, height)[source]¶
Compute extreme point of cylinder along a direction.
You can find similar implementations here:
https://github.com/kevinmoran/GJK/blob/b38d923d268629f30b44c3cf6d4f9974bbcdb0d3/Collider.h#L57 (Copyright (c) 2017 Kevin Moran, MIT License or Unlicense)
https://github.com/bulletphysics/bullet3/blob/e306b274f1885f32b7e9d65062aa942b398805c2/src/BulletCollision/CollisionShapes/btConvexShape.cpp#L228 (Copyright (c) 2003-2009 Erwin Coumans, zlib license)
- Parameters:
- search_directionarray, shape (3,)
Search direction.
- capsule2originarray, shape (4, 4)
Pose of the capsule.
- radiusfloat
Radius of the cylinder.
- heightfloat
Height of the cylinder.
- Returns:
- extreme_pointarray, shape (3,)
Extreme point along search direction.