Classes | Public Types | Public Member Functions | Public Attributes | Private Attributes | List of all members
fcl::detail::GJK< S > Struct Template Reference

class for GJK algorithm More...

#include <gjk.h>

Classes

struct  Simplex
 
struct  SimplexV
 

Public Types

enum  Status { Valid, Inside, Failed }
 

Public Member Functions

void appendVertex (Simplex &simplex, const Vector3< S > &v)
 append one vertex to the simplex More...
 
bool encloseOrigin ()
 whether the simplex enclose the origin More...
 
Status evaluate (const MinkowskiDiff< S > &shape_, const Vector3< S > &guess)
 GJK algorithm, given the initial value guess. More...
 
Vector3< S > getGuessFromSimplex () const
 get the guess from current simplex More...
 
SimplexgetSimplex () const
 get the underlying simplex using in GJK, can be used for cache in next iteration More...
 
void getSupport (const Vector3< S > &d, const Vector3< S > &v, SimplexV &sv) const
 apply the support function along a direction, the result is return is sv, here shape0 is translating at velocity v More...
 
void getSupport (const Vector3< S > &d, SimplexV &sv) const
 apply the support function along a direction, the result is return in sv More...
 
 GJK (unsigned int max_iterations_, S tolerance_)
 
void initialize ()
 
void removeVertex (Simplex &simplex)
 discard one vertex from the simplex More...
 

Public Attributes

distance
 
Vector3< S > ray
 
MinkowskiDiff< S > shape
 
Simplex simplices [2]
 

Private Attributes

size_t current
 
SimplexVfree_v [4]
 
unsigned int max_iterations
 
size_t nfree
 
Simplexsimplex
 
Status status
 
SimplexV store_v [4]
 
tolerance
 

Detailed Description

template<typename S>
struct fcl::detail::GJK< S >

class for GJK algorithm

Definition at line 52 of file gjk.h.

Member Enumeration Documentation

◆ Status

template<typename S >
enum fcl::detail::GJK::Status
Enumerator
Valid 
Inside 
Failed 

Definition at line 74 of file gjk.h.

Constructor & Destructor Documentation

◆ GJK()

template<typename S >
fcl::detail::GJK< S >::GJK ( unsigned int  max_iterations_,
tolerance_ 
)

Definition at line 55 of file gjk-inl.h.

Member Function Documentation

◆ appendVertex()

template<typename S >
void fcl::detail::GJK< S >::appendVertex ( Simplex simplex,
const Vector3< S > &  v 
)

append one vertex to the simplex

Definition at line 227 of file gjk-inl.h.

◆ encloseOrigin()

template<typename S >
bool fcl::detail::GJK< S >::encloseOrigin

whether the simplex enclose the origin

Definition at line 236 of file gjk-inl.h.

◆ evaluate()

template<typename S >
GJK< S >::Status fcl::detail::GJK< S >::evaluate ( const MinkowskiDiff< S > &  shape_,
const Vector3< S > &  guess 
)

GJK algorithm, given the initial value guess.

Definition at line 82 of file gjk-inl.h.

◆ getGuessFromSimplex()

template<typename S >
Vector3< S > fcl::detail::GJK< S >::getGuessFromSimplex

get the guess from current simplex

Definition at line 75 of file gjk-inl.h.

◆ getSimplex()

template<typename S >
GJK< S >::Simplex * fcl::detail::GJK< S >::getSimplex

get the underlying simplex using in GJK, can be used for cache in next iteration

Definition at line 302 of file gjk-inl.h.

◆ getSupport() [1/2]

template<typename S >
void fcl::detail::GJK< S >::getSupport ( const Vector3< S > &  d,
const Vector3< S > &  v,
SimplexV sv 
) const

apply the support function along a direction, the result is return is sv, here shape0 is translating at velocity v

Definition at line 212 of file gjk-inl.h.

◆ getSupport() [2/2]

template<typename S >
void fcl::detail::GJK< S >::getSupport ( const Vector3< S > &  d,
SimplexV sv 
) const

apply the support function along a direction, the result is return in sv

Definition at line 204 of file gjk-inl.h.

◆ initialize()

template<typename S >
void fcl::detail::GJK< S >::initialize

Definition at line 63 of file gjk-inl.h.

◆ removeVertex()

template<typename S >
void fcl::detail::GJK< S >::removeVertex ( Simplex simplex)

discard one vertex from the simplex

Definition at line 220 of file gjk-inl.h.

Member Data Documentation

◆ current

template<typename S >
size_t fcl::detail::GJK< S >::current
private

Definition at line 113 of file gjk.h.

◆ distance

template<typename S >
S fcl::detail::GJK< S >::distance

Definition at line 78 of file gjk.h.

◆ free_v

template<typename S >
SimplexV* fcl::detail::GJK< S >::free_v[4]
private

Definition at line 111 of file gjk.h.

◆ max_iterations

template<typename S >
unsigned int fcl::detail::GJK< S >::max_iterations
private

Definition at line 117 of file gjk.h.

◆ nfree

template<typename S >
size_t fcl::detail::GJK< S >::nfree
private

Definition at line 112 of file gjk.h.

◆ ray

template<typename S >
Vector3<S> fcl::detail::GJK< S >::ray

Definition at line 77 of file gjk.h.

◆ shape

template<typename S >
MinkowskiDiff<S> fcl::detail::GJK< S >::shape

Definition at line 76 of file gjk.h.

◆ simplex

template<typename S >
Simplex* fcl::detail::GJK< S >::simplex
private

Definition at line 114 of file gjk.h.

◆ simplices

template<typename S >
Simplex fcl::detail::GJK< S >::simplices[2]

Definition at line 79 of file gjk.h.

◆ status

template<typename S >
Status fcl::detail::GJK< S >::status
private

Definition at line 115 of file gjk.h.

◆ store_v

template<typename S >
SimplexV fcl::detail::GJK< S >::store_v[4]
private

Definition at line 110 of file gjk.h.

◆ tolerance

template<typename S >
S fcl::detail::GJK< S >::tolerance
private

Definition at line 118 of file gjk.h.


The documentation for this struct was generated from the following files:


fcl
Author(s):
autogenerated on Fri Apr 2 2021 02:38:02