Public Member Functions | Static Public Member Functions | Private Member Functions
bsol_algs Class Reference

#include <bsol_algs.h>

List of all members.

Public Member Functions

 ~bsol_algs ()

Static Public Member Functions

static vbl_bounding_box
< double, 2 > 
bounding_box (vcl_vector< vsol_point_2d_sptr > const &points)
 Finds a bounding box for a set of vsol_point_2ds.
static vbl_bounding_box
< double, 2 > 
bounding_box (vcl_vector< vsol_line_2d_sptr > const &lines)
 Finds a bounding box for a set of vsol_line_2ds.
static vbl_bounding_box
< double, 3 > 
bounding_box (vcl_vector< vsol_point_3d_sptr > const &points)
 Finds a bounding box for a set of vsol_point_3ds.
static bool in (vsol_box_2d_sptr const &a, double x, double y)
 Is a point inside the box?.
static bool meet (vsol_box_2d_sptr const &a, vsol_box_2d_sptr const &b)
 do two boxes intersect?.
static bool intersection (vsol_box_2d_sptr const &a, vsol_box_2d_sptr const &b, vsol_box_2d_sptr &a_int_b)
 find the intersection of two boxes. Return false if no intersection.
static bool box_union (vsol_box_2d_sptr const &a, vsol_box_2d_sptr const &b, vsol_box_2d_sptr &a_union_b)
 find the convex union of two boxes. Return true.
static bool box_with_margin (vsol_box_2d_sptr const &b, const double margin, vsol_box_2d_sptr &bmod)
 expand/contract box by an absolute margin.
static bool hull_of_poly_set (vcl_vector< vsol_polygon_2d_sptr > const &polys, vsol_polygon_2d_sptr &hull)
 find the convex hull of a set of polygons.
static bool in (vsol_box_3d_sptr const &a, double x, double y, double z)
 Is a point inside the box?.
static vsol_polygon_2d_sptr poly_from_vgl (vgl_polygon< double > const &poly)
 construct a vsol_polygon from a vgl_polygon.
static vgl_polygon< double > vgl_from_poly (vsol_polygon_2d_sptr const &poly)
 construct a vgl_polygon from a vsol_polygon.
static vsol_polygon_2d_sptr poly_from_box (vsol_box_2d_sptr const &box)
 construct a vsol_polygon from a vsol_box.
static vsol_point_2d_sptr closest_point (vsol_point_2d_sptr const &p, vcl_vector< vsol_point_2d_sptr > const &point_set, double &d)
 find the closest point in a set.
static vsol_point_3d_sptr closest_point (vsol_point_3d_sptr const &p, vcl_vector< vsol_point_3d_sptr > const &point_set, double &d)
static bool homography (vsol_polygon_2d_sptr const &p, vgl_h_matrix_2d< double > const &H, vsol_polygon_2d_sptr &Hp)
 Transform a vsol_polygon_2d with a general homography.
static vsol_polygon_2d_sptr transform_about_point (vsol_polygon_2d_sptr const &p, vsol_point_2d_sptr const &c, vgl_h_matrix_2d< double > const &H)
 Transform a vsol_polygon_2d with a point specified as the center of the transformation.
static vsol_polygon_2d_sptr transform_about_centroid (vsol_polygon_2d_sptr const &p, vgl_h_matrix_2d< double > const &H)
 Transform a vsol_polygon_2d with the centroid as origin.
static bool homography (vsol_box_2d_sptr const &b, vgl_h_matrix_2d< double > const &H, vsol_box_2d_sptr &Hb)
 Homographically map a vsol_box_2d, returning the resulting bounding box.
static void tangent (vsol_digital_curve_2d_sptr const &dc, unsigned index, double &dx, double &dy)
 Compute the tangent to a vsol_digital_curve_2d at the specified index.
static void print (vsol_box_2d_sptr const &b)
 print method.
static void print (vsol_box_3d_sptr const &b)
 print method.
static void print (vsol_point_2d_sptr const &p)
 print method.
static void print (vsol_point_3d_sptr const &p)
 print method.

Private Member Functions

 bsol_algs ()

Detailed Description

Definition at line 27 of file bsol_algs.h.


Constructor & Destructor Documentation

bsol_algs::~bsol_algs ( )

Definition at line 27 of file bsol_algs.cxx.

bsol_algs::bsol_algs ( ) [private]

Member Function Documentation

vbl_bounding_box< double, 2 > bsol_algs::bounding_box ( vcl_vector< vsol_point_2d_sptr > const &  points) [static]

Finds a bounding box for a set of vsol_point_2ds.

Compute a bounding box for a set of vsol_point_2ds.

Definition at line 34 of file bsol_algs.cxx.

vbl_bounding_box< double, 2 > bsol_algs::bounding_box ( vcl_vector< vsol_line_2d_sptr > const &  lines) [static]

Finds a bounding box for a set of vsol_line_2ds.

Compute a bounding box for a set of vsol_line_2ds.

Definition at line 46 of file bsol_algs.cxx.

vbl_bounding_box< double, 3 > bsol_algs::bounding_box ( vcl_vector< vsol_point_3d_sptr > const &  points) [static]

Finds a bounding box for a set of vsol_point_3ds.

Compute a bounding box for a set of vsol_point_3ds.

Definition at line 63 of file bsol_algs.cxx.

bool bsol_algs::box_union ( vsol_box_2d_sptr const &  a,
vsol_box_2d_sptr const &  b,
vsol_box_2d_sptr a_union_b 
) [static]

find the convex union of two boxes. Return true.

find the convex union of two boxes. Always return true.

Definition at line 117 of file bsol_algs.cxx.

bool bsol_algs::box_with_margin ( vsol_box_2d_sptr const &  b,
const double  margin,
vsol_box_2d_sptr bmod 
) [static]

expand/contract box by an absolute margin.

expand or contract a box with the supplied absolute margin.

Definition at line 145 of file bsol_algs.cxx.

vsol_point_2d_sptr bsol_algs::closest_point ( vsol_point_2d_sptr const &  p,
vcl_vector< vsol_point_2d_sptr > const &  point_set,
double &  d 
) [static]

find the closest point in a set.

find the closest point to p in a set of points.

Definition at line 249 of file bsol_algs.cxx.

vsol_point_3d_sptr bsol_algs::closest_point ( vsol_point_3d_sptr const &  p,
vcl_vector< vsol_point_3d_sptr > const &  point_set,
double &  d 
) [static]

Definition at line 275 of file bsol_algs.cxx.

bool bsol_algs::homography ( vsol_polygon_2d_sptr const &  p,
vgl_h_matrix_2d< double > const &  H,
vsol_polygon_2d_sptr Hp 
) [static]

Transform a vsol_polygon_2d with a general homography.

Return false if any of the points are turned into ideal points since vsol geometry is assumed finite.

Definition at line 304 of file bsol_algs.cxx.

bool bsol_algs::homography ( vsol_box_2d_sptr const &  b,
vgl_h_matrix_2d< double > const &  H,
vsol_box_2d_sptr Hb 
) [static]

Homographically map a vsol_box_2d, returning the resulting bounding box.

Definition at line 361 of file bsol_algs.cxx.

bool bsol_algs::hull_of_poly_set ( vcl_vector< vsol_polygon_2d_sptr > const &  polys,
vsol_polygon_2d_sptr hull 
) [static]

find the convex hull of a set of polygons.

Compute the convex hull of a set of polygons.

Definition at line 167 of file bsol_algs.cxx.

bool bsol_algs::in ( vsol_box_2d_sptr const &  a,
double  x,
double  y 
) [static]

Is a point inside the box?.

Determine if a point is inside a bounding box.

Definition at line 74 of file bsol_algs.cxx.

bool bsol_algs::in ( vsol_box_3d_sptr const &  a,
double  x,
double  y,
double  z 
) [static]

Is a point inside the box?.

Determine if a point is inside a bounding box.

Definition at line 190 of file bsol_algs.cxx.

bool bsol_algs::intersection ( vsol_box_2d_sptr const &  a,
vsol_box_2d_sptr const &  b,
vsol_box_2d_sptr a_int_b 
) [static]

find the intersection of two boxes. Return false if no intersection.

Definition at line 96 of file bsol_algs.cxx.

bool bsol_algs::meet ( vsol_box_2d_sptr const &  a,
vsol_box_2d_sptr const &  b 
) [static]

do two boxes intersect?.

returns true if the boxes a and b intersect.

Definition at line 85 of file bsol_algs.cxx.

vsol_polygon_2d_sptr bsol_algs::poly_from_box ( vsol_box_2d_sptr const &  box) [static]

construct a vsol_polygon from a vsol_box.

Definition at line 202 of file bsol_algs.cxx.

vsol_polygon_2d_sptr bsol_algs::poly_from_vgl ( vgl_polygon< double > const &  poly) [static]

construct a vsol_polygon from a vgl_polygon.

Definition at line 215 of file bsol_algs.cxx.

void bsol_algs::print ( vsol_box_2d_sptr const &  b) [static]

print method.

Definition at line 407 of file bsol_algs.cxx.

void bsol_algs::print ( vsol_box_3d_sptr const &  b) [static]

print method.

Definition at line 414 of file bsol_algs.cxx.

void bsol_algs::print ( vsol_point_2d_sptr const &  p) [static]

print method.

Definition at line 425 of file bsol_algs.cxx.

void bsol_algs::print ( vsol_point_3d_sptr const &  p) [static]

print method.

Definition at line 432 of file bsol_algs.cxx.

void bsol_algs::tangent ( vsol_digital_curve_2d_sptr const &  dc,
unsigned  index,
double &  dx,
double &  dy 
) [static]

Compute the tangent to a vsol_digital_curve_2d at the specified index.

Definition at line 373 of file bsol_algs.cxx.

vsol_polygon_2d_sptr bsol_algs::transform_about_centroid ( vsol_polygon_2d_sptr const &  p,
vgl_h_matrix_2d< double > const &  H 
) [static]

Transform a vsol_polygon_2d with the centroid as origin.

Transform a vsol_polygon_2d with a homography.

Apply the transform with the centroid of the polygon as the origin and then translate by the centroid location vector

Definition at line 354 of file bsol_algs.cxx.

The transformation is then applied and the point coordinates added back in afterwards *vsol_polygon_2d_sptr bsol_algs::transform_about_point ( vsol_polygon_2d_sptr const &  p,
vsol_point_2d_sptr const &  c,
vgl_h_matrix_2d< double > const &  H 
) [static]

Transform a vsol_polygon_2d with a point specified as the center of the transformation.

i.e. vertices of the polygon are translated so that the specified point is the origin. The transformation is then applied and the point coordinates added back in afterwards.

i.e. vertices of the polygon are translated so that the specified point is the origin.

Definition at line 330 of file bsol_algs.cxx.

vgl_polygon< double > bsol_algs::vgl_from_poly ( vsol_polygon_2d_sptr const &  poly) [static]

construct a vgl_polygon from a vsol_polygon.

Definition at line 233 of file bsol_algs.cxx.


The documentation for this class was generated from the following files: