Format all c and h files
This commit is contained in:
@@ -26,16 +26,14 @@
|
||||
* @date 1 Jan 2022
|
||||
* @brief Main interface of OpenGJK containing quick reference and API documentation.
|
||||
*
|
||||
* More extensive explanation of what the header
|
||||
* @see http://google.com
|
||||
* @see https://www.mattiamontanari.com/opengjk/
|
||||
*/
|
||||
|
||||
#ifndef OPENGJK_H__
|
||||
#define OPENGJK_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*! @brief Precision of floating-point numbers.
|
||||
@@ -43,29 +41,29 @@ extern "C"
|
||||
* Default is set to 64-bit (Double). Change this to quickly play around with 16- and 32-bit. */
|
||||
#define gkFloat double
|
||||
|
||||
/*! @brief Data structure for convex polytopes.
|
||||
/*! @brief Data structure for convex polytopes.
|
||||
*
|
||||
* Polytopes are three-dimensional shapes and the GJK algorithm works directly on their convex-hull. However the convex-hull is never computed explicity, instead each GJK-iteraion employs a support function that has a cost linearly dependen on the number of points defining the polytope. */
|
||||
typedef struct gkPolytope_
|
||||
{
|
||||
int numpoints; /*!< Number of points defining the polytope. */
|
||||
gkFloat s[3]; /*!< Furthest point retunred by the support function and updated at each GJK-iteration. For the first itearion this value is a guess - and this guess not irrelevant. */
|
||||
gkFloat **coord; /*!< Coordinates of the points of the polytope. This is owned by user who manages and garbage-collects the memory for these coordinates. */
|
||||
} gkPolytope;
|
||||
typedef struct gkPolytope_ {
|
||||
int numpoints; /*!< Number of points defining the polytope. */
|
||||
gkFloat s
|
||||
[3]; /*!< Furthest point retunred by the support function and updated at each GJK-iteration. For the first itearion this value is a guess - and this guess not irrelevant. */
|
||||
gkFloat**
|
||||
coord; /*!< Coordinates of the points of the polytope. This is owned by user who manages and garbage-collects the memory for these coordinates. */
|
||||
} gkPolytope;
|
||||
|
||||
/*! @brief Data structure for simplex.
|
||||
/*! @brief Data structure for simplex.
|
||||
*
|
||||
* The simplex is updated at each GJK-iteration. For the first itearion this value is a guess - and this guess not irrelevant. */
|
||||
typedef struct gkSimplex_
|
||||
{
|
||||
int nvrtx; /*!< Number of points defining the simplex. */
|
||||
gkFloat vrtx[4][3]; /*!< Coordinates of the points of the simplex. */
|
||||
} gkSimplex;
|
||||
typedef struct gkSimplex_ {
|
||||
int nvrtx; /*!< Number of points defining the simplex. */
|
||||
gkFloat vrtx[4][3]; /*!< Coordinates of the points of the simplex. */
|
||||
} gkSimplex;
|
||||
|
||||
/*! @brief Invoke the GJK algorithm to compute the minimum distance between two polytopes.
|
||||
/*! @brief Invoke the GJK algorithm to compute the minimum distance between two polytopes.
|
||||
*
|
||||
* The simplex has to be initialised prior the call to this function. */
|
||||
gkFloat compute_minimum_distance(const gkPolytope p_, const gkPolytope q_, gkSimplex *s_);
|
||||
gkFloat compute_minimum_distance(const gkPolytope p_, const gkPolytope q_, gkSimplex* s_);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user