Class to manage a list of selected HitItems. Selected items are per view. More...
Public Types | |
enum | ItemType { NONE, ELEMENT, NODE, ELEMENT_NODE, ELEMENT_SURFACE, COORDINATE } |
List of selection item types. More... | |
Public Member Functions | |
Selection () | |
Constructs an empty selection instance. More... | |
size_t | count () |
Returns number of selections. More... | |
void | set (size_t index, const cee::ug::HitItem &item) |
Sets the hititem item at the specified index. More... | |
cee::ug::HitItem | get (size_t index) |
Returns the hititem at index. More... | |
size_t | add (const cee::ug::HitItem &hitItem) |
Adds the specified hititem and returns it's index. More... | |
size_t | addNode (size_t index) |
Adds a node by index to selection. More... | |
size_t | addElement (size_t index) |
Adds an element by index to selection. More... | |
size_t | addElementNode (size_t elementIndex, size_t localNodeIndex) |
Adds an element node by element index and local node index to selection. More... | |
size_t | addElementSurface (size_t elementIndex, size_t surfaceIndex) |
Adds an element surface by element index and surface index to selection. More... | |
size_t | addCoordinate (const cee::Vec3d &coordinate) |
Adds a coordinate to selection. More... | |
void | remove (size_t index) |
Removes the selection at index. More... | |
void | removeAll () |
Removes all selections. More... | |
void | setItemType (ItemType selectionType) |
Sets the selection type. More... | |
ItemType | itemType () const |
Returns the selection type. More... | |
bool | isMultiSelectionEnabled () const |
Returns true of multi selection is enabled. More... | |
void | enableMultiSelection (bool enable) |
Enables multi selection. More... | |
const int | initialGeometryId (size_t index) const |
Returns the initial geometry id for the given index. More... | |
![]() | |
void | addRef () const |
Increments the reference count for this object. More... | |
void | release () const |
Decrements the reference count for this object. More... | |
int | refCount () const |
Returns the reference count for this object. More... | |
void | setRefCountZero () const |
Sets the ref count to zero, but DOES NOT delete the object. More... | |
Class to manage a list of selected HitItems. Selected items are per view.
cee::app::Selection::Selection | ( | ) |
Constructs an empty selection instance.
size_t cee::app::Selection::add | ( | const cee::ug::HitItem & | hitItem | ) |
Adds the specified hititem and returns it's index.
size_t cee::app::Selection::addCoordinate | ( | const cee::Vec3d & | coordinate | ) |
Adds a coordinate to selection.
size_t cee::app::Selection::addElement | ( | size_t | index | ) |
Adds an element by index to selection.
size_t cee::app::Selection::addElementNode | ( | size_t | elementIndex, |
size_t | localNodeIndex | ||
) |
Adds an element node by element index and local node index to selection.
size_t cee::app::Selection::addElementSurface | ( | size_t | elementIndex, |
size_t | surfaceIndex | ||
) |
Adds an element surface by element index and surface index to selection.
size_t cee::app::Selection::addNode | ( | size_t | index | ) |
Adds a node by index to selection.
size_t cee::app::Selection::count | ( | ) |
Returns number of selections.
void cee::app::Selection::enableMultiSelection | ( | bool | enable | ) |
Enables multi selection.
HitItem cee::app::Selection::get | ( | size_t | index | ) |
Returns the hititem at index.
const int cee::app::Selection::initialGeometryId | ( | size_t | index | ) | const |
Returns the initial geometry id for the given index.
bool cee::app::Selection::isMultiSelectionEnabled | ( | ) | const |
Returns true of multi selection is enabled.
Selection::ItemType cee::app::Selection::itemType | ( | ) | const |
Returns the selection type.
void cee::app::Selection::remove | ( | size_t | index | ) |
Removes the selection at index.
void cee::app::Selection::removeAll | ( | ) |
Removes all selections.
void cee::app::Selection::set | ( | size_t | index, |
const cee::ug::HitItem & | item | ||
) |
Sets the hititem item at the specified index.
void cee::app::Selection::setItemType | ( | ItemType | selectionType | ) |
Sets the selection type.