15 const Eigen::Vector2d &a,
16 const Eigen::Vector2d &b,
17 const Eigen::Vector2d &c);
25 const Eigen::Vector3d &a,
26 const Eigen::Vector3d &b,
27 const Eigen::Vector3d &c);
41 const Eigen::Vector3d &a,
42 const Eigen::Vector3d &b,
43 const Eigen::Vector3d &c,
44 const Eigen::Vector3d &d);
85 void tetrahedron_volume_gradient(
double ax,
double ay,
double az,
double bx,
double by,
double bz,
double cx,
double cy,
double cz,
double dx,
double dy,
double dz,
double g[12]);
101 void tetrahedron_volume_hessian(
double ax,
double ay,
double az,
double bx,
double by,
double bz,
double cx,
double cy,
double cz,
double dx,
double dy,
double dz,
double H[144]);
111 std::vector<Eigen::MatrixXd>
triangle_fan(
const Eigen::MatrixXd &convex_polygon);
118 const Eigen::VectorXd &p,
119 const Eigen::MatrixXd &
V);
129 const Eigen::Vector2d &t0,
130 const Eigen::Vector2d &t1,
131 const Eigen::Vector2d &t2,
132 const Eigen::Vector2d ¢er,
133 const double radius);
144 const Eigen::Vector3d &t0,
145 const Eigen::Vector3d &t1,
146 const Eigen::Vector3d &t2,
147 const Eigen::Vector3d &t3,
148 const Eigen::Vector3d ¢er,
149 const double radius);
163 const double tol = 1e-10);
175 const Eigen::Vector3d &t00,
176 const Eigen::Vector3d &t01,
177 const Eigen::Vector3d &t02,
178 const Eigen::Vector3d &t10,
179 const Eigen::Vector3d &t11,
180 const Eigen::Vector3d &t12,
181 const double tol = 1e-10);
bool tetrahedron_intersects_ball(const Eigen::Vector3d &t0, const Eigen::Vector3d &t1, const Eigen::Vector3d &t2, const Eigen::Vector3d &t3, const Eigen::Vector3d ¢er, const double radius)
Determine if a 3D tetrahedron intersects a 3D ball.
bool are_aabbs_intersecting(const VectorNd &aabb0_min, const VectorNd &aabb0_max, const VectorNd &aabb1_min, const VectorNd &aabb1_max)
Determine if two axis-aligned bounding boxes intersect.
void triangle_area_2D_hessian(double ax, double ay, double bx, double by, double cx, double cy, double H[36])
Compute the Hessian of the signed area of a 2D triangle defined by three points.
void tetrahedron_volume_gradient(double ax, double ay, double az, double bx, double by, double bz, double cx, double cy, double cz, double dx, double dy, double dz, double g[12])
Compute the gradient of the signed volume of a tetrahedron defined by four points.
void tetrahedron_volume_hessian(double ax, double ay, double az, double bx, double by, double bz, double cx, double cy, double cz, double dx, double dy, double dz, double H[144])
Compute the gradient of the signed area of a 2D triangle defined by three points.
double tetrahedron_volume(const Eigen::Vector3d &a, const Eigen::Vector3d &b, const Eigen::Vector3d &c, const Eigen::Vector3d &d)
Compute the signed volume of a tetrahedron defined by four points.
void triangle_area_2D_gradient(double ax, double ay, double bx, double by, double cx, double cy, double g[6])
Compute the gradient of the signed area of a 2D triangle defined by three points.
bool are_edges_collinear(const VectorNd &ea0, const VectorNd &ea1, const VectorNd &eb0, const VectorNd &eb1, const double tol)
Determine if two edges are collinear.
double triangle_area_3D(const Eigen::Vector3d &a, const Eigen::Vector3d &b, const Eigen::Vector3d &c)
Compute the area of a 3D triangle defined by three points.
Eigen::MatrixXd triangle_to_clockwise_order(const Eigen::MatrixXd &triangle)
Reorder the vertices of a triangle so they are in clockwise order.
std::vector< Eigen::MatrixXd > triangle_fan(const Eigen::MatrixXd &convex_polygon)
Convert a convex polygon to a list of triangles fanned around the first vertex.
bool are_triangles_coplanar(const Eigen::Vector3d &t00, const Eigen::Vector3d &t01, const Eigen::Vector3d &t02, const Eigen::Vector3d &t10, const Eigen::Vector3d &t11, const Eigen::Vector3d &t12, const double tol)
Determine if two triangles are coplanar.
Eigen::VectorXd barycentric_coordinates(const Eigen::VectorXd &p, const Eigen::MatrixXd &V)
Compute barycentric coordinates for point p with respect to a simplex.
double triangle_area(const Eigen::MatrixXd V)
Compute the signed area of a triangle defined by three points.
double triangle_area_2D(const Eigen::Vector2d &a, const Eigen::Vector2d &b, const Eigen::Vector2d &c)
Compute the signed area of a 2D triangle defined by three points.
bool triangle_intersects_disk(const Eigen::Vector2d &t0, const Eigen::Vector2d &t1, const Eigen::Vector2d &t2, const Eigen::Vector2d ¢er, const double radius)
Determine if a 2D triangle intersects a 2D disk.
Eigen::Matrix< double, Eigen::Dynamic, 1, 0, 3, 1 > VectorNd