CGAL 4.7 - 2D Visibility: CGAL::Rotational_sweep_visibility_2< Arrangement_2_, RegularizationCategory > Class Template Reference

\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \) \( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \) \( \def\ccSum #1#2#3{ \sum_{#1}^{#2}{#3} } \def\ccProd #1#2#3{ \sum_{#1}^{#2}{#3} }\)

CGAL 4.7 - 2D Visibility

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
List of all members
CGAL::Rotational_sweep_visibility_2< Arrangement_2_, RegularizationCategory > Class Template Reference
Classes

`#include <CGAL/Rotational_sweep_visibility_2.h>`

## Definition

### template<typename Arrangement_2_, typename RegularizationCategory = Tag_true>
class CGAL::Rotational_sweep_visibility_2< Arrangement_2_, RegularizationCategory >

This class is a model of the concept `Visibility_2` can answer visibility queries within a polygon that may have holes.

The algorithm does not require preprocessing. It relies on the algorithm of T. Asano[1] based on angular plane sweep, with a time complexity of \(O (n \log n)\) in the number of vertices.

Template Parameters

  Arrangement_2_ | is the type used to represent the input environment. It must be an instance of `CGAL::Arrangement_2`, where its `CGAL::Arrangement_2::Traits_2` must be an instance of `CGAL::Arr_segment_traits_2`, or of `CGAL::Arr_non_caching_segment_traits_2`.
  RegularizationCategory | indicates whether the output should be regularized. It can be specified by one of the following: `Tag_true` or `Tag_false`, where `Tag_false` is the default value.

Is Model Of:
  `Visibility_2`

See Also
  `CGAL::Simple_polygon_visibility_2`
  `CGAL::Triangular_expansion_visibility_2`

## Types

typedef Arrangement_2 | Arrangement_2
| The type of the input arrangement.

## Tags

typedef RegularizationCategory | Regularization_category
| identifies whether the regularized visibility area is computed (either `Tag_true` or `Tag_false`). More...
typedef Tag_true | Supports_general_polygon_category
| See Visibility_2::Supports_general_polygon_category.
typedef Tag_true | Supports_simple_polygon_category
| See Visibility_2::Supports_simple_polygon_category.

## Functions

void | attach (const Arrangement_2 &arr)
| Attaches the given arrangement to the visibility object. More...

## Member Typedef Documentation

template<typename Arrangement_2_ , typename RegularizationCategory = Tag_true>

typedef RegularizationCategory CGAL::Rotational_sweep_visibility_2< Arrangement_2_, RegularizationCategory >::Regularization_category

identifies whether the regularized visibility area is computed (either `Tag_true` or `Tag_false`).

## Member Function Documentation

template<typename Arrangement_2_ , typename RegularizationCategory = Tag_true>

void CGAL::Rotational_sweep_visibility_2< Arrangement_2_, RegularizationCategory >::attach | ( | const Arrangement_2 & | arr) |  |

Attaches the given arrangement to the visibility object.

This operation takes \(O(1)\) as the class does no pre-processing.

In case the object is already attached to another arrangement, the visibility object gets detached before being attached to `arr`.