2 #ifndef vgl_homg_operators_3d_h_ 3 #define vgl_homg_operators_3d_h_ 20 # include <vcl_msvc_warnings.h> 22 #include <vnl/vnl_fwd.h> 55 if (d <= 0)
return false;
73 #if 0 // not yet implemented 91 #if 0 // not yet implemented 158 template <
class Type>
163 template <
class Type>
168 template <
class Type>
173 template <
class Type>
177 #define VGL_HOMG_OPERATORS_3D_INSTANTIATE(T) \ 178 "Please #include <vgl/algo/vgl_homg_operators_3d.hxx>" 180 #endif // vgl_homg_operators_3d_h_ 3D homogeneous operations.
static double perp_dist_squared(const vgl_homg_point_3d< Type > &point, const vgl_homg_plane_3d< Type > &plane)
Get the square of the perpendicular distance to a plane.
static vgl_homg_point_3d< Type > intersect_line_and_plane(const vgl_homg_line_3d &, const vgl_homg_plane_3d< Type > &)
Return the intersection point of the line and plane.
static vgl_homg_point_3d< Type > intersection(const vgl_homg_plane_3d< Type > &, const vgl_homg_plane_3d< Type > &, const vgl_homg_plane_3d< Type > &)
Compute best-fit intersection of planes in a point.
Represents a homogeneous 2D line.
static vgl_homg_point_3d< Type > planes_to_point(const std::vector< vgl_homg_plane_3d< Type > > &planes)
Intersect a set of 3D planes to find the least-square point of intersection.
Represents a homogeneous 3D plane.
static bool is_within_distance(const vgl_homg_point_3d< Type > &p1, const vgl_homg_point_3d< Type > &p2, double d)
True if the points are closer than Euclidean distance d.
static double cross_ratio(const vgl_homg_point_3d< Type > &p1, const vgl_homg_point_3d< Type > &p2, const vgl_homg_point_3d< Type > &p3, const vgl_homg_point_3d< Type > &p4)
Calculates the cross ratio of four collinear points p1, p2, p3 and p4.
static Type plane_plane_angle(const vgl_homg_plane_3d< Type > &plane1, const vgl_homg_plane_3d< Type > &plane2)
Dihedral angle (of intersection) of 2 planes.
Represents a homogeneous 3D point.
static vnl_vector_fixed< Type, 4 > most_orthogonal_vector_svd(const std::vector< vgl_homg_plane_3d< Type > > &planes)
compute most orthogonal vector with SVD.
static vgl_homg_point_3d< Type > midpoint(const vgl_homg_point_3d< Type > &p1, const vgl_homg_point_3d< Type > &p2)
Return the midpoint of the line joining two homogeneous points.
static double perp_dist_squared(const vgl_homg_point_3d< Type > &point, const vgl_homg_line_3d &line)
static Type distance_squared(const vgl_homg_point_3d< Type > &point1, const vgl_homg_point_3d< Type > &point2)
Return the squared distance between the points.
static vgl_homg_point_3d< Type > conjugate(const vgl_homg_point_3d< Type > &a, const vgl_homg_point_3d< Type > &b, const vgl_homg_point_3d< Type > &c, double cr=-1.0)
Conjugate point of three given collinear points.
static vgl_homg_line_3d planes_to_line(const vgl_homg_plane_3d< Type > &plane1, const vgl_homg_plane_3d< Type > &plane2)
Return the intersection line of the planes.
static double angle_between_oriented_lines(const vgl_homg_line_3d &line1, const vgl_homg_line_3d &line2)
Return the angle between the (oriented) lines (in radians).
vgl_homg_line_3d_2_points< Type > vgl_homg_line_3d
vgl_homg_point_1d< T > operator *(vnl_matrix_fixed< T, 2, 2 > const &m, vgl_homg_point_1d< T > const &p)
Transform a point through a 2x2 projective transformation matrix.
static void unitize(vgl_homg_point_3d< Type > &a)
Normalize vgl_homg_point_3d<Type> to unit magnitude.
static vgl_homg_point_3d< Type > perp_projection(const vgl_homg_line_3d &line, const vgl_homg_point_3d< Type > &point)
Compute the perpendicular projection point of p onto l.
static vgl_homg_line_3d perp_line_through_point(const vgl_homg_line_3d &line, const vgl_homg_point_3d< Type > &point)
Return the line which is perpendicular to l and passes through p.
static Type distance(const vgl_homg_point_3d< Type > &point1, const vgl_homg_point_3d< Type > &point2)
Return the Euclidean distance between the points.
static vnl_vector_fixed< Type, 4 > get_vector(vgl_homg_point_3d< Type > const &p)
Get a vnl_vector_fixed representation of a homogeneous object.
static double perp_dist_squared(const vgl_homg_plane_3d< Type > &plane, const vgl_homg_point_3d< Type > &point)
Represents a homogeneous 3D line using two points.