Alphabetical Class Index  Class Hierarchy   File Members   Compound Members   File List  

HSelectionSetOOC< SelectionSet > Class Template Reference

#include <HSelectionSetOOC.h>

List of all members.

Classes

struct  CallbackKeyInfo

Public Member Functions

void AddRectangleWindow (ooc::Point const &min, ooc::Point const &max)
void AddTriangleWindow (ooc::Point const &p1, ooc::Point const &p2, ooc::Point const &p3)
virtual bool DeleteSelection (bool emit_message=false)
virtual void Reset ()
ooc::query::QueryIterator SelectedPoints ()
void SetDeepSelection (bool deep_select)
template<typename Func >
auto SynchronizeWith (Func const &task)-> decltype(task())
bool UpdateSelection ()

Static Public Member Functions

static bool CanCreateInstance ()
static HSelectionSetOOCCreateInstance (HBaseView &view, bool deep_select)

Detailed Description

template<typename SelectionSet>
class HSelectionSetOOC< SelectionSet >

The HOpSelectionSetOOC class is the class that should be used when using the HOpSelectAreaOOC and HOpSelectPolygonOOC selection operators for selecting OOC points. Only one instance of HOpSelectionSetOOC can be alive at any given time.

Parameters:
SelectionSetThe underlying selection set type to use.

Member Function Documentation

template<typename SelectionSet>
void HSelectionSetOOC< SelectionSet >::AddRectangleWindow ( ooc::Point const &  min,
ooc::Point const &  max 
) [inline]

Adds a rectangular window to select points from in window space coordinates. This should only be called within an HSelectionSetOOC::SynchronizeWith callback.

Parameters:
minThe minumum point of the rectangle.
maxThe maximum point of the rectangle.

Referenced by HOpSelectAreaOOC< SelectionSet >::OnLButtonUp().

template<typename SelectionSet>
void HSelectionSetOOC< SelectionSet >::AddTriangleWindow ( ooc::Point const &  p1,
ooc::Point const &  p2,
ooc::Point const &  p3 
) [inline]

Adds a triangular window to select points from in window space coordinates. This should only be called within an HSelectionSetOOC::SynchronizeWith callback.

Parameters:
p1The first point of the triangle.
p2The second point of the triangle.
p3The third point of the triangle.
template<typename SelectionSet>
static bool HSelectionSetOOC< SelectionSet >::CanCreateInstance ( ) [inline, static]
Returns:
A boolean that denotes whether or not an HSelectionSetOOC object can be created by a call to CreateInstance.
template<typename SelectionSet>
static HSelectionSetOOC* HSelectionSetOOC< SelectionSet >::CreateInstance ( HBaseView view,
bool  deep_select 
) [inline, static]

Creates a new HSelectionSetOOC instance if one does not already exist. Returns a null pointer otherwise.

Parameters:
viewA reference to an HBaseView object.
deep_selectControls whether or not OOC points that are not loaded in memory get selected with this selection set. (See SetDeepSelection.)
Returns:
A pointer to the created HSelectionSetOOC.
template<typename SelectionSet>
virtual bool HSelectionSetOOC< SelectionSet >::DeleteSelection ( bool  emit_message = false) [inline, virtual]

Deletes all points selected by this object. This function works by doing the following:

  • Obtaining an iterator to the selected OOC points.
  • Iterating these points to associate each with a collection of points per ooc::NodeHandle.
  • Calling ooc::delta::DeleteSpecificPoints for each ooc::NodeHandle points pairing. Notably, this function only deletes the points in memory. This change will not be saved to disk unless one calls ooc::io::CommitDeltasToFile.
    Parameters:
    emit_messageControls whether or not the HBaseView associated with this object is notified about the deletion.

References HBaseView::GetModelKey(), HC_Close_Segment(), HC_Create_Segment_Key_By_Key(), HC_KEY, HC_Open_Segment_By_Key(), HC_QShow_Existence(), HSelectionSetOOC< SelectionSet >::Reset(), HSelectionSetOOC< SelectionSet >::SelectedPoints(), and HSelectionSetOOC< SelectionSet >::SynchronizeWith().

template<typename SelectionSet>
virtual void HSelectionSetOOC< SelectionSet >::Reset ( ) [inline, virtual]

Resets the HSelectionSetOOC object. This will deselect any points selected by this object.

References HWindowFilterOOC::ClearWindows().

Referenced by HSelectionSetOOC< SelectionSet >::DeleteSelection(), and HSelectionSetOOC< SelectionSet >::SetDeepSelection().

template<typename SelectionSet>
ooc::query::QueryIterator HSelectionSetOOC< SelectionSet >::SelectedPoints ( ) [inline]
Returns:
Returns a QueryIterator to the points selected by this selection set.

References HBaseView::GetModelKey(), HC_Create_Segment_Key_By_Key(), and HC_KEY.

Referenced by HSelectionSetOOC< SelectionSet >::DeleteSelection().

template<typename SelectionSet>
void HSelectionSetOOC< SelectionSet >::SetDeepSelection ( bool  deep_select) [inline]

Sets whether or not the selection set will select points that are not currently loaded into memory.

Parameters:
deep_selectEnables deep selection if true. Disables deep selection if false.

References HSelectionSetOOC< SelectionSet >::Reset().

template<typename SelectionSet>
template<typename Func >
auto HSelectionSetOOC< SelectionSet >::SynchronizeWith ( Func const &  task) [inline]

Creates a synchronization point to add rectangular or triangular windows to the selection set. (See AddRectangleWindow and AddTriangleWindow functions.)

Parameters:
taskThe callback to be called when the HSelectionSetOOC object is in a synchronized state.

Referenced by HSelectionSetOOC< SelectionSet >::DeleteSelection(), and HOpSelectAreaOOC< SelectionSet >::OnLButtonUp().

template<typename SelectionSet>
bool HSelectionSetOOC< SelectionSet >::UpdateSelection ( ) [inline]

Updates the highlighting of the selection points. This may be needed if points are loaded into memory or points are unloaded from memory. This will not force an HBaseView::Update. That is, this function will not update the visual presentation of the model. A seperate update is needed for that. This function will be automatically called in this object's Tick function, which executes periodically. The Tick function will call HBaseView::Update if this function returns true. This allows newly loaded points to be automatically highlighted without programmer interaction.

Returns:
Returns true if any new points have been highlighted or if any points have been unhighlighted.

References HBaseView::GetIncludeLinkKey(), HBaseView::GetViewKey(), HC_Begin_Contents_Search(), HC_Close_Segment(), HC_End_Contents_Search(), HC_Find_Contents(), HC_KEY, HC_Open_Segment_By_Key(), HC_Show_Bounding_Cuboid(), HC_Show_Geometry_Pointer(), and HC_Show_Shell_Size().


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