30 class ClosestPointsSolution;
35 namespace ShapeColliders {
50 agxCollide::ShapeCollider::LocalContactPointVector& result);
71 agxCollide::ShapeCollider::LocalContactPointVector& result );
90 agxCollide::ShapeCollider::LocalContactPointVector& result );
104 agxCollide::ShapeCollider::LocalContactPointVector& result);
118 agxCollide::ShapeCollider::LocalContactPointVector& result );
136 agxCollide::ShapeCollider::LocalContactPointVector& result );
159 const ClosestPointsSolution& closest,
171 agxCollide::ShapeCollider::LocalContactPointVector& result,
172 bool createOnlyForCyl1InCyl2 =
false);
196 agx::Physics::Geometry::ShapeInstance shape1,
197 agx::Physics::Geometry::ShapeInstance shape2,
205 ShapeCollider::LocalContactPointVector& result);
219 agxCollide::ShapeCollider::LocalContactPointVector& result )
226 const agx::Vec3 p1 = cap1 * capsuleTransform;
227 const agx::Vec3 p2 = cap2 * capsuleTransform;
234 if (d1 <= capsuleRadius) {
236 const agx::Real depth = capsuleRadius - d1;
238 ShapeCollider::addContactPoint( result, point, normal * normalFlipSign, depth );
242 if (d2 <= capsuleRadius) {
244 const agx::Real depth = capsuleRadius - d2;
246 ShapeCollider::addContactPoint( result, point, normal * normalFlipSign, depth );
257 agxCollide::ShapeCollider::LocalContactPointVector& result)
259 const agx::Real radiusSum = radius1 + radius2;
260 agx::Vec3 normal = position1 - position2;
263 if (radiusSum * radiusSum < len2) {
267 if ((radiusSum + epsilon) * (radiusSum + epsilon) < len2)
273 ShapeCollider::addContactPoint( result,
274 position2 + normal * radius2, normal,
agx::Real(0) );
289 const agx::Real depth = radiusSum - distance;
291 ShapeCollider::addContactPoint( result,
292 position2 + normal * (radius2 - depth *
agx::Real(0.5)),
303 agxCollide::ShapeCollider::LocalContactPointVector& result)
306 if (distance > sphereRadius)
309 const agx::Real depth = sphereRadius - distance;
310 ShapeCollider::addContactPoint( result, spherePosition +
311 normal * (depth *
agx::Real(0.5) - sphereRadius), normal, depth );
#define AGXPHYSICS_EXPORT
Class representing the mathematical concept of a plane, also called a half- space.
agx::Vec3T< T > getNormal() const
T signedDistanceToPoint(const agx::Vec3T< T > &point) const
Calculates the distance from the plane to a point.
Real normalize()
Normalize the vector so that it has length unity.
Real length2() const
Length squared of the vector = vec .
#define DOXYGEN_END_INTERNAL_BLOCK()
#define DOXYGEN_START_INTERNAL_BLOCK()
This namespace consists of a set of classes for handling geometric intersection tests including boole...
Vec3T< Real > Vec3
The object holding 3 dimensional vectors and providing basic arithmetic.
AGXCORE_EXPORT const Real RealEpsilon