class Selection : public RefCountedObject

Class to manage a list of selected HitItems.

Selected items are per view.

Public Types

enum ItemType

List of selection item types.


enumerator NONE


enumerator ELEMENT

Element selection.

enumerator NODE

Node selection.

enumerator ELEMENT_NODE

Element node selection.


Element surface selection.

enumerator COORDINATE

Coordinate selection.

Public Functions


Constructs an empty selection instance.

size_t count()

Returns number of selections.

void set(size_t index, const cee::ug::HitItem &item)

Sets the hititem item at the specified index.

cee::ug::HitItem get(size_t index)

Returns the hititem at index.

size_t add(const cee::ug::HitItem &hitItem)

Adds the specified hititem and returns it’s index.

size_t addNode(size_t index)

Adds a node by index to selection.

size_t addElement(size_t index)

Adds an element by index to selection.

size_t addElementNode(size_t elementIndex, size_t localNodeIndex)

Adds an element node by element index and local node index to selection.

size_t addElementSurface(size_t elementIndex, size_t surfaceIndex)

Adds an element surface by element index and surface index to selection.

size_t addCoordinate(const cee::Vec3d &coordinate)

Adds a coordinate to selection.

void remove(size_t index)

Removes the selection at index.

void removeAll()

Removes all selections.

void setItemType(ItemType selectionType)

Sets the selection type.

ItemType itemType() const

Returns the selection type.

bool isMultiSelectionEnabled() const

Returns true of multi selection is enabled.

void enableMultiSelection(bool enable)

Enables multi selection.

const int initialGeometryId(size_t index) const

Returns the initial geometry id for the given index.