#include "imesh_intersect.h"#include <vcl_limits.h>#include <vcl_cassert.h>#include <vgl/vgl_triangle_3d.h>#include <vgl/vgl_distance.h>Go to the source code of this file.
Functions | |
| bool | imesh_intersect_triangle (const vgl_point_3d< double > &p, const vgl_vector_3d< double > &d, const vgl_point_3d< double > &a, const vgl_point_3d< double > &b, const vgl_point_3d< double > &c, double &dist, double &u, double &v) |
| Intersect the ray from point p with direction d and the triangle defined by a,b,c. | |
| bool | imesh_intersect_triangle (const vgl_point_3d< double > &p, const vgl_vector_3d< double > &d, const vgl_point_3d< double > &a, const vgl_point_3d< double > &b, const vgl_point_3d< double > &c, const vgl_vector_3d< double > &n, double &dist, double &u, double &v) |
| Intersect the ray from point p with direction d and the triangle defined by a,b,c. | |
| bool | imesh_intersect_triangle_min_dist (const vgl_point_3d< double > &p, const vgl_vector_3d< double > &d, const vgl_point_3d< double > &a, const vgl_point_3d< double > &b, const vgl_point_3d< double > &c, const vgl_vector_3d< double > &n, double &dist, double &u, double &v) |
| Intersect the ray from point p with direction d and the triangle defined by a,b,c. | |
| int | imesh_intersect_min_dist (const vgl_point_3d< double > &p, const vgl_vector_3d< double > &d, const imesh_mesh &mesh, double &dist, double *u, double *v) |
| Intersect the ray from point p with direction d and the triangulated mesh. | |
| unsigned char | imesh_triangle_closest_point (const vgl_point_3d< double > &p, const vgl_point_3d< double > &a, const vgl_point_3d< double > &b, const vgl_point_3d< double > &c, const vgl_vector_3d< double > &n, double &dist, double &u, double &v) |
| Find the closest point on the triangle a,b,c to point p. | |
| unsigned char | imesh_triangle_closest_point (const vgl_point_3d< double > &p, const vgl_point_3d< double > &a, const vgl_point_3d< double > &b, const vgl_point_3d< double > &c, double &dist, double &u, double &v) |
| Find the closest point on the triangle a,b,c to point p. | |
| vgl_point_3d< double > | imesh_triangle_closest_point (const vgl_point_3d< double > &p, const vgl_point_3d< double > &a, const vgl_point_3d< double > &b, const vgl_point_3d< double > &c, double &dist) |
| Find the closest point on the triangle a,b,c to point p. | |
| int | imesh_closest_point (const vgl_point_3d< double > &p, const imesh_mesh &mesh, vgl_point_3d< double > &cp, double *u, double *v) |
| Find the closest point on the triangulated mesh to point p. | |
| unsigned char | imesh_triangle_intersect (const vgl_point_2d< double > &p, const vgl_vector_2d< double > &d, const vgl_point_2d< double > &a, const vgl_point_2d< double > &b, const vgl_point_2d< double > &c, double &u, double &v) |
| Find the closest intersection point from p along d with triangle a,b,c. | |
| unsigned char | imesh_triangle_intersect (double &u, double &v, const double &du, const double &dv, const double &eps) |
| Find the closest intersection point in barycentric coordinates along the vector (du,dv) in barycentric coordinates. | |
Definition in file imesh_intersect.cxx.
| int imesh_closest_point | ( | const vgl_point_3d< double > & | p, |
| const imesh_mesh & | mesh, | ||
| vgl_point_3d< double > & | cp, | ||
| double * | u, | ||
| double * | v | ||
| ) |
Find the closest point on the triangulated mesh to point p.
| cp | is the closest point on the mesh (returned by reference) |
| u | and |
| v | (optional) are the barycentric coordinates of the closest point |
Definition at line 317 of file imesh_intersect.cxx.
| int imesh_intersect_min_dist | ( | const vgl_point_3d< double > & | p, |
| const vgl_vector_3d< double > & | d, | ||
| const imesh_mesh & | mesh, | ||
| double & | dist, | ||
| double * | u, | ||
| double * | v | ||
| ) |
Intersect the ray from point p with direction d and the triangulated mesh.
| dist | is the distance to the triangle (returned by reference) |
| u | and |
| v | (optional) are the barycentric coordinates of the intersection |
Definition at line 136 of file imesh_intersect.cxx.
| bool imesh_intersect_triangle | ( | const vgl_point_3d< double > & | p, |
| const vgl_vector_3d< double > & | d, | ||
| const vgl_point_3d< double > & | a, | ||
| const vgl_point_3d< double > & | b, | ||
| const vgl_point_3d< double > & | c, | ||
| double & | dist, | ||
| double & | u, | ||
| double & | v | ||
| ) |
Intersect the ray from point p with direction d and the triangle defined by a,b,c.
| dist | is the distance to the triangle (returned by reference) |
| u | and |
| v | are the barycentric coordinates of the intersection |
Definition at line 39 of file imesh_intersect.cxx.
| bool imesh_intersect_triangle | ( | const vgl_point_3d< double > & | p, |
| const vgl_vector_3d< double > & | d, | ||
| const vgl_point_3d< double > & | a, | ||
| const vgl_point_3d< double > & | b, | ||
| const vgl_point_3d< double > & | c, | ||
| const vgl_vector_3d< double > & | n, | ||
| double & | dist, | ||
| double & | u, | ||
| double & | v | ||
| ) |
Intersect the ray from point p with direction d and the triangle defined by a,b,c.
The un-normalized normal vector (b-a)x(c-a) is precomputed and also passed in
| dist | is the distance to the triangle (returned by reference) |
| u | and |
| v | are the barycentric coordinates of the intersection |
Definition at line 57 of file imesh_intersect.cxx.
| bool imesh_intersect_triangle_min_dist | ( | const vgl_point_3d< double > & | p, |
| const vgl_vector_3d< double > & | d, | ||
| const vgl_point_3d< double > & | a, | ||
| const vgl_point_3d< double > & | b, | ||
| const vgl_point_3d< double > & | c, | ||
| const vgl_vector_3d< double > & | n, | ||
| double & | dist, | ||
| double & | u, | ||
| double & | v | ||
| ) |
Intersect the ray from point p with direction d and the triangle defined by a,b,c.
The un-normalized normal vector (b-a)x(c-a) is precomputed and also passed in
| dist | is the distance to the triangle (returned by reference) |
| u | and |
| v | are the barycentric coordinates of the intersection |
Definition at line 97 of file imesh_intersect.cxx.
| unsigned char imesh_triangle_closest_point | ( | const vgl_point_3d< double > & | p, |
| const vgl_point_3d< double > & | a, | ||
| const vgl_point_3d< double > & | b, | ||
| const vgl_point_3d< double > & | c, | ||
| const vgl_vector_3d< double > & | n, | ||
| double & | dist, | ||
| double & | u, | ||
| double & | v | ||
| ) |
Find the closest point on the triangle a,b,c to point p.
The un-normalized normal vector (b-a)x(c-a) is precomputed and also passed in
| dist | is the distance to the triangle (returned by reference) |
| u | and |
| v | are the barycentric coordinates of the closest point |
Definition at line 185 of file imesh_intersect.cxx.
| unsigned char imesh_triangle_closest_point | ( | const vgl_point_3d< double > & | p, |
| const vgl_point_3d< double > & | a, | ||
| const vgl_point_3d< double > & | b, | ||
| const vgl_point_3d< double > & | c, | ||
| double & | dist, | ||
| double & | u, | ||
| double & | v | ||
| ) |
Find the closest point on the triangle a,b,c to point p.
| dist | is the distance to the triangle (returned by reference) |
| u | and |
| v | are the barycentric coordinates of the closest point |
Definition at line 284 of file imesh_intersect.cxx.
| vgl_point_3d<double> imesh_triangle_closest_point | ( | const vgl_point_3d< double > & | p, |
| const vgl_point_3d< double > & | a, | ||
| const vgl_point_3d< double > & | b, | ||
| const vgl_point_3d< double > & | c, | ||
| double & | dist | ||
| ) |
Find the closest point on the triangle a,b,c to point p.
| dist | is the distance to the triangle (returned by reference) |
Definition at line 299 of file imesh_intersect.cxx.
| unsigned char imesh_triangle_intersect | ( | const vgl_point_2d< double > & | p, |
| const vgl_vector_2d< double > & | d, | ||
| const vgl_point_2d< double > & | a, | ||
| const vgl_point_2d< double > & | b, | ||
| const vgl_point_2d< double > & | c, | ||
| double & | u, | ||
| double & | v | ||
| ) |
Find the closest intersection point from p along d with triangle a,b,c.
| u | and |
| v | are the barycentric coordinates of the intersection |
Definition at line 362 of file imesh_intersect.cxx.
| unsigned char imesh_triangle_intersect | ( | double & | u, |
| double & | v, | ||
| const double & | du, | ||
| const double & | dv, | ||
| const double & | eps | ||
| ) |
Find the closest intersection point in barycentric coordinates along the vector (du,dv) in barycentric coordinates.
Find the closest intersection point along the vector (du,dv).
| u | and |
| v | are updated to the coordinates of the intersection |
Definition at line 396 of file imesh_intersect.cxx.
1.7.5.1