iMSTK
Interactive Medical Simulation Toolkit
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
imstk::EdgeEdgeCCDState Class Reference

#include <imstkEdgeEdgeCCDState.h>

Public Member Functions

 EdgeEdgeCCDState (const Vec3d &i0, const Vec3d &i1, const Vec3d &j0, const Vec3d &j1)
 
const double si () const
 Parameterized position of closest point on segment xi–xi1 to segment xj–xj1.
 
const double sj () const
 Parameterized position of closest point on segment xj–xj1 to segment xi–xi1.
 
const Vec3d & pi () const
 Pi is the closest point on segment xi–xi1 to segment xj–xj1.
 
const Vec3d & pj () const
 Pj is the closest point on segment xj–xj1 to segment xi–xi1.
 
Vec3d computeWBar ()
 
Vec3d computeWBar2 () const
 
Vec3d computePi () const
 Pi and Pj are closest points on segments xi–xi1 and xj–xj1 respectively.
 
Vec3d computePj () const
 Pi and Pj are closest points on segments xi–xi1 and xj–xj1 respectively.
 
void setThickness (double thickness)
 
double thickness () const
 
void setTolerance (double eps)
 

Static Public Member Functions

static int testCollision (const EdgeEdgeCCDState &prev, EdgeEdgeCCDState &curr, double &relativeTimeOfImpact)
 Performs a collision test based on two given timesteps that store the state of two lines each. More...
 

Public Attributes

const Vec3d & xi
 
const Vec3d & xi1
 
const Vec3d & xj
 
const Vec3d & xj1
 
const Vec3d ei
 Vectors that represent the edges / line-segments. More...
 
const Vec3d ej
 vector defining segment j (xj1 - xj)
 
const Vec3d w0
 vector from first point on segement i to first point on segment j (xj - xi)
 
const Vec3d w
 Shortest distance vector between the infinite lines defined by the two segments.
 

Detailed Description

Implements CCD based method described in: Qi, Di, et al. "Virtual interactive suturing for the Fundamentals of Laparoscopic Surgery (FLS)." Journal of biomedical informatics 75 (2017) : 48 - 62. https://doi.org/10.1016/j.jbi.2017.09.010

Definition at line 17 of file imstkEdgeEdgeCCDState.h.

Member Function Documentation

◆ computeWBar()

Vec3d imstk::EdgeEdgeCCDState::computeWBar ( )

Computes shortest distance between the two segments assuming that the nearest point between the two lines defined by the segments is not within the boundaries of the segments at time t

Smallest vector formed by permuting between the points of the two edges (excluding the edges themselves). e.g. For edges (x1, x2) and (x3, x4) .. return the smallest vector among: (x1, x3) (x1, x4) (x2, x3), and (x2, x4).

Definition at line 23 of file imstkEdgeEdgeCCDState.cpp.

Here is the caller graph for this function:

◆ computeWBar2()

Vec3d imstk::EdgeEdgeCCDState::computeWBar2 ( ) const

Computes shortest distance between the two segments assuming that the nearest point between the two lines defined by the segments is not within the boundaries of the segments at time t+1

Definition at line 65 of file imstkEdgeEdgeCCDState.cpp.

Here is the caller graph for this function:

◆ testCollision()

int imstk::EdgeEdgeCCDState::testCollision ( const EdgeEdgeCCDState prev,
EdgeEdgeCCDState curr,
double &  relativeTimeOfImpact 
)
static

Performs a collision test based on two given timesteps that store the state of two lines each.

Parameters
prevState of the two lines in a previous timestep
currState of the two lines in current timestep
relativeTimeOfImpactEstimated time of impact in the interval [0, 1] where 0 is prev time and 1 is current time.
Returns
Type of collision: 0 - no collision, 1 - lines overlap within tolerance, 2 - vertex overlap within tolerance, 3 - lines cross each other.

Definition at line 75 of file imstkEdgeEdgeCCDState.cpp.

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

Member Data Documentation

◆ ei

const Vec3d imstk::EdgeEdgeCCDState::ei

Vectors that represent the edges / line-segments.

vector defining segment i (xi1 - xi)

Definition at line 39 of file imstkEdgeEdgeCCDState.h.

◆ xi

const Vec3d& imstk::EdgeEdgeCCDState::xi

Points that belong to the two input line-segments. const references are maintained to avoid unnecessary copy operations.

Definition at line 36 of file imstkEdgeEdgeCCDState.h.


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