AGX Dynamics 2.38.0.2
Loading...
Searching...
No Matches
ShapeDistance.h
Go to the documentation of this file.
1/*
2Copyright 2007-2024. Algoryx Simulation AB.
3
4All AGX source code, intellectual property, documentation, sample code,
5tutorials, scene files and technical white papers, are copyrighted, proprietary
6and confidential material of Algoryx Simulation AB. You may not download, read,
7store, distribute, publish, copy or otherwise disseminate, use or expose this
8material unless having a written signed agreement with Algoryx Simulation AB, or having been
9advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10valid commercial license from Algoryx Simulation AB.
11
12Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13from using this software, unless otherwise stated in written agreements with
14Algoryx Simulation AB.
15*/
16
17#pragma once
18
19#include <cstdint>
20
22#include <agx/Vec3.h>
23#include <agx/AffineMatrix4x4.h>
24
25
26namespace agxCollide {
27
28 class Shape;
29 class Geometry;
30
35 enum class ShapeDistanceResult : std::uint8_t {
36 SUCCESS,
39 FAILURE
40 };
41
42
67 const agxCollide::Shape* shape1, const agx::AffineMatrix4x4& transform1,
68 const agxCollide::Shape* shape2, const agx::AffineMatrix4x4& transform2,
69 agx::Vec3& point1, agx::Vec3& point2 );
70
71
72
93 const agxCollide::Geometry* geometry1, const agx::AffineMatrix4x4& transform1,
94 const agxCollide::Geometry* geometry2, const agx::AffineMatrix4x4& transform2,
95 agx::Vec3& point1, agx::Vec3& point2 );
96
97
98}
99
#define AGXPHYSICS_EXPORT
The geometry representation used by the collision detection engine.
Definition Geometry.h:92
Base class for a shape.
Definition Shape.h:54
This namespace consists of a set of classes for handling geometric intersection tests including boole...
AGXPHYSICS_EXPORT agxCollide::ShapeDistanceResult computeShapeDistance(const agxCollide::Shape *shape1, const agx::AffineMatrix4x4 &transform1, const agxCollide::Shape *shape2, const agx::AffineMatrix4x4 &transform2, agx::Vec3 &point1, agx::Vec3 &point2)
Utility function to compute the minimum distance between two shapes.
AGXPHYSICS_EXPORT agxCollide::ShapeDistanceResult computeGeometryDistance(const agxCollide::Geometry *geometry1, const agx::AffineMatrix4x4 &transform1, const agxCollide::Geometry *geometry2, const agx::AffineMatrix4x4 &transform2, agx::Vec3 &point1, agx::Vec3 &point2)
Utility method to perform shape-shape minimum distance test between all compatible shape pairs,...
ShapeDistanceResult
Status values that can be returned when performing shape-shape distance computation.
@ FAILURE
Generic error, e.g supported shapes but invalid values such as some negative shape size.
@ UNSUPPORTED_SHAPE_TYPES
One or more input shapes is of a non-supported type (Shape::hasSupportFunction() returns false)
@ SUCCESS
Distance measurement successful.
@ OVERLAPPING_SHAPES
Shapes overlap.