PeriDyno 1.0.0
Loading...
Searching...
No Matches
dyno::AdditiveCCD< T > Class Template Reference

#include <AdditiveCCD.h>

Public Member Functions

DYN_FUNC AdditiveCCD (T xi_, T s_, T tc_)
 
DYN_FUNC AdditiveCCD ()=default
 
DYN_FUNC bool VertexFaceCCD (const Vector< T, 3 > &x0, const Vector< T, 3 > &x1, const Vector< T, 3 > &x2, const Vector< T, 3 > &x3, const Vector< T, 3 > &y0, const Vector< T, 3 > &y1, const Vector< T, 3 > &y2, const Vector< T, 3 > &y3, T &time, T invL)
 Do a continuous collision detection between a vertex and a triangle.
 
DYN_FUNC bool EdgeEdgeCCD (const Vector< T, 3 > &x0, const Vector< T, 3 > &x1, const Vector< T, 3 > &x2, const Vector< T, 3 > &x3, const Vector< T, 3 > &y0, const Vector< T, 3 > &y1, const Vector< T, 3 > &y2, const Vector< T, 3 > &y3, T &time, T invL)
 Do a continuous collision detection between two edges.
 
DYN_FUNC bool TriangleCCD (TTriangle3D< Real > &s0, TTriangle3D< Real > &s1, TTriangle3D< Real > &t0, TTriangle3D< Real > &t1, Real &toi)
 Do a continuous collision detection between two triangles.
 
DYN_FUNC void projectClosePoint (const TTriangle3D< Real > &s, const TTriangle3D< Real > &t, Vector< T, 3 > &first, Vector< T, 3 > &second)
 find the close point between two triangles, store their barycentric coordinates ordered as vertex.
 

Private Member Functions

DYN_FUNC Vector< T, 3 > DistanceEE (const Vector< T, 3 > &x0, const Vector< T, 3 > &x1, const Vector< T, 3 > &y0, const Vector< T, 3 > &y1, T *para)
 
DYN_FUNC T DistanceVF (const Vector< T, 3 > &x, const Vector< T, 3 > &y0, const Vector< T, 3 > &y1, const Vector< T, 3 > &y2)
 
DYN_FUNC Vector< T, 3 > DistanceVF_v (const Vector< T, 3 > &x, const Vector< T, 3 > &y0, const Vector< T, 3 > &y1, const Vector< T, 3 > &y2, T *para)
 
DYN_FUNC T SquareDistanceVF (const Vector< T, 3 > &x0, const Vector< T, 3 > &x1, const Vector< T, 3 > &x2, const Vector< T, 3 > &x3)
 
DYN_FUNC T SquareDistanceEE (const Vector< T, 3 > &x0, const Vector< T, 3 > &x1, const Vector< T, 3 > &x2, const Vector< T, 3 > &x3)
 

Private Attributes

T s = 0.2
 
T xi = 0.0
 
T tc = 0.95
 

Detailed Description

template<typename T>
class dyno::AdditiveCCD< T >

Definition at line 34 of file AdditiveCCD.h.

Constructor & Destructor Documentation

◆ AdditiveCCD() [1/2]

template<typename T>
DYN_FUNC dyno::AdditiveCCD< T >::AdditiveCCD ( T xi_,
T s_,
T tc_ )
inline

Definition at line 38 of file AdditiveCCD.h.

◆ AdditiveCCD() [2/2]

template<typename T>
DYN_FUNC dyno::AdditiveCCD< T >::AdditiveCCD ( )
default

Member Function Documentation

◆ DistanceEE()

template<typename T>
DYN_FUNC Vector< T, 3 > dyno::AdditiveCCD< T >::DistanceEE ( const Vector< T, 3 > & x0,
const Vector< T, 3 > & x1,
const Vector< T, 3 > & y0,
const Vector< T, 3 > & y1,
T * para )
inlineprivate

Definition at line 250 of file AdditiveCCD.inl.

Here is the caller graph for this function:

◆ DistanceVF()

template<typename T>
DYN_FUNC T dyno::AdditiveCCD< T >::DistanceVF ( const Vector< T, 3 > & x,
const Vector< T, 3 > & y0,
const Vector< T, 3 > & y1,
const Vector< T, 3 > & y2 )
inlineprivate

Definition at line 47 of file AdditiveCCD.inl.

Here is the call graph for this function:

◆ DistanceVF_v()

template<typename T>
DYN_FUNC Vector< T, 3 > dyno::AdditiveCCD< T >::DistanceVF_v ( const Vector< T, 3 > & x,
const Vector< T, 3 > & y0,
const Vector< T, 3 > & y1,
const Vector< T, 3 > & y2,
T * para )
inlineprivate

Definition at line 72 of file AdditiveCCD.inl.

Here is the caller graph for this function:

◆ EdgeEdgeCCD()

template<typename T>
DYN_FUNC bool dyno::AdditiveCCD< T >::EdgeEdgeCCD ( const Vector< T, 3 > & x0,
const Vector< T, 3 > & x1,
const Vector< T, 3 > & x2,
const Vector< T, 3 > & x3,
const Vector< T, 3 > & y0,
const Vector< T, 3 > & y1,
const Vector< T, 3 > & y2,
const Vector< T, 3 > & y3,
T & time,
T invL )
inline

Do a continuous collision detection between two edges.

Template Parameters
T
Parameters
[x0,x1]first edge at t0
[y0,y1]first edge at t1
[x2,x3]second edge at t0
[y2,y3]second edge at t1
timetime of impact, initialize its value to 1 if EdgeEdgeCCD was for the first time called
Returns
return ture if collision detected, otherwise return false

Definition at line 526 of file AdditiveCCD.inl.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ projectClosePoint()

template<typename T>
DYN_FUNC void dyno::AdditiveCCD< T >::projectClosePoint ( const TTriangle3D< Real > & s,
const TTriangle3D< Real > & t,
Vector< T, 3 > & first,
Vector< T, 3 > & second )
inline

find the close point between two triangles, store their barycentric coordinates ordered as vertex.

Template Parameters
T
Parameters
sfirst triangle
tsecond triangle

Definition at line 689 of file AdditiveCCD.inl.

Here is the call graph for this function:

◆ SquareDistanceEE()

template<typename T>
DYN_FUNC T dyno::AdditiveCCD< T >::SquareDistanceEE ( const Vector< T, 3 > & x0,
const Vector< T, 3 > & x1,
const Vector< T, 3 > & x2,
const Vector< T, 3 > & x3 )
private

Definition at line 446 of file AdditiveCCD.inl.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SquareDistanceVF()

template<typename T>
DYN_FUNC T dyno::AdditiveCCD< T >::SquareDistanceVF ( const Vector< T, 3 > & x0,
const Vector< T, 3 > & x1,
const Vector< T, 3 > & x2,
const Vector< T, 3 > & x3 )
private

Definition at line 457 of file AdditiveCCD.inl.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TriangleCCD()

template<typename T>
DYN_FUNC bool dyno::AdditiveCCD< T >::TriangleCCD ( TTriangle3D< Real > & s0,
TTriangle3D< Real > & s1,
TTriangle3D< Real > & t0,
TTriangle3D< Real > & t1,
Real & toi )
inline

Do a continuous collision detection between two triangles.

Template Parameters
T
Parameters
s0first triangle at t0
s1first triangle at t1
t0second triangle at t0
t1second triangle at t1
timetime of impact, initialize its value to 1 if TriangleCCD was for the first time called
Returns
return ture if collision detected, otherwise return false

Definition at line 601 of file AdditiveCCD.inl.

Here is the call graph for this function:

◆ VertexFaceCCD()

template<typename T>
DYN_FUNC bool dyno::AdditiveCCD< T >::VertexFaceCCD ( const Vector< T, 3 > & x0,
const Vector< T, 3 > & x1,
const Vector< T, 3 > & x2,
const Vector< T, 3 > & x3,
const Vector< T, 3 > & y0,
const Vector< T, 3 > & y1,
const Vector< T, 3 > & y2,
const Vector< T, 3 > & y3,
T & time,
T invL )
inline

Do a continuous collision detection between a vertex and a triangle.

Parameters
x3The vertex position at t0
y3The vertex position at t1
[x0,x1,x2]The triangle at t0
[y0,y1,y2]The triangle at t1
timethe time of impact, initialize its value to 1 if VertexFaceCCD was for the first time called
Returns
return ture if collision detected, otherwise return false

Definition at line 469 of file AdditiveCCD.inl.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ s

template<typename T>
T dyno::AdditiveCCD< T >::s = 0.2
private

Definition at line 136 of file AdditiveCCD.h.

◆ tc

template<typename T>
T dyno::AdditiveCCD< T >::tc = 0.95
private

Definition at line 138 of file AdditiveCCD.h.

◆ xi

template<typename T>
T dyno::AdditiveCCD< T >::xi = 0.0
private

Definition at line 137 of file AdditiveCCD.h.


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