Functions

OpenTissue::gjk::detail Namespace Reference

Functions

template<typename V >
bool outside_edge_face_voronoi_plane (V const &p, V const &A, V const &B, V const &C)
template<typename V >
bool outside_triangle (V const &p, V const &A, V const &B, V const &C, V const &q)
template<typename V >
bool outside_vertex_edge_voronoi_plane (V const &p, V const &A, V const &B)
template<typename V >
void reduce_edge (V const &p, Simplex< V > &S)
template<typename V >
void reduce_tetrahedron (V const &p, Simplex< V > &S)
template<typename V >
void reduce_triangle (V const &p, Simplex< V > &S)
template<typename V >
V::value_type signed_distance_to_edge_face_voronoi_plane (V const &p, V const &A, V const &B, V const &C)
template<typename V >
V::value_type signed_distance_to_triangle (V const &p, V const &A, V const &B, V const &C, V const &q)
template<typename V >
V::value_type signed_distance_to_vertex_edge_voronoi_plane (V const &p, V const &A, V const &B)

Function Documentation

template<typename V >
bool OpenTissue::gjk::detail::outside_edge_face_voronoi_plane ( V const &  p,
V const &  A,
V const &  B,
V const &  C 
) [inline]

Test if Point is outside Edge Face Voronoi Plane.

Parameters:
p A point which we want to know whether it lies outside a face voronoi region. A face-voronoi region is given by a collection of edge-face voronoi planes and the face-plane.
A The first vertex of the edge.
B The second vertex of the edge.
C The opposing vertex of the triangle containing the edge running from A to B. As such the C-vertex defines the plane with respect to which we want to test p.
Returns:
If point is outside or on the plane then the return value is true otherwise it is false.
template<typename V >
bool OpenTissue::gjk::detail::outside_triangle ( V const &  p,
V const &  A,
V const &  B,
V const &  C,
V const &  q 
) [inline]

Test if point is outside a Triangle.

Parameters:
p A point which we want to know whether it lies on the other side of the triangle that the point q.
A The first vertex of the triangle.
B The second vertex of the triangle.
C The third vertex of the triangle.
q A point that is known to lie on the back-side of the triangle
Returns:
If p is outside or on the face plane then the return value is true otherwise it is false.
template<typename V >
bool OpenTissue::gjk::detail::outside_vertex_edge_voronoi_plane ( V const &  p,
V const &  A,
V const &  B 
) [inline]

Test if point is outside a vertex edge voronoi plane. The vertex edge voronoi plane is defined such that the plane normal is given as the unit vector of the vector -B and the point is defined to lie in the plane, and the point behind the plane.

Parameters:
p The point that should be tested.
A The first vertex of the edge.
B The second vertex of the edge.
Returns:
If point is outside or on plane then return value is true otherwise it is false.
template<typename V >
void OpenTissue::gjk::detail::reduce_edge ( V const &  p,
Simplex< V > &  S 
) [inline]

Reduce Edge S. This function implements the case where a simplex is an edge. The function will compute the closest point to p on the simplex and try to reduce the simplex to the lowest dimensional face on the boundary of the simplex containing the closest point.

Parameters:
p The test point.
simplex Initially this argument holds the edge simplex. Upon return the argument holds the reduced simplex.
template<typename V >
void OpenTissue::gjk::detail::reduce_tetrahedron ( V const &  p,
Simplex< V > &  S 
) [inline]

Reduce Tetrahedron. This function implements the case where a simplex is a tetrahedron. The function will compute the closest point to p on the simplex and try to reduce the simplex to the lowest dimensional face on the boundary of the simplex containing the closest point.

Parameters:
p The test point.
S Initially this argument holds the tetrahedron simplex. Upon return the argument holds the reduced simplex.
template<typename V >
void OpenTissue::gjk::detail::reduce_triangle ( V const &  p,
Simplex< V > &  S 
) [inline]

Reduce Triangle. This function implements the case where a simplex is a triangle. The function will compute the closest point to p on the simplex and try to reduce the simplex to the lowest dimensional face on the boundary of the simplex containing the closest point.

Parameters:
p The test point.
S Initially this argument holds the triangle simplex. Upon return the argument holds the reduced simplex.
template<typename V >
V::value_type OpenTissue::gjk::detail::signed_distance_to_edge_face_voronoi_plane ( V const &  p,
V const &  A,
V const &  B,
V const &  C 
) [inline]

Signed Distance between a point and a Edge Face Voronoi Plane.

Parameters:
p A point which we want to know whether it lies outside a face voronoi region. A face-voronoi region is given by a collection of edge-face voronoi planes and the face-plane.
A The first vertex of the edge.
B The second vertex of the edge.
C The opposing vertex of the triangle containing the edge running from A to B. As such the C-vertex defines the plane with respect to which we want to test p.
Returns:
The signed distance of p to the edge-face voronoi plane.
template<typename V >
V::value_type OpenTissue::gjk::detail::signed_distance_to_triangle ( V const &  p,
V const &  A,
V const &  B,
V const &  C,
V const &  q 
) [inline]

Signed Distance between a point and a Triangle.

Parameters:
p A point which we want to know whether it lies on the other side of the triangle that the point q.
A The first vertex of the triangle.
B The second vertex of the triangle.
C The third vertex of the triangle.
q A point that is known to lie on the back-side of the triangle
Returns:
The signed distance of p to the triangle given by vertices A, B, and C. The point q is used to specify the back side half-plane of the triange.
template<typename V >
V::value_type OpenTissue::gjk::detail::signed_distance_to_vertex_edge_voronoi_plane ( V const &  p,
V const &  A,
V const &  B 
) [inline]

Signed Distance between a point and a vertex edge voronoi plane. The vertex edge voronoi plane is defined such that the plane normal is given as the unit vector of the vector -B and the point is defined to lie in the plane, and the point behind the plane.

Parameters:
p The point that should be tested.
A The first vertex of the edge.
B The second vertex of the edge.
Returns:
The signed distance of the point p.