Distance¶
Distance Type¶
- enum class ipc::PointEdgeDistanceType;¶
Closest pair between a point and edge.
Values:
- enumerator P_E0;¶
The point is closest to edge vertex zero.
- enumerator P_E1;¶
The point is closest to edge vertex one.
- enumerator P_E;¶
The point is closest to the interior of the edge.
- enumerator AUTO;¶
Automatically determine the closest pair.
- enum class ipc::EdgeEdgeDistanceType;¶
Closest pair between two edges.
Values:
- enumerator EA0_EB0;¶
The edges are closest at vertex 0 of edge A and 0 of edge B.
- enumerator EA0_EB1;¶
The edges are closest at vertex 0 of edge A and 1 of edge B.
- enumerator EA1_EB0;¶
The edges are closest at vertex 1 of edge A and 0 of edge B.
- enumerator EA1_EB1;¶
The edges are closest at vertex 1 of edge A and 1 of edge B.
- enumerator EA_EB0;¶
The edges are closest at the interior of edge A and vertex 0 of edge B.
- enumerator EA_EB1;¶
The edges are closest at the interior of edge A and vertex 1 of edge B.
- enumerator EA0_EB;¶
The edges are closest at vertex 0 of edge A and the interior of edge B.
- enumerator EA1_EB;¶
The edges are closest at vertex 1 of edge A and the interior of edge B.
- enumerator EA_EB;¶
The edges are closest at an interior point of edge A and B.
- enumerator AUTO;¶
Automatically determine the closest pair.
- enum class ipc::PointTriangleDistanceType;¶
Closest pair between a point and triangle.
Values:
- enumerator P_T0;¶
The point is closest to triangle vertex zero.
- enumerator P_T1;¶
The point is closest to triangle vertex one.
- enumerator P_T2;¶
The point is closest to triangle vertex two.
- enumerator P_E0;¶
The point is closest to triangle edge zero (vertex zero to one).
- enumerator P_E1;¶
The point is closest to triangle edge one (vertex one to two).
- enumerator P_E2;¶
The point is closest to triangle edge two (vertex two to zero).
- enumerator P_T;¶
The point is closest to the interior of the triangle.
- enumerator AUTO;¶
Automatically determine the closest pair.
-
PointEdgeDistanceType ipc::point_edge_distance_type(
Eigen::ConstRef<VectorMax3d> p, Eigen::ConstRef<VectorMax3d> e0,
Eigen::ConstRef<VectorMax3d> e1);¶ Determine the closest pair between a point and edge.
-
EdgeEdgeDistanceType ipc::edge_edge_distance_type(
Eigen::ConstRef<Eigen::Vector3d> ea0,
Eigen::ConstRef<Eigen::Vector3d> ea1,
Eigen::ConstRef<Eigen::Vector3d> eb0,
Eigen::ConstRef<Eigen::Vector3d> eb1);¶ Determine the closest pair between two edges.
-
PointTriangleDistanceType ipc::point_triangle_distance_type(
Eigen::ConstRef<Eigen::Vector3d> p,
Eigen::ConstRef<Eigen::Vector3d> t0,
Eigen::ConstRef<Eigen::Vector3d> t1,
Eigen::ConstRef<Eigen::Vector3d> t2);¶ Determine the closest pair between a point and triangle.
Edge-Edge Mollifier¶
-
double ipc::edge_edge_mollifier_threshold(
Eigen::ConstRef<Eigen::Vector3d> ea0_rest,
Eigen::ConstRef<Eigen::Vector3d> ea1_rest,
Eigen::ConstRef<Eigen::Vector3d> eb0_rest,
Eigen::ConstRef<Eigen::Vector3d> eb1_rest);¶ Compute the threshold of the mollifier edge-edge distance.
This values is computed based on the edges at rest length.
- Parameters:¶
- Eigen::ConstRef<Eigen::Vector3d> ea0_rest¶
The rest position of the first vertex of the first edge.
- Eigen::ConstRef<Eigen::Vector3d> ea1_rest¶
The rest position of the second vertex of the first edge.
- Eigen::ConstRef<Eigen::Vector3d> eb0_rest¶
The rest position of the first vertex of the second edge.
- Eigen::ConstRef<Eigen::Vector3d> eb1_rest¶
The rest position of the second vertex of the second edge.
- Returns:¶
Threshold for edge-edge mollification.
-
double ipc::edge_edge_cross_squarednorm(
Eigen::ConstRef<Eigen::Vector3d> ea0,
Eigen::ConstRef<Eigen::Vector3d> ea1,
Eigen::ConstRef<Eigen::Vector3d> eb0,
Eigen::ConstRef<Eigen::Vector3d> eb1);¶ Compute the squared norm of the edge-edge cross product.
-
Vector12d ipc::edge_edge_cross_squarednorm_gradient(
Eigen::ConstRef<Eigen::Vector3d> ea0,
Eigen::ConstRef<Eigen::Vector3d> ea1,
Eigen::ConstRef<Eigen::Vector3d> eb0,
Eigen::ConstRef<Eigen::Vector3d> eb1);¶ Compute the gradient of the squared norm of the edge cross product.
-
Matrix12d ipc::edge_edge_cross_squarednorm_hessian(
Eigen::ConstRef<Eigen::Vector3d> ea0,
Eigen::ConstRef<Eigen::Vector3d> ea1,
Eigen::ConstRef<Eigen::Vector3d> eb0,
Eigen::ConstRef<Eigen::Vector3d> eb1);¶ Compute the hessian of the squared norm of the edge cross product.
Warning
doxygenfunction: Unable to resolve function “edge_edge_mollifier” with arguments (const Eigen::Ref<const Eigen::Vector3d>&, const Eigen::Ref<const Eigen::Vector3d>&, const Eigen::Ref<const Eigen::Vector3d>&, const Eigen::Ref<const Eigen::Vector3d>&, const double) in doxygen xml output for project “IPC Toolkit” from directory: ../build/doxyoutput/xml. Potential matches:
- double edge_edge_mollifier(Eigen::ConstRef<Eigen::Vector3d> ea0, Eigen::ConstRef<Eigen::Vector3d> ea1, Eigen::ConstRef<Eigen::Vector3d> eb0, Eigen::ConstRef<Eigen::Vector3d> eb1, const double eps_x)
- double edge_edge_mollifier(const double x, const double eps_x)
- double ipc::edge_edge_mollifier(const double x, const double eps_x);¶
Mollifier function for edge-edge distance.
Warning
doxygenfunction: Unable to resolve function “edge_edge_mollifier_gradient” with arguments (const Eigen::Ref<const Eigen::Vector3d>&, const Eigen::Ref<const Eigen::Vector3d>&, const Eigen::Ref<const Eigen::Vector3d>&, const Eigen::Ref<const Eigen::Vector3d>&, const double) in doxygen xml output for project “IPC Toolkit” from directory: ../build/doxyoutput/xml. Potential matches:
- Vector12d edge_edge_mollifier_gradient(Eigen::ConstRef<Eigen::Vector3d> ea0, Eigen::ConstRef<Eigen::Vector3d> ea1, Eigen::ConstRef<Eigen::Vector3d> eb0, Eigen::ConstRef<Eigen::Vector3d> eb1, const double eps_x)
- double edge_edge_mollifier_gradient(const double x, const double eps_x)
-
double ipc::edge_edge_mollifier_gradient(
const double x, const double eps_x);¶ The gradient of the mollifier function for edge-edge distance.
Warning
doxygenfunction: Unable to resolve function “edge_edge_mollifier_hessian” with arguments (const Eigen::Ref<const Eigen::Vector3d>&, const Eigen::Ref<const Eigen::Vector3d>&, const Eigen::Ref<const Eigen::Vector3d>&, const Eigen::Ref<const Eigen::Vector3d>&, const double) in doxygen xml output for project “IPC Toolkit” from directory: ../build/doxyoutput/xml. Potential matches:
- Matrix12d edge_edge_mollifier_hessian(Eigen::ConstRef<Eigen::Vector3d> ea0, Eigen::ConstRef<Eigen::Vector3d> ea1, Eigen::ConstRef<Eigen::Vector3d> eb0, Eigen::ConstRef<Eigen::Vector3d> eb1, const double eps_x)
- double edge_edge_mollifier_hessian(const double x, const double eps_x)
-
double ipc::edge_edge_mollifier_hessian(
const double x, const double eps_x);¶ The hessian of the mollifier function for edge-edge distance.
Edge-Edge¶
-
double ipc::edge_edge_distance(Eigen::ConstRef<Eigen::Vector3d> ea0,
Eigen::ConstRef<Eigen::Vector3d> ea1,
Eigen::ConstRef<Eigen::Vector3d> eb0,
Eigen::ConstRef<Eigen::Vector3d> eb1,
EdgeEdgeDistanceType dtype = EdgeEdgeDistanceType::AUTO);¶ Compute the distance between a two lines segments in 3D.
Note
The distance is actually squared distance.
- Parameters:¶
- Eigen::ConstRef<Eigen::Vector3d> ea0¶
The first vertex of the first edge.
- Eigen::ConstRef<Eigen::Vector3d> ea1¶
The second vertex of the first edge.
- Eigen::ConstRef<Eigen::Vector3d> eb0¶
The first vertex of the second edge.
- Eigen::ConstRef<Eigen::Vector3d> eb1¶
The second vertex of the second edge.
- EdgeEdgeDistanceType dtype = EdgeEdgeDistanceType::AUTO¶
The point edge distance type to compute.
- Returns:¶
The distance between the two edges.
-
Vector12d ipc::edge_edge_distance_gradient(
Eigen::ConstRef<Eigen::Vector3d> ea0,
Eigen::ConstRef<Eigen::Vector3d> ea1,
Eigen::ConstRef<Eigen::Vector3d> eb0,
Eigen::ConstRef<Eigen::Vector3d> eb1,
EdgeEdgeDistanceType dtype = EdgeEdgeDistanceType::AUTO);¶ Compute the gradient of the distance between a two lines segments.
Note
The distance is actually squared distance.
- Parameters:¶
- Eigen::ConstRef<Eigen::Vector3d> ea0¶
The first vertex of the first edge.
- Eigen::ConstRef<Eigen::Vector3d> ea1¶
The second vertex of the first edge.
- Eigen::ConstRef<Eigen::Vector3d> eb0¶
The first vertex of the second edge.
- Eigen::ConstRef<Eigen::Vector3d> eb1¶
The second vertex of the second edge.
- EdgeEdgeDistanceType dtype = EdgeEdgeDistanceType::AUTO¶
The point edge distance type to compute.
- Returns:¶
The gradient of the distance wrt ea0, ea1, eb0, and eb1.
-
Matrix12d ipc::edge_edge_distance_hessian(
Eigen::ConstRef<Eigen::Vector3d> ea0,
Eigen::ConstRef<Eigen::Vector3d> ea1,
Eigen::ConstRef<Eigen::Vector3d> eb0,
Eigen::ConstRef<Eigen::Vector3d> eb1,
EdgeEdgeDistanceType dtype = EdgeEdgeDistanceType::AUTO);¶ Compute the hessian of the distance between a two lines segments.
Note
The distance is actually squared distance.
- Parameters:¶
- Eigen::ConstRef<Eigen::Vector3d> ea0¶
The first vertex of the first edge.
- Eigen::ConstRef<Eigen::Vector3d> ea1¶
The second vertex of the first edge.
- Eigen::ConstRef<Eigen::Vector3d> eb0¶
The first vertex of the second edge.
- Eigen::ConstRef<Eigen::Vector3d> eb1¶
The second vertex of the second edge.
- EdgeEdgeDistanceType dtype = EdgeEdgeDistanceType::AUTO¶
The point edge distance type to compute.
- Returns:¶
The hessian of the distance wrt ea0, ea1, eb0, and eb1.
Line-Line¶
-
double ipc::line_line_distance(Eigen::ConstRef<Eigen::Vector3d> ea0,
Eigen::ConstRef<Eigen::Vector3d> ea1,
Eigen::ConstRef<Eigen::Vector3d> eb0,
Eigen::ConstRef<Eigen::Vector3d> eb1);¶ Compute the distance between a two infinite lines in 3D.
Note
The distance is actually squared distance.
Warning
If the lines are parallel this function returns a distance of zero.
- Parameters:¶
- Eigen::ConstRef<Eigen::Vector3d> ea0¶
The first vertex of the edge defining the first line.
- Eigen::ConstRef<Eigen::Vector3d> ea1¶
The second vertex of the edge defining the first line.
- Eigen::ConstRef<Eigen::Vector3d> ea0¶
The first vertex of the edge defining the second line.
- Eigen::ConstRef<Eigen::Vector3d> ea1¶
The second vertex of the edge defining the second line.
- Returns:¶
The distance between the two lines.
-
Vector12d ipc::line_line_distance_gradient(
Eigen::ConstRef<Eigen::Vector3d> ea0,
Eigen::ConstRef<Eigen::Vector3d> ea1,
Eigen::ConstRef<Eigen::Vector3d> eb0,
Eigen::ConstRef<Eigen::Vector3d> eb1);¶ Compute the gradient of the distance between a two lines in 3D.
Note
The distance is actually squared distance.
Warning
If the lines are parallel this function returns a distance of zero.
- Parameters:¶
- Eigen::ConstRef<Eigen::Vector3d> ea0¶
The first vertex of the edge defining the first line.
- Eigen::ConstRef<Eigen::Vector3d> ea1¶
The second vertex of the edge defining the first line.
- Eigen::ConstRef<Eigen::Vector3d> ea0¶
The first vertex of the edge defining the second line.
- Eigen::ConstRef<Eigen::Vector3d> ea1¶
The second vertex of the edge defining the second line.
- Returns:¶
The gradient of the distance wrt ea0, ea1, eb0, and eb1.
-
Matrix12d ipc::line_line_distance_hessian(
Eigen::ConstRef<Eigen::Vector3d> ea0,
Eigen::ConstRef<Eigen::Vector3d> ea1,
Eigen::ConstRef<Eigen::Vector3d> eb0,
Eigen::ConstRef<Eigen::Vector3d> eb1);¶ Compute the hessian of the distance between a two lines in 3D.
Note
The distance is actually squared distance.
Warning
If the lines are parallel this function returns a distance of zero.
- Parameters:¶
- Eigen::ConstRef<Eigen::Vector3d> ea0¶
The first vertex of the edge defining the first line.
- Eigen::ConstRef<Eigen::Vector3d> ea1¶
The second vertex of the edge defining the first line.
- Eigen::ConstRef<Eigen::Vector3d> ea0¶
The first vertex of the edge defining the second line.
- Eigen::ConstRef<Eigen::Vector3d> ea1¶
The second vertex of the edge defining the second line.
- Returns:¶
The hessian of the distance wrt ea0, ea1, eb0, and eb1.
Point-Edge¶
-
double ipc::point_edge_distance(Eigen::ConstRef<VectorMax3d> p,
Eigen::ConstRef<VectorMax3d> e0,
Eigen::ConstRef<VectorMax3d> e1,
PointEdgeDistanceType dtype = PointEdgeDistanceType::AUTO);¶ Compute the distance between a point and edge in 2D or 3D.
Note
The distance is actually squared distance.
- Parameters:¶
- Eigen::ConstRef<VectorMax3d> p¶
The point.
- Eigen::ConstRef<VectorMax3d> e0¶
The first vertex of the edge.
- Eigen::ConstRef<VectorMax3d> e1¶
The second vertex of the edge.
- PointEdgeDistanceType dtype = PointEdgeDistanceType::AUTO¶
The point edge distance type to compute.
- Returns:¶
The distance between the point and edge.
-
VectorMax9d ipc::point_edge_distance_gradient(
Eigen::ConstRef<VectorMax3d> p, Eigen::ConstRef<VectorMax3d> e0,
Eigen::ConstRef<VectorMax3d> e1,
PointEdgeDistanceType dtype = PointEdgeDistanceType::AUTO);¶ Compute the gradient of the distance between a point and edge.
Note
The distance is actually squared distance.
- Parameters:¶
- Eigen::ConstRef<VectorMax3d> p¶
The point.
- Eigen::ConstRef<VectorMax3d> e0¶
The first vertex of the edge.
- Eigen::ConstRef<VectorMax3d> e1¶
The second vertex of the edge.
- PointEdgeDistanceType dtype = PointEdgeDistanceType::AUTO¶
The point edge distance type to compute.
- Returns:¶
grad The gradient of the distance wrt p, e0, and e1.
-
MatrixMax9d ipc::point_edge_distance_hessian(
Eigen::ConstRef<VectorMax3d> p, Eigen::ConstRef<VectorMax3d> e0,
Eigen::ConstRef<VectorMax3d> e1,
PointEdgeDistanceType dtype = PointEdgeDistanceType::AUTO);¶ Compute the hessian of the distance between a point and edge.
Note
The distance is actually squared distance.
- Parameters:¶
- Eigen::ConstRef<VectorMax3d> p¶
The point.
- Eigen::ConstRef<VectorMax3d> e0¶
The first vertex of the edge.
- Eigen::ConstRef<VectorMax3d> e1¶
The second vertex of the edge.
- PointEdgeDistanceType dtype = PointEdgeDistanceType::AUTO¶
The point edge distance type to compute.
- Returns:¶
hess The hessian of the distance wrt p, e0, and e1.
Point-Line¶
-
double ipc::point_line_distance(Eigen::ConstRef<VectorMax3d> p,
Eigen::ConstRef<VectorMax3d> e0,
Eigen::ConstRef<VectorMax3d> e1);¶ Compute the distance between a point and line in 2D or 3D.
Note
The distance is actually squared distance.
-
VectorMax9d ipc::point_line_distance_gradient(
Eigen::ConstRef<VectorMax3d> p, Eigen::ConstRef<VectorMax3d> e0,
Eigen::ConstRef<VectorMax3d> e1);¶ Compute the gradient of the distance between a point and line.
Note
The distance is actually squared distance.
-
MatrixMax9d ipc::point_line_distance_hessian(
Eigen::ConstRef<VectorMax3d> p, Eigen::ConstRef<VectorMax3d> e0,
Eigen::ConstRef<VectorMax3d> e1);¶ Compute the hessian of the distance between a point and line.
Note
The distance is actually squared distance.
Point-Plane¶
Warning
doxygenfunction: Unable to resolve function “point_plane_distance” with arguments (const Eigen::Ref<const Eigen::Vector3d>&, const Eigen::Ref<const Eigen::Vector3d>&, const Eigen::Ref<const Eigen::Vector3d>&) in doxygen xml output for project “IPC Toolkit” from directory: ../build/doxyoutput/xml. Potential matches:
- double point_plane_distance(Eigen::ConstRef<Eigen::Vector3d> p, Eigen::ConstRef<Eigen::Vector3d> origin, Eigen::ConstRef<Eigen::Vector3d> normal)
- double point_plane_distance(Eigen::ConstRef<Eigen::Vector3d> p, Eigen::ConstRef<Eigen::Vector3d> t0, Eigen::ConstRef<Eigen::Vector3d> t1, Eigen::ConstRef<Eigen::Vector3d> t2)
Warning
doxygenfunction: Unable to resolve function “point_plane_distance” with arguments (const Eigen::Ref<const Eigen::Vector3d>&, const Eigen::Ref<const Eigen::Vector3d>&, const Eigen::Ref<const Eigen::Vector3d>&, const Eigen::Ref<const Eigen::Vector3d>&) in doxygen xml output for project “IPC Toolkit” from directory: ../build/doxyoutput/xml. Potential matches:
- double point_plane_distance(Eigen::ConstRef<Eigen::Vector3d> p, Eigen::ConstRef<Eigen::Vector3d> origin, Eigen::ConstRef<Eigen::Vector3d> normal)
- double point_plane_distance(Eigen::ConstRef<Eigen::Vector3d> p, Eigen::ConstRef<Eigen::Vector3d> t0, Eigen::ConstRef<Eigen::Vector3d> t1, Eigen::ConstRef<Eigen::Vector3d> t2)
Warning
doxygenfunction: Unable to resolve function “point_plane_distance_gradient” with arguments (const Eigen::Ref<const Eigen::Vector3d>&, const Eigen::Ref<const Eigen::Vector3d>&, const Eigen::Ref<const Eigen::Vector3d>&) in doxygen xml output for project “IPC Toolkit” from directory: ../build/doxyoutput/xml. Potential matches:
- Eigen::Vector3d point_plane_distance_gradient(Eigen::ConstRef<Eigen::Vector3d> p, Eigen::ConstRef<Eigen::Vector3d> origin, Eigen::ConstRef<Eigen::Vector3d> normal)
- Vector12d point_plane_distance_gradient(Eigen::ConstRef<Eigen::Vector3d> p, Eigen::ConstRef<Eigen::Vector3d> t0, Eigen::ConstRef<Eigen::Vector3d> t1, Eigen::ConstRef<Eigen::Vector3d> t2)
- void point_plane_distance_gradient(double v01, double v02, double v03, double v11, double v12, double v13, double v21, double v22, double v23, double v31, double v32, double v33, double g[12])
Warning
doxygenfunction: Unable to resolve function “point_plane_distance_gradient” with arguments (const Eigen::Ref<const Eigen::Vector3d>&, const Eigen::Ref<const Eigen::Vector3d>&, const Eigen::Ref<const Eigen::Vector3d>&, const Eigen::Ref<const Eigen::Vector3d>&) in doxygen xml output for project “IPC Toolkit” from directory: ../build/doxyoutput/xml. Potential matches:
- Eigen::Vector3d point_plane_distance_gradient(Eigen::ConstRef<Eigen::Vector3d> p, Eigen::ConstRef<Eigen::Vector3d> origin, Eigen::ConstRef<Eigen::Vector3d> normal)
- Vector12d point_plane_distance_gradient(Eigen::ConstRef<Eigen::Vector3d> p, Eigen::ConstRef<Eigen::Vector3d> t0, Eigen::ConstRef<Eigen::Vector3d> t1, Eigen::ConstRef<Eigen::Vector3d> t2)
- void point_plane_distance_gradient(double v01, double v02, double v03, double v11, double v12, double v13, double v21, double v22, double v23, double v31, double v32, double v33, double g[12])
Warning
doxygenfunction: Unable to resolve function “point_plane_distance_hessian” with arguments (const Eigen::Ref<const Eigen::Vector3d>&, const Eigen::Ref<const Eigen::Vector3d>&, const Eigen::Ref<const Eigen::Vector3d>&) in doxygen xml output for project “IPC Toolkit” from directory: ../build/doxyoutput/xml. Potential matches:
- Eigen::Matrix3d point_plane_distance_hessian(Eigen::ConstRef<Eigen::Vector3d> p, Eigen::ConstRef<Eigen::Vector3d> origin, Eigen::ConstRef<Eigen::Vector3d> normal)
- Matrix12d point_plane_distance_hessian(Eigen::ConstRef<Eigen::Vector3d> p, Eigen::ConstRef<Eigen::Vector3d> t0, Eigen::ConstRef<Eigen::Vector3d> t1, Eigen::ConstRef<Eigen::Vector3d> t2)
- void point_plane_distance_hessian(double v01, double v02, double v03, double v11, double v12, double v13, double v21, double v22, double v23, double v31, double v32, double v33, double H[144])
Warning
doxygenfunction: Unable to resolve function “point_plane_distance_hessian” with arguments (const Eigen::Ref<const Eigen::Vector3d>&, const Eigen::Ref<const Eigen::Vector3d>&, const Eigen::Ref<const Eigen::Vector3d>&, const Eigen::Ref<const Eigen::Vector3d>&) in doxygen xml output for project “IPC Toolkit” from directory: ../build/doxyoutput/xml. Potential matches:
- Eigen::Matrix3d point_plane_distance_hessian(Eigen::ConstRef<Eigen::Vector3d> p, Eigen::ConstRef<Eigen::Vector3d> origin, Eigen::ConstRef<Eigen::Vector3d> normal)
- Matrix12d point_plane_distance_hessian(Eigen::ConstRef<Eigen::Vector3d> p, Eigen::ConstRef<Eigen::Vector3d> t0, Eigen::ConstRef<Eigen::Vector3d> t1, Eigen::ConstRef<Eigen::Vector3d> t2)
- void point_plane_distance_hessian(double v01, double v02, double v03, double v11, double v12, double v13, double v21, double v22, double v23, double v31, double v32, double v33, double H[144])
Point-Point¶
-
double ipc::point_point_distance(Eigen::ConstRef<VectorMax3d> p0,
Eigen::ConstRef<VectorMax3d> p1);¶ Compute the distance between two points.
Note
The distance is actually squared distance.
-
VectorMax6d ipc::point_point_distance_gradient(
Eigen::ConstRef<VectorMax3d> p0,
Eigen::ConstRef<VectorMax3d> p1);¶ Compute the gradient of the distance between two points.
Note
The distance is actually squared distance.
-
MatrixMax6d ipc::point_point_distance_hessian(
Eigen::ConstRef<VectorMax3d> p0,
Eigen::ConstRef<VectorMax3d> p1);¶ Compute the hessian of the distance between two points.
Note
The distance is actually squared distance.
Point-Triangle¶
-
double ipc::point_triangle_distance(
Eigen::ConstRef<Eigen::Vector3d> p,
Eigen::ConstRef<Eigen::Vector3d> t0,
Eigen::ConstRef<Eigen::Vector3d> t1,
Eigen::ConstRef<Eigen::Vector3d> t2,
PointTriangleDistanceType dtype
= PointTriangleDistanceType::AUTO);¶ Compute the distance between a points and a triangle.
Note
The distance is actually squared distance.
- Parameters:¶
- Eigen::ConstRef<Eigen::Vector3d> p¶
The point.
- Eigen::ConstRef<Eigen::Vector3d> t0¶
The first vertex of the triangle.
- Eigen::ConstRef<Eigen::Vector3d> t1¶
The second vertex of the triangle.
- Eigen::ConstRef<Eigen::Vector3d> t2¶
The third vertex of the triangle.
- PointTriangleDistanceType dtype = PointTriangleDistanceType::AUTO¶
The point-triangle distance type to compute.
- Returns:¶
The distance between the point and triangle.
-
Vector12d ipc::point_triangle_distance_gradient(
Eigen::ConstRef<Eigen::Vector3d> p,
Eigen::ConstRef<Eigen::Vector3d> t0,
Eigen::ConstRef<Eigen::Vector3d> t1,
Eigen::ConstRef<Eigen::Vector3d> t2,
PointTriangleDistanceType dtype
= PointTriangleDistanceType::AUTO);¶ Compute the gradient of the distance between a points and a triangle.
Note
The distance is actually squared distance.
- Parameters:¶
- Eigen::ConstRef<Eigen::Vector3d> p¶
The point.
- Eigen::ConstRef<Eigen::Vector3d> t0¶
The first vertex of the triangle.
- Eigen::ConstRef<Eigen::Vector3d> t1¶
The second vertex of the triangle.
- Eigen::ConstRef<Eigen::Vector3d> t2¶
The third vertex of the triangle.
- PointTriangleDistanceType dtype = PointTriangleDistanceType::AUTO¶
The point-triangle distance type to compute.
- Returns:¶
The gradient of the distance wrt p, t0, t1, and t2.
-
Matrix12d ipc::point_triangle_distance_hessian(
Eigen::ConstRef<Eigen::Vector3d> p,
Eigen::ConstRef<Eigen::Vector3d> t0,
Eigen::ConstRef<Eigen::Vector3d> t1,
Eigen::ConstRef<Eigen::Vector3d> t2,
PointTriangleDistanceType dtype
= PointTriangleDistanceType::AUTO);¶ Compute the hessian of the distance between a points and a triangle.
Note
The distance is actually squared distance.
- Parameters:¶
- Eigen::ConstRef<Eigen::Vector3d> p¶
The point.
- Eigen::ConstRef<Eigen::Vector3d> t0¶
The first vertex of the triangle.
- Eigen::ConstRef<Eigen::Vector3d> t1¶
The second vertex of the triangle.
- Eigen::ConstRef<Eigen::Vector3d> t2¶
The third vertex of the triangle.
- PointTriangleDistanceType dtype = PointTriangleDistanceType::AUTO¶
The point-triangle distance type to compute.
- Returns:¶
The hessian of the distance wrt p, t0, t1, and t2.