AGSol (Art Gallery Solver)  1.0.2
This package contains a software capable of optimally solving the Art Gallery Problem (AGP), one interesting NP-hard problem from the Computational Geometry field. The algorithm implemented in this solution, which can be today considered the state-of-the-art technique on the AGP, can be found in details in the following paper: Davi C. Tozoni, Pedro J. de Rezende, Cid C. de Souza. A Practical Iterative Algorithm for the Art Gallery Problem using Integer Linear Programming
 All Classes Functions
Public Member Functions | List of all members
MyObserver Class Reference

#include <Arrangement.h>

Inheritance diagram for MyObserver:

Public Member Functions

 MyObserver (Arrangement &arr)
 
void setStarterEdge (bool b)
 
void setOriginalSeg (Segment seg)
 
virtual void before_create_edge (const X_monotone_curve_2 &s, Vertex_handle v1, Vertex_handle v2)
 
virtual void after_create_edge (Halfedge_handle e)
 
virtual void before_split_edge (Halfedge_handle e, Vertex_handle v, const X_monotone_curve_2 &s1, const X_monotone_curve_2 &s2)
 
virtual void after_split_edge (Halfedge_handle e1, Halfedge_handle e2)
 
virtual void before_modify_edge (Halfedge_handle e, const X_monotone_curve_2 &s)
 
virtual void after_modify_edge (Halfedge_handle e)
 

Detailed Description

Class implemented in order to change the default behavior of the events during the construction of an arrangement. With this class, it is possible to save important information which is later used to verify if a cell is a light or a shadow AVP.

Constructor & Destructor Documentation

MyObserver::MyObserver ( Arrangement &  arr)
inline

Constructor. Informs that the first edges that will be added are from the boundary of the polygon.

Member Function Documentation

virtual void MyObserver::after_create_edge ( Halfedge_handle  e)
inlinevirtual

Function called after creating an edge. Sets information about the visible side of the edge.

virtual void MyObserver::after_modify_edge ( Halfedge_handle  e)
inlinevirtual

Function called before modifying an edge. In our case, it means that another edge is being placed over an existing one. Sets the information saved before.

virtual void MyObserver::after_split_edge ( Halfedge_handle  e1,
Halfedge_handle  e2 
)
inlinevirtual

Function called after spliting an existing edge. Sets information about the visible side of both edges which were induced by the split event. The new edges should keep the same visibility status of the original one.

virtual void MyObserver::before_create_edge ( const X_monotone_curve_2 &  s,
Vertex_handle  v1,
Vertex_handle  v2 
)
inlinevirtual

Function called before creating an edge. Keeps information about the visible side of the edge.

virtual void MyObserver::before_modify_edge ( Halfedge_handle  e,
const X_monotone_curve_2 &  s 
)
inlinevirtual

Function called before modifying an edge. In our case, it means that another edge is being placed over an existing one. It is necessary to verify the direction of both edges to see if one or both sides will be visible.

virtual void MyObserver::before_split_edge ( Halfedge_handle  e,
Vertex_handle  v,
const X_monotone_curve_2 &  s1,
const X_monotone_curve_2 &  s2 
)
inlinevirtual

Function called before spliting an existing edge. Saves information about the visible side of the edge (which must not change).

void MyObserver::setOriginalSeg ( Segment  seg)
inline

Sets variable responsible for keeping the original edge being currently included in the arrangement.

void MyObserver::setStarterEdge ( bool  b)
inline

Sets variable used to inform if the next edges to be added are from the boundary or induced by visibility polygons.


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