HOpSelectPolygonOOC

template<typename SelectionSet>
class HOpSelectPolygonOOC

The HSelectPolygonOOC class computes a selection list for OOC points inside a polygonal area. If this class is used by an HBaseView, the view must have an HSelectionSetOOC<SelectionSet> instance for its selection set.

Inherits from: HOpSelectPolygon

Methods

template<typename SelectionSet>
HOpSelectPolygonOOC<SelectionSet>::HOpSelectPolygonOOC(HBaseView &view)

Constructs an HOpSelectPolygonOOC.

Parameters

view: A reference to an HBaseView object.
template<typename SelectionSet>
virtual char const *HOpSelectPolygonOOC<SelectionSet>::GetName()

virtual

Returns

A pointer to a character string denoting the name of the operator, which is “HOpSelectPolygonOOC”.
template<typename SelectionSet>
virtual HBaseOperator *HOpSelectPolygonOOC<SelectionSet>::Clone()

virtual

Creates a new operator which is associated with the same view as the current operator. The user is responsible for deleting the newly created operator.

Returns

A pointer to a copy of this operator.
template<typename SelectionSet>
virtual int HOpSelectPolygonOOC<SelectionSet>::OnLButtonDown(HEventInfo &e)

virtual

Starts to create a selection lasso that will select points inside it. Each time the left mouse button is pressed, a new vertex is added to the polygon lasso.

Parameters

e: An HEventInfo object containing information about the current event.

Returns

A value indicating the status of the event.
template<typename SelectionSet>
virtual int HOpSelectPolygonOOC<SelectionSet>::OnLButtonDblClk(HEventInfo &e)

virtual

Finalizes the selection lasso created by OnLButtonDown and selects points that lie inside the polygon lasso.

Parameters

e: An HEventInfo object containing information about the current event.

Returns

A value indicating the status of the event.
template<typename SelectionSet>
HSelectionSetOOC<SelectionSet> &HOpSelectPolygonOOC<SelectionSet>::GetSelectionSet()

private

template<typename SelectionSet>
std::vector<ooc::Point> HOpSelectPolygonOOC<SelectionSet>::ComputePolygonTriangles()

private

template<typename SelectionSet>
static bool HOpSelectPolygonOOC<SelectionSet>::IsDegenerate(int const (&triangle_indices)[3])

private static

template<typename SelectionSet>
static std::vector<ooc::Point> HOpSelectPolygonOOC<SelectionSet>::ComputeTrianglesFromTristrips(std::vector<ooc::Point> const &points, std::vector<int> const &tristrips)

private static