Defines | Functions
core/vgl/vgl_polygon.txx File Reference
#include "vgl_polygon.h"
#include "vgl_intersection.h"
#include "vgl_line_2d.h"
#include "vgl_tolerance.h"
#include <vcl_iostream.h>
#include <vcl_set.h>
#include <vcl_cmath.h>
#include <vcl_cassert.h>
#include <vcl_algorithm.h>

Go to the source code of this file.

Defines

#define vgl_polygon_txx_
#define VGL_POLYGON_INSTANTIATE(T)

Functions

template<class T >
void vgl_selfintersections (vgl_polygon< T > const &p, vcl_vector< vcl_pair< unsigned int, unsigned int > > &e1, vcl_vector< vcl_pair< unsigned int, unsigned int > > &e2, vcl_vector< vgl_point_2d< T > > &ip)
 Compute all self-intersections between all edges on all sheets.

Detailed Description

Definition in file vgl_polygon.txx.


Define Documentation

#define VGL_POLYGON_INSTANTIATE (   T)
Value:
template class vgl_polygon<T >; \
template struct vgl_polygon_sheet_as_array<T >; \
template vcl_ostream& operator<<(vcl_ostream&,vgl_polygon<T > const&); \
template void vgl_selfintersections(vgl_polygon<T > const& p, \
                                    vcl_vector<vcl_pair<unsigned int,unsigned int> >& e1, \
                                    vcl_vector<vcl_pair<unsigned int,unsigned int> >& e2, \
                                    vcl_vector<vgl_point_2d<T > >& ip)

Definition at line 283 of file vgl_polygon.txx.

#define vgl_polygon_txx_

Definition at line 3 of file vgl_polygon.txx.


Function Documentation

template<class T >
void vgl_selfintersections ( vgl_polygon< T > const &  p,
vcl_vector< vcl_pair< unsigned int, unsigned int > > &  e1,
vcl_vector< vcl_pair< unsigned int, unsigned int > > &  e2,
vcl_vector< vgl_point_2d< T > > &  ip 
)

Compute all self-intersections between all edges on all sheets.

Returns:
three arrays e1, e2, and ip of equal size. Corresponding elements from these arrays describe an intersection. e1[k].first is the sheet index containing edge (e1[k].second, e1[k].second+1) involved in the k-th intersection. Similarly, e2[k] indexes the other edge involved in the k-th intersection. The corresponding intersection point is returned in ip[k].

Definition at line 176 of file vgl_polygon.txx.