|
CGAL 6.3 - Geometric Object Generators
|
#include <CGAL/point_generators_2.h>
The class Random_points_in_triangles_2 is an input iterator creating points uniformly distributed inside a range of Triangle_2.
The triangle range must be valid and unchanged while the iterator is used.
InputIterator PointGenerator Types | |
| typedef std::input_iterator_tag | iterator_category |
| typedef Point_2 | value_type |
| typedef std::ptrdiff_t | difference_type |
| typedef const Point_2 * | pointer |
| typedef const Point_2 & | reference |
Functions | |
| template<typename TriangleRange> | |
| Random_points_in_triangles_2 (const TriangleRange &triangles, Random &rnd=get_default_random()) | |
| creates an input iterator g generating points of type Point_2 uniformly distributed between the triangles of the range. | |
| std::pair< Point_2, const Triangle_2 * > | point_and_support () const |
| returns the last point generated and a pointer to the input triangle used to generate that point. | |
| CGAL::Random_points_in_triangles_2< Point_2, Triangle_2, Creator >::Random_points_in_triangles_2 | ( | const TriangleRange & | triangles, |
| Random & | rnd = get_default_random() ) |
creates an input iterator g generating points of type Point_2 uniformly distributed between the triangles of the range.
Each triangle has a probability to be chosen to hold the point depending on its area.